From 23110c77a822e1ad016acfb41a92695f2473ea01 Mon Sep 17 00:00:00 2001 From: Joseph Callen Date: Tue, 4 Aug 2026 16:35:59 -0400 Subject: [PATCH 1/3] bootimage: fix vSphere reconciler overwriting current custom-named templates Bug: when a vSphere MachineSet's providerSpec.Template pointed at a non-standard (customer-managed) name, createNewVMTemplate treated any mismatch against the computed canonical name as drift and any RHCOS version mismatch as staleness, without checking whether the custom-named template already held the current release. This caused the controller to rename or rebuild valid, up-to-date custom templates on every reconcile, and rebuilding into the computed name could collide with a current template already sitting there under that name from before the custom name was adopted. createNewVMTemplate now calls the new isTemplateAtRelease helper to check the embedded RHCOS product version before acting: a custom name that already matches the target release is left alone, and an outdated custom template converges to the computed name only when the computed name doesn't already have its own current template (in which case the controller just switches back to it instead of rebuilding). Converging a custom-named template to the computed name during a rebuild requires swapping out a VM known under a name other than the one being created, so findAllRequiredResources and createNewVMTemplateWithNameForFailureDomain now take the already-resolved *object.VirtualMachine directly instead of re-resolving it by the (possibly different) target name. atomicTempName is exported as AtomicTempName so e2e coverage can compute the same "mco-old-" rollback name without duplicating the hashing logic. Also fixes an unrelated %wt -> %w format-verb typo in upgradeStubIgnitionIfRequired's error wrapping. Co-Authored-By: Claude Sonnet 5 --- pkg/controller/bootimage/helpers.go | 2 +- pkg/controller/bootimage/vsphere_helpers.go | 159 +++++++++++++++----- 2 files changed, 119 insertions(+), 42 deletions(-) diff --git a/pkg/controller/bootimage/helpers.go b/pkg/controller/bootimage/helpers.go index ca79331e04..39a4062de4 100644 --- a/pkg/controller/bootimage/helpers.go +++ b/pkg/controller/bootimage/helpers.go @@ -99,7 +99,7 @@ func upgradeStubIgnitionIfRequired(secretName string, secretClient clientset.Int userData := secret.Data[ctrlcommon.UserDataKey] var userDataIgn interface{} if err := json.Unmarshal(userData, &userDataIgn); err != nil { - return fmt.Errorf("failed to unmarshal decoded user-data to json (secret %s): %wt", secret.Name, err) + return fmt.Errorf("failed to unmarshal decoded user-data to json (secret %s): %w", secret.Name, err) } versionPath := []string{ctrlcommon.IgnFieldIgnition, ctrlcommon.IgnFieldVersion} version, _, err := unstructured.NestedString(userDataIgn.(map[string]any), versionPath...) diff --git a/pkg/controller/bootimage/vsphere_helpers.go b/pkg/controller/bootimage/vsphere_helpers.go index fd8d36342f..b1d12f6aac 100644 --- a/pkg/controller/bootimage/vsphere_helpers.go +++ b/pkg/controller/bootimage/vsphere_helpers.go @@ -174,7 +174,10 @@ func upload(ctx context.Context, archive *importer.TapeArchive, lease *nfc.Lease } // findAllRequiredResources locates all vSphere objects (folder, cluster, pool, network, etc.) -func findAllRequiredResources(ctx context.Context, finder *find.Finder, providerSpec *machinev1beta1.VSphereMachineProviderSpec, failureDomain osconfigv1.VSpherePlatformFailureDomainSpec, name string) (*VsphereResources, error) { +// existingVM, when non-nil, is used directly as the template to swap out instead of looking one +// up by name — the caller may already know it under a different name than name (see +// createNewVMTemplateWithNameForFailureDomain). +func findAllRequiredResources(ctx context.Context, finder *find.Finder, providerSpec *machinev1beta1.VSphereMachineProviderSpec, failureDomain osconfigv1.VSpherePlatformFailureDomainSpec, existingVM *object.VirtualMachine, name string) (*VsphereResources, error) { vr := VsphereResources{} folder, err := finder.Folder(ctx, providerSpec.Workspace.Folder) if err != nil { @@ -198,6 +201,10 @@ func findAllRequiredResources(ctx context.Context, finder *find.Finder, provider if err != nil { return nil, fmt.Errorf("failed to find datastore: %w", err) } + if existingVM != nil { + vr.existingVM = existingVM + return &vr, nil + } vr.existingVM, err = finder.VirtualMachine(ctx, name) if err != nil { if _, ok := err.(*find.NotFoundError); ok { @@ -351,7 +358,7 @@ func resolveExistingTemplateVM( // Computed name not found in the workspace folder — either nothing exists there, or the name is // held by a customer-managed VM elsewhere in the inventory that must be left alone. Either way, // check for a rollback VM left by a prior mid-swap crash before creating a fresh template. - oldTempName := atomicTempName("mco-old", computedName) + oldTempName := AtomicTempName("mco-old", computedName) oldVM, oldErr := finder.VirtualMachine(ctx, oldTempName) if oldErr != nil { if !errors.As(oldErr, ¬FoundErr) { @@ -376,7 +383,7 @@ func resolveExistingTemplateVM( if diskTypeErr != nil { return nil, "", false, fmt.Errorf("failed to determine disk provisioning type for new template %s: %w", computedName, diskTypeErr) } - if createErr := createNewVMTemplateWithNameForFailureDomain(ctx, providerSpec, failureDomain, finder, client, tagManager, computedName, ovaPath, infraID, diskType); createErr != nil { + if createErr := createNewVMTemplateWithNameForFailureDomain(ctx, providerSpec, failureDomain, finder, client, tagManager, nil, computedName, ovaPath, infraID, diskType); createErr != nil { return nil, "", false, createErr } return nil, computedName, true, nil @@ -402,7 +409,9 @@ func resolveExistingTemplateVM( // atomicTempName returns a short, fixed-length (17-char) VM name for use during atomic template // swaps. The hash makes it deterministic and unique per final name, bypassing the 80-char limit. -func atomicTempName(prefix, name string) string { +// Exported so e2e tests can compute the same "mco-old-" rollback name this package uses, +// without duplicating the hashing logic. +func AtomicTempName(prefix, name string) string { h := sha256.Sum256([]byte(name)) return fmt.Sprintf("%s-%x", prefix, h[:4]) } @@ -488,13 +497,17 @@ func getCISP(ovfEnvelope *ovf.Envelope, networkRef object.NetworkReference, name return cisp, nil } -func createNewVMTemplateWithNameForFailureDomain(ctx context.Context, providerSpec *machinev1beta1.VSphereMachineProviderSpec, failureDomain osconfigv1.VSpherePlatformFailureDomainSpec, finder *find.Finder, client *govmomi.Client, tagManager *tags.Manager, name, ovaPath, infraID, diskType string) error { +// existingVM, when non-nil, is the template VM to atomically swap out once the rebuild +// completes — it may be known under a name other than name (e.g. a custom providerSpec.Template +// that is being converged to the computed name on rebuild). When nil, findAllRequiredResources +// falls back to looking up name directly (the "brand new template" case). +func createNewVMTemplateWithNameForFailureDomain(ctx context.Context, providerSpec *machinev1beta1.VSphereMachineProviderSpec, failureDomain osconfigv1.VSpherePlatformFailureDomainSpec, finder *find.Finder, client *govmomi.Client, tagManager *tags.Manager, existingVM *object.VirtualMachine, name, ovaPath, infraID, diskType string) error { // tempName is where the new OVA is imported; oldTempName holds the existing template during // the swap. Both are fixed-length (17 chars) so they always fit within vSphere's 80-char limit. - tempName := atomicTempName("mco-tmp", name) - oldTempName := atomicTempName("mco-old", name) + tempName := AtomicTempName("mco-tmp", name) + oldTempName := AtomicTempName("mco-old", name) - vr, err := findAllRequiredResources(ctx, finder, providerSpec, failureDomain, name) + vr, err := findAllRequiredResources(ctx, finder, providerSpec, failureDomain, existingVM, name) if err != nil { return err } @@ -709,6 +722,7 @@ func createNewVMTemplate(streamData *stream.Stream, providerSpec *machinev1beta1 continue } infraID := infra.Status.InfrastructureName + computedName := fmt.Sprintf("%s-rhcos-%s", infraID, failureDomain.Name) datacenter, err := finder.Datacenter(ctx, failureDomain.Topology.Datacenter) if err != nil { @@ -739,39 +753,7 @@ func createNewVMTemplate(streamData *stream.Stream, providerSpec *machinev1beta1 return "", false, fmt.Errorf("unable to determine RHCOS version of virtual machine: %s", providerSpec.Template) } - if templateProductVersion != release { - klog.Infof("Existing RHCOS v%s does not match current RHCOS v%s. Starting reconciliation process.", templateProductVersion, release) - - // Find and download the relevant OVA file - ova, err := streamData.QueryDisk(arch, "vmware", "ova") - if err != nil { - return "", false, err - } - - ovaPath, err := cache.DownloadOva(ova) - if err != nil { - return "", false, fmt.Errorf("failed to download %s: %w", ova.Location, err) - } - - if len(resolvedName) > 80 { - return "", false, fmt.Errorf("length of VM template name `%s` exceeds the permitted limit of 80 characters", resolvedName) - } - - diskType := getDiskTypeFromExistingVM(vmMo) - - err = createNewVMTemplateWithNameForFailureDomain(ctx, providerSpec, failureDomain, finder, client, tagManager, resolvedName, ovaPath, infraID, diskType) - if err != nil { - return "", false, err - } - return resolvedName, true, nil - } - - klog.Infof("Existing RHCOS v%s does match current RHCOS v%s. Skipping reconciliation process using govmomi.", templateProductVersion, release) - if providerSpec.Template != resolvedName { - klog.Infof("ProviderSpec template name: %s has diverged from the VM Template of name: %s that exists in VSphere. Reconciling the name change.", providerSpec.Template, resolvedName) - return resolvedName, true, nil - } - return resolvedName, false, nil + return reconcileTemplateVersion(ctx, finder, providerSpec, failureDomain, streamData, client, tagManager, existingTemplateVM, vmMo, computedName, resolvedName, infraID, arch, release, templateProductVersion) } } @@ -785,3 +767,98 @@ func createNewVMTemplate(streamData *stream.Stream, providerSpec *machinev1beta1 } return "", false, fmt.Errorf("providerSpec workspace (%s) does not match any vCenter/failure domain in the Infrastructure object", workspaceDetails) } + +// reconcileTemplateVersion decides whether the existing template VM found for a failure domain +// needs to be rebuilt (RHCOS version mismatch) or only has its providerSpec.Template name +// reconciled (version already matches). It is split out of createNewVMTemplate to keep that +// function's decision tree within gocyclo's complexity limit. +func reconcileTemplateVersion(ctx context.Context, finder *find.Finder, providerSpec *machinev1beta1.VSphereMachineProviderSpec, failureDomain osconfigv1.VSpherePlatformFailureDomainSpec, streamData *stream.Stream, client *govmomi.Client, tagManager *tags.Manager, existingTemplateVM *object.VirtualMachine, vmMo mo.VirtualMachine, computedName, resolvedName, infraID, arch, release, templateProductVersion string) (string, bool, error) { + if templateProductVersion != release { + klog.Infof("Existing RHCOS v%s does not match current RHCOS v%s. Starting reconciliation process.", templateProductVersion, release) + + // An outdated custom template converges back to the computed name rather than + // being rebuilt in place: a custom name is only preserved while it is current + // (see the release-matches branch below). But the computed name may already have + // its own current template sitting there (e.g. left behind from before the + // custom name was adopted) — vSphere names are unique, so rebuilding straight + // into computedName would collide with it. Check for that first and, if found, + // just switch back to the existing current template instead of rebuilding. + if resolvedName != computedName { + computedCurrent, ccErr := isTemplateAtRelease(ctx, finder, computedName, release) + if ccErr != nil { + if _, ok := ccErr.(*find.NotFoundError); !ok { + return "", false, fmt.Errorf("checking whether computed name %q is at release %s: %w", computedName, release, ccErr) + } + } + if computedCurrent { + klog.Infof("providerSpec.Template %q is outdated, but computed name %q already has a current RHCOS v%s template; switching back to it", resolvedName, computedName, release) + return computedName, true, nil + } + klog.Infof("providerSpec.Template %q is outdated; converging to computed name %s on rebuild", resolvedName, computedName) + } + + // Find and download the relevant OVA file + ova, err := streamData.QueryDisk(arch, "vmware", "ova") + if err != nil { + return "", false, err + } + + ovaPath, err := cache.DownloadOva(ova) + if err != nil { + return "", false, fmt.Errorf("failed to download %s: %w", ova.Location, err) + } + + if len(computedName) > 80 { + return "", false, fmt.Errorf("length of VM template name `%s` exceeds the permitted limit of 80 characters", computedName) + } + + diskType := getDiskTypeFromExistingVM(vmMo) + + err = createNewVMTemplateWithNameForFailureDomain(ctx, providerSpec, failureDomain, finder, client, tagManager, existingTemplateVM, computedName, ovaPath, infraID, diskType) + if err != nil { + return "", false, err + } + return computedName, true, nil + } + + klog.Infof("Existing RHCOS v%s does match current RHCOS v%s. Skipping reconciliation process using govmomi.", templateProductVersion, release) + if providerSpec.Template != resolvedName { + // Before overwriting the custom template name, check whether + // providerSpec.Template already references a valid, current + // template. Users (or other tooling) may upload the correct + // RHCOS OVA under a non-standard name; if its embedded version + // matches the target release we should leave it alone. + customCurrent, custErr := isTemplateAtRelease(ctx, finder, providerSpec.Template, release) + if custErr != nil { + if _, ok := custErr.(*find.NotFoundError); !ok { + return "", false, fmt.Errorf("checking whether providerSpec.Template %q is at release %s: %w", providerSpec.Template, release, custErr) + } + } + if customCurrent { + klog.Infof("providerSpec.Template %q already points at a current RHCOS v%s template; preserving custom name", providerSpec.Template, release) + return "", false, nil + } + klog.Infof("ProviderSpec template name: %s has diverged from the VM Template of name: %s that exists in VSphere. Reconciling the name change.", providerSpec.Template, resolvedName) + return resolvedName, true, nil + } + return "", false, nil +} + +// isTemplateAtRelease checks whether the named vSphere template exists in the +// datacenter scoped by finder and has an embedded RHCOS product version that +// matches release. Returns (true, nil) when the template is current, +// (false, nil) when it is not, and (false, err) on unexpected failures. +func isTemplateAtRelease(ctx context.Context, finder *find.Finder, templateName, release string) (bool, error) { + vm, err := finder.VirtualMachine(ctx, templateName) + if err != nil { + return false, err + } + var vmMo mo.VirtualMachine + if err := vm.Properties(ctx, vm.Reference(), []string{"summary.config.product"}, &vmMo); err != nil { + return false, err + } + if vmMo.Summary.Config.Product == nil || vmMo.Summary.Config.Product.Version == "" { + return false, nil + } + return vmMo.Summary.Config.Product.Version == release, nil +} From e8efd773357d2135ab3ef97b60b0631966bc937b Mon Sep 17 00:00:00 2001 From: Joseph Callen Date: Tue, 4 Aug 2026 16:36:16 -0400 Subject: [PATCH 2/3] test: add vSphere boot image unit and e2e coverage Adds a govmomi simulator-backed unit test harness for the vSphere boot image path: pure-function coverage for the OVA/atomic-swap helpers, simulator-backed coverage for vSphere object lookups and createNewVMTemplate's decision tree (including the multi-vCenter and multi-failure-domain cases and the custom-template-preservation fix), TestReconcileVSphereProviderSpec, hot-loop-by-version coverage, and DownloadOva and CheckBootImagePlatform unit tests. Also adds e2e specs under test/extended-priv covering multi-vCenter and multi-failure-domain reconciliation and non-standard providerSpec.Template names, and supporting helpers for datacenter-aware template lookups and backdated image uploads scoped to a MachineSet's own workspace instead of failureDomains[0]. Co-Authored-By: Claude Sonnet 5 --- pkg/controller/bootimage/cache/cache.go | 15 +- pkg/controller/bootimage/cache/cache_test.go | 152 ++++++ pkg/controller/bootimage/ms_helpers_test.go | 139 ++++++ .../bootimage/platform_helpers_test.go | 112 +++++ .../bootimage/vsphere_create_template_test.go | 451 ++++++++++++++++++ .../bootimage/vsphere_helpers_test.go | 264 ++++++++++ .../bootimage/vsphere_object_helpers_test.go | 340 +++++++++++++ .../vsphere_ova_import_spike_test.go | 268 +++++++++++ .../bootimage/vsphere_simulator_test.go | 262 ++++++++++ pkg/controller/common/featuregates_test.go | 77 +++ test/extended-priv/mco_bootimages.go | 411 ++++++++++++++-- test/extended-priv/mco_scale.go | 11 + test/extended-priv/util/vsphere.go | 114 ++++- 13 files changed, 2566 insertions(+), 50 deletions(-) create mode 100644 pkg/controller/bootimage/cache/cache_test.go create mode 100644 pkg/controller/bootimage/ms_helpers_test.go create mode 100644 pkg/controller/bootimage/platform_helpers_test.go create mode 100644 pkg/controller/bootimage/vsphere_create_template_test.go create mode 100644 pkg/controller/bootimage/vsphere_object_helpers_test.go create mode 100644 pkg/controller/bootimage/vsphere_ova_import_spike_test.go create mode 100644 pkg/controller/bootimage/vsphere_simulator_test.go diff --git a/pkg/controller/bootimage/cache/cache.go b/pkg/controller/bootimage/cache/cache.go index 4f59db7759..6797ae9103 100644 --- a/pkg/controller/bootimage/cache/cache.go +++ b/pkg/controller/bootimage/cache/cache.go @@ -9,7 +9,6 @@ import ( "path/filepath" "github.com/coreos/stream-metadata-go/stream" - "github.com/pkg/errors" "golang.org/x/sys/unix" "k8s.io/klog/v2" ) @@ -70,14 +69,10 @@ func getFileFromCache(fileName, cacheDir string) (string, string, error) { } // GetCacheDir returns a local path of the cache, where the installer should put the data: -// /tmp//_cache +// /tmp//_cache // If the directory doesn't exist, it will be automatically created. -func getCacheDir(dataType, applicationName string) (string, error) { - if dataType == "" { - return "", errors.Errorf("data type can't be an empty string") - } - - cacheDir := filepath.Join("/tmp", applicationName, dataType+"_cache") +func getCacheDir() (string, error) { + cacheDir := filepath.Join("/tmp", ImageBasedApplicationName, ImageDataType+"_cache") _, err := os.Stat(cacheDir) if err != nil { @@ -130,7 +125,7 @@ func cacheFile(ova *stream.Artifact, filePath, cacheDir string) (string, error) return ova.Download(cacheDir) } -// download obtains a file from a given URL, puts it in the cache folder, defined by dataType parameter, +// download obtains a file from a given URL, puts it in the cache folder, // and returns the local file path. func DownloadOva(ova *stream.Artifact) (string, error) { @@ -139,7 +134,7 @@ func DownloadOva(ova *stream.Artifact) (string, error) { return "", err } - cacheDir, err := getCacheDir(ImageDataType, ImageBasedApplicationName) + cacheDir, err := getCacheDir() if err != nil { return "", err } diff --git a/pkg/controller/bootimage/cache/cache_test.go b/pkg/controller/bootimage/cache/cache_test.go new file mode 100644 index 0000000000..8d6b27c79d --- /dev/null +++ b/pkg/controller/bootimage/cache/cache_test.go @@ -0,0 +1,152 @@ +package cache + +import ( + "crypto/sha256" + "encoding/hex" + "fmt" + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "sync/atomic" + "testing" + + "github.com/coreos/stream-metadata-go/stream" +) + +var testFileCounter atomic.Int64 + +// newTestArtifact starts an httptest server serving content at a uniquely-named path (so +// concurrent/sequential test cases never collide in the shared /tmp/imagebased/image_cache +// directory DownloadOva always uses) and returns a stream.Artifact pointing at it, along with +// a cleanup func that removes the resulting cached file. +func newTestArtifact(t *testing.T, content []byte) (*stream.Artifact, *httptest.Server, func()) { + t.Helper() + + n := testFileCounter.Add(1) + fileName := fmt.Sprintf("mco-cache-test-%d.ova", n) + + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write(content) + })) + t.Cleanup(srv.Close) + + sum := sha256.Sum256(content) + artifact := &stream.Artifact{ + Location: srv.URL + "/" + fileName, + Sha256: hex.EncodeToString(sum[:]), + } + + cacheDir, err := getCacheDir() + if err != nil { + t.Fatalf("newTestArtifact: failed to resolve cache dir: %v", err) + } + cleanup := func() { + _ = os.Remove(filepath.Join(cacheDir, fileName)) + } + t.Cleanup(cleanup) + + return artifact, srv, cleanup +} + +func TestDownloadOva(t *testing.T) { + t.Run("fresh download", func(t *testing.T) { + content := []byte("fake-ova-content-fresh-download") + artifact, _, _ := newTestArtifact(t, content) + + path, err := DownloadOva(artifact) + if err != nil { + t.Fatalf("DownloadOva() unexpected error: %v", err) + } + got, err := os.ReadFile(path) + if err != nil { + t.Fatalf("failed to read downloaded file: %v", err) + } + if string(got) != string(content) { + t.Errorf("downloaded content = %q, want %q", got, content) + } + }) + + t.Run("cache hit avoids re-downloading", func(t *testing.T) { + content := []byte("fake-ova-content-cache-hit") + artifact, srv, _ := newTestArtifact(t, content) + + firstPath, err := DownloadOva(artifact) + if err != nil { + t.Fatalf("DownloadOva() (first call) unexpected error: %v", err) + } + + // Shut the server down before the second call: if DownloadOva tried to re-fetch instead + // of serving from cache, it would fail with a connection error. + srv.Close() + + secondPath, err := DownloadOva(artifact) + if err != nil { + t.Fatalf("DownloadOva() (second call) unexpected error: %v", err) + } + if secondPath != firstPath { + t.Errorf("DownloadOva() second call path = %q, want %q (same cached file)", secondPath, firstPath) + } + got, err := os.ReadFile(secondPath) + if err != nil { + t.Fatalf("failed to read cached file: %v", err) + } + if string(got) != string(content) { + t.Errorf("cached content = %q, want %q", got, content) + } + }) + + t.Run("corrupted cache is re-downloaded", func(t *testing.T) { + content := []byte("fake-ova-content-corruption-repair") + artifact, _, cleanup := newTestArtifact(t, content) + + cacheDir, err := getCacheDir() + if err != nil { + t.Fatalf("failed to resolve cache dir: %v", err) + } + name, err := artifact.Name() + if err != nil { + t.Fatalf("failed to compute artifact name: %v", err) + } + cachedPath := filepath.Join(cacheDir, name) + + // Pre-populate the cache with content that does NOT match artifact.Sha256. + if err := os.WriteFile(cachedPath, []byte("stale-corrupted-bytes"), 0o644); err != nil { + t.Fatalf("failed to seed corrupted cache file: %v", err) + } + defer cleanup() + + path, err := DownloadOva(artifact) + if err != nil { + t.Fatalf("DownloadOva() unexpected error: %v", err) + } + got, err := os.ReadFile(path) + if err != nil { + t.Fatalf("failed to read repaired file: %v", err) + } + if string(got) != string(content) { + t.Errorf("repaired content = %q, want %q (freshly re-downloaded)", got, content) + } + }) + + t.Run("download failure propagates", func(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusInternalServerError) + })) + t.Cleanup(srv.Close) + + artifact := &stream.Artifact{ + Location: srv.URL + "/unreachable-mco-test.ova", + Sha256: "0000000000000000000000000000000000000000000000000000000000000", + } + cacheDir, err := getCacheDir() + if err != nil { + t.Fatalf("failed to resolve cache dir: %v", err) + } + t.Cleanup(func() { _ = os.Remove(filepath.Join(cacheDir, "unreachable-mco-test.ova")) }) + + if _, err := DownloadOva(artifact); err == nil { + t.Fatalf("DownloadOva() expected an error for a failing download, got nil") + } + }) +} diff --git a/pkg/controller/bootimage/ms_helpers_test.go b/pkg/controller/bootimage/ms_helpers_test.go new file mode 100644 index 0000000000..6e9c7497b2 --- /dev/null +++ b/pkg/controller/bootimage/ms_helpers_test.go @@ -0,0 +1,139 @@ +package bootimage + +import ( + "encoding/json" + "testing" + + "github.com/coreos/stream-metadata-go/stream" + osconfigv1 "github.com/openshift/api/config/v1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +func TestGetMAPIBootImageValue(t *testing.T) { + const rawProviderSpecJSON = `{"template":"some-raw-provider-spec"}` + + machineSet := &machinev1beta1.MachineSet{ + Spec: machinev1beta1.MachineSetSpec{ + Template: machinev1beta1.MachineTemplateSpec{ + Spec: machinev1beta1.MachineSpec{ + ProviderSpec: machinev1beta1.ProviderSpec{ + Value: &runtime.RawExtension{Raw: []byte(rawProviderSpecJSON)}, + }, + }, + }, + }, + } + + vsphereInfra := &osconfigv1.Infrastructure{ + Status: osconfigv1.InfrastructureStatus{ + PlatformStatus: &osconfigv1.PlatformStatus{Type: osconfigv1.VSpherePlatformType}, + }, + } + awsInfra := &osconfigv1.Infrastructure{ + Status: osconfigv1.InfrastructureStatus{ + PlatformStatus: &osconfigv1.PlatformStatus{Type: osconfigv1.AWSPlatformType}, + }, + } + + streamConfigMap := func(t *testing.T, s *stream.Stream) *corev1.ConfigMap { + t.Helper() + data, err := json.Marshal(s) + if err != nil { + t.Fatalf("failed to marshal test stream: %v", err) + } + return &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{Name: "coreos-bootimages"}, + Data: map[string]string{StreamConfigMapKey: string(data)}, + } + } + + validVSphereStream := &stream.Stream{ + Architectures: map[string]stream.Arch{ + "x86_64": { + Artifacts: map[string]stream.PlatformArtifacts{ + "vmware": {Release: "417.94.20250101"}, + }, + }, + }, + } + + cases := []struct { + name string + infra *osconfigv1.Infrastructure + configMap *corev1.ConfigMap + arch string + want string // "" means "fall back to raw providerSpec bytes" + }{ + { + name: "non-vSphere platform: raw providerSpec bytes", + infra: awsInfra, + configMap: streamConfigMap(t, validVSphereStream), + arch: "x86_64", + }, + { + name: "nil infra: raw providerSpec bytes", + infra: nil, + configMap: streamConfigMap(t, validVSphereStream), + arch: "x86_64", + }, + { + name: "nil PlatformStatus: raw providerSpec bytes", + infra: &osconfigv1.Infrastructure{}, + configMap: streamConfigMap(t, validVSphereStream), + arch: "x86_64", + }, + { + name: "nil configMap: raw providerSpec bytes", + infra: vsphereInfra, + configMap: nil, + arch: "x86_64", + }, + { + name: "vSphere with valid release for arch: release string", + infra: vsphereInfra, + configMap: streamConfigMap(t, validVSphereStream), + arch: "x86_64", + want: "417.94.20250101", + }, + { + name: "vSphere but arch not present in stream: raw providerSpec bytes", + infra: vsphereInfra, + configMap: streamConfigMap(t, validVSphereStream), + arch: "arm64", + }, + { + name: "vSphere but vmware artifact has empty release: raw providerSpec bytes", + infra: vsphereInfra, + configMap: streamConfigMap(t, &stream.Stream{ + Architectures: map[string]stream.Arch{ + "x86_64": {Artifacts: map[string]stream.PlatformArtifacts{"vmware": {Release: ""}}}, + }, + }), + arch: "x86_64", + }, + { + name: "vSphere but configMap data is unparseable: raw providerSpec bytes", + infra: vsphereInfra, + configMap: &corev1.ConfigMap{ + Data: map[string]string{StreamConfigMapKey: "not-json"}, + }, + arch: "x86_64", + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got := getMAPIBootImageValue(machineSet, tc.configMap, tc.infra, tc.arch) + want := rawProviderSpecJSON + if tc.want != "" { + want = tc.want + } + if string(got) != want { + t.Errorf("getMAPIBootImageValue() = %q, want %q", got, want) + } + }) + } +} diff --git a/pkg/controller/bootimage/platform_helpers_test.go b/pkg/controller/bootimage/platform_helpers_test.go new file mode 100644 index 0000000000..584001cd16 --- /dev/null +++ b/pkg/controller/bootimage/platform_helpers_test.go @@ -0,0 +1,112 @@ +package bootimage + +import ( + "fmt" + "strings" + "testing" + + "github.com/coreos/stream-metadata-go/stream" + corev1 "k8s.io/api/core/v1" + "k8s.io/client-go/kubernetes/fake" + + osconfigv1 "github.com/openshift/api/config/v1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" +) + +func TestReconcileVSphereProviderSpec(t *testing.T) { + const release = "417.94.20250101" + + newStream := func(t *testing.T) *stream.Stream { + t.Helper() + return newTestOVAStream(t, testArch, release) + } + + t.Run("VSphere platform spec is nil: no-op", func(t *testing.T) { + infra := &osconfigv1.Infrastructure{} + ps := &machinev1beta1.VSphereMachineProviderSpec{} + patchRequired, reconcileSkipped, newPS, _, err := reconcileVSphereProviderSpec(newStream(t), testArch, infra, ps, "ms", fake.NewClientset()) + if err != nil { + t.Fatalf("reconcileVSphereProviderSpec() unexpected error: %v", err) + } + if patchRequired || reconcileSkipped || newPS != nil { + t.Errorf("reconcileVSphereProviderSpec() = (%v, %v, %v), want (false, false, nil)", patchRequired, reconcileSkipped, newPS) + } + }) + + t.Run("missing vmware artifact for arch: error", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + ps := buildVSphereProviderSpec(vcenters[0], fd, "infra1-rhcos-fd0") + emptyStream := &stream.Stream{Architectures: map[string]stream.Arch{testArch: {}}} + + _, _, _, _, err := reconcileVSphereProviderSpec(emptyStream, testArch, infra, ps, "ms", fake.NewClientset()) + if err == nil || !strings.Contains(err.Error(), "vmware") { + t.Fatalf("reconcileVSphereProviderSpec() expected a missing-artifact error, got: %v", err) + } + }) + + t.Run("missing vsphere-creds secret: error", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + ps := buildVSphereProviderSpec(vcenters[0], fd, "infra1-rhcos-fd0") + + _, _, _, _, err := reconcileVSphereProviderSpec(newStream(t), testArch, infra, ps, "ms", fake.NewClientset()) + if err == nil || !strings.Contains(err.Error(), "failed to fetch vsphere-creds Secret") { + t.Fatalf("reconcileVSphereProviderSpec() expected a missing-secret error, got: %v", err) + } + }) + + t.Run("malformed vsphere-creds secret: error", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + ps := buildVSphereProviderSpec(vcenters[0], fd, "infra1-rhcos-fd0") + + // A secret exists, but has no credentials for this vCenter's server - reading a missing + // key from Secret.Data yields "", and vcsim (like real vCenter) rejects an empty-password + // login outright. + emptySecret := &corev1.Secret{} + emptySecret.Name = "vsphere-creds" + emptySecret.Namespace = "kube-system" + secretClient := fake.NewClientset(emptySecret) + + vc := vcenters[0] + createTestVM(t, vc, fd, "infra1-rhcos-fd0") + setVMProductVersion(t, vc, "infra1-rhcos-fd0", release) + + _, _, _, _, err := reconcileVSphereProviderSpec(newStream(t), testArch, infra, ps, "ms", secretClient) + if err == nil || !strings.Contains(err.Error(), "getClientsFromServerURL") { + t.Fatalf("reconcileVSphereProviderSpec() expected a login error, got: %v", err) + } + }) + + t.Run("success, version already matches: no-op", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secretClient := fake.NewClientset(buildVSphereCredsSecret(vcenters)) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, release) + + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + vcenters[0].activate() + + // reconcileVSphereProviderSpec always returns a DeepCopy of providerSpec regardless of + // patchRequired - it's reconcilePlatform (the generic wrapper) that nils it out when no + // patch is needed - so only patchRequired/reconcileSkipped/err are asserted here. + patchRequired, reconcileSkipped, newPS, _, err := reconcileVSphereProviderSpec(newStream(t), testArch, infra, ps, "ms", secretClient) + if err != nil { + t.Fatalf("reconcileVSphereProviderSpec() unexpected error: %v", err) + } + if patchRequired || reconcileSkipped { + t.Errorf("reconcileVSphereProviderSpec() = (%v, %v), want (false, false)", patchRequired, reconcileSkipped) + } + if newPS.Template != name { + t.Errorf("reconcileVSphereProviderSpec() unexpectedly modified providerSpec.Template: got %q, want unchanged %q", newPS.Template, name) + } + }) +} diff --git a/pkg/controller/bootimage/vsphere_create_template_test.go b/pkg/controller/bootimage/vsphere_create_template_test.go new file mode 100644 index 0000000000..37d2226353 --- /dev/null +++ b/pkg/controller/bootimage/vsphere_create_template_test.go @@ -0,0 +1,451 @@ +package bootimage + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "fmt" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + + "github.com/coreos/stream-metadata-go/stream" + "github.com/vmware/govmomi/simulator" + "github.com/vmware/govmomi/vim25/types" + + osconfigv1 "github.com/openshift/api/config/v1" + + "k8s.io/client-go/kubernetes/fake" +) + +// newTestOVAStream serves buildMinimalOVA's synthetic fixture over HTTP and returns a +// stream.Stream whose vmware/ova artifact points at it, matching what +// createNewVMTemplate expects from streamData.QueryDisk(arch, "vmware", "ova"). The server is +// torn down via t.Cleanup. +func newTestOVAStream(t *testing.T, arch, release string) *stream.Stream { + t.Helper() + + ovaPath := buildMinimalOVA(t) + content, err := os.ReadFile(ovaPath) + if err != nil { + t.Fatalf("failed to read synthetic ova fixture: %v", err) + } + sum := sha256.Sum256(content) + + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write(content) + })) + t.Cleanup(srv.Close) + + return &stream.Stream{ + Architectures: map[string]stream.Arch{ + arch: { + Artifacts: map[string]stream.PlatformArtifacts{ + "vmware": { + Release: release, + Formats: map[string]stream.ImageFormat{ + "ova": { + Disk: &stream.Artifact{ + Location: srv.URL + "/mco-test.ova", + Sha256: hex.EncodeToString(sum[:]), + }, + }, + }, + }, + }, + }, + }, + } +} + +// setVMProductVersion mutates a simulated VM's Summary.Config.Product.Version directly (bypassing +// the OVF import path, which never sets product info) so tests can control the "existing +// template's RHCOS version" that createNewVMTemplate compares against the desired release. +// version == "" leaves Product set but empty (VAppProductInfo.Version defaults to ""). +func setVMProductVersion(t *testing.T, vc *simulatedVCenter, vmName, version string) { + t.Helper() + ctx := context.Background() + + vm, err := vc.Finder.VirtualMachine(ctx, vmName) + if err != nil { + t.Fatalf("setVMProductVersion: failed to find VM %q: %v", vmName, err) + } + simVM, ok := vc.Registry.Get(vm.Reference()).(*simulator.VirtualMachine) + if !ok { + t.Fatalf("setVMProductVersion: %q is not a simulator.VirtualMachine", vmName) + } + simVM.Summary.Config.Product = &types.VAppProductInfo{Version: version} +} + +// clearVMProduct nils out a simulated VM's Summary.Config.Product entirely. +func clearVMProduct(t *testing.T, vc *simulatedVCenter, vmName string) { + t.Helper() + ctx := context.Background() + + vm, err := vc.Finder.VirtualMachine(ctx, vmName) + if err != nil { + t.Fatalf("clearVMProduct: failed to find VM %q: %v", vmName, err) + } + simVM, ok := vc.Registry.Get(vm.Reference()).(*simulator.VirtualMachine) + if !ok { + t.Fatalf("clearVMProduct: %q is not a simulator.VirtualMachine", vmName) + } + simVM.Summary.Config.Product = nil +} + +const testArch = "x86_64" + +func TestCreateNewVMTemplate(t *testing.T) { + const release = "417.94.20250101" + + t.Run("multi-vCenter, multi-failure-domain: only the matching vCenter+FD is touched", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 2) + fd0 := buildFailureDomain(vcenters[0], "fd0") + fd1 := buildFailureDomain(vcenters[1], "fd1") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd0, fd1}) + secret := buildVSphereCredsSecret(vcenters) + + name0 := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd0.Name) + createTestVM(t, vcenters[0], fd0, name0) + setVMProductVersion(t, vcenters[0], name0, release) + + ps := buildVSphereProviderSpec(vcenters[0], fd0, name0) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + gotName, patchRequired, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + if patchRequired { + t.Errorf("createNewVMTemplate() patchRequired = true, want false (version already matches, template name already correct)") + } + if gotName != "" { + t.Errorf("createNewVMTemplate() name = %q, want empty (no-op path returns no name)", gotName) + } + + // vcenters[1] must never have been touched: no VM should exist there at all, since + // fd1's Server never matches vcenters[0]'s server and vcenters[0]'s Server never + // matches fd1 either - the loop should skip it without ever calling + // getClientsFromServerURL for it. Re-activate vcenters[1] first: govmomi v0.45.1's + // simulator routes every vim25 SOAP request through the package-level simulator.Map + // global regardless of which server received it (see activate()'s doc comment), so + // without this the query below would silently run against vcenters[0]'s registry. + vcenters[1].activate() + if _, err := vcenters[1].Finder.VirtualMachine(context.Background(), name0); err == nil { + t.Errorf("createNewVMTemplate() touched vcenters[1], which does not own fd0") + } + }) + + t.Run("existing template version mismatch triggers a real OVA rebuild", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, "416.94.20240101") // stale version + // createNewVMTemplateWithNameForFailureDomain tags the freshly-imported VM using + // infra.Status.InfrastructureName as govmomi's AttachTag "tagID" argument. govmomi's + // vapi/tags.Manager treats any non-"urn:"-prefixed string as a tag *name* and resolves it + // to the real tag ID via a lookup (tags.isName/tagID) - matching how + // openshift-installer's createClusterTagID creates a tag literally named after the infra + // ID at cluster install time. Without this fixture the real cluster precondition is + // missing and attachTag would fail with "tag not found", not because vcsim can't do it. + createInfraTag(t, vcenters[0], infra.Status.InfrastructureName) + + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + gotName, patchRequired, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + if !patchRequired { + t.Errorf("createNewVMTemplate() patchRequired = false, want true (version mismatch should trigger a rebuild)") + } + if gotName != name { + t.Errorf("createNewVMTemplate() name = %q, want %q", gotName, name) + } + + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), name); err != nil { + t.Errorf("createNewVMTemplate() did not leave a VM named %q behind: %v", name, err) + } + tempName := AtomicTempName("mco-tmp", name) + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), tempName); err == nil { + t.Errorf("createNewVMTemplate() left a stale temp VM behind under %q", tempName) + } + }) + + t.Run("providerSpec.Template diverges from computed name, version already matches: rename only, no vSphere calls", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + existingVM := createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, release) + + // This is the PR #6234 bug scenario: providerSpec.Template is a custom/non-standard + // name, not the name MCO would compute for this failure domain. + ps := buildVSphereProviderSpec(vcenters[0], fd, "some-custom-template-name") + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + gotName, patchRequired, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + if !patchRequired || gotName != name { + t.Errorf("createNewVMTemplate() = (%q, %v), want (%q, true) to reconcile providerSpec.Template only", gotName, patchRequired, name) + } + + found, err := vcenters[0].Finder.VirtualMachine(context.Background(), name) + if err != nil { + t.Fatalf("expected VM %q to still exist: %v", name, err) + } + if found.Reference().Value != existingVM.Reference().Value { + t.Errorf("createNewVMTemplate() replaced the existing VM when it should not have touched vSphere at all") + } + }) + + t.Run("providerSpec.Template is a custom name pointing at a current VM: preserved without patch", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, release) + + customName := "my-custom-rhcos-template" + createTestVM(t, vcenters[0], fd, customName) + setVMProductVersion(t, vcenters[0], customName, release) + + ps := buildVSphereProviderSpec(vcenters[0], fd, customName) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + gotName, patchRequired, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + if patchRequired { + t.Errorf("createNewVMTemplate() patchRequired = true, want false (custom template %q is already at release %s)", customName, release) + } + if gotName != "" { + t.Errorf("createNewVMTemplate() name = %q, want empty (no-op when custom template is current)", gotName) + } + }) + + t.Run("providerSpec.Template is outdated but computed name already has a current template: switches back without rebuilding, no collision", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + existingComputedVM := createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, release) + + customName := "my-outdated-custom-template" + createTestVM(t, vcenters[0], fd, customName) + setVMProductVersion(t, vcenters[0], customName, "416.94.20240101") + + ps := buildVSphereProviderSpec(vcenters[0], fd, customName) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + gotName, patchRequired, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + if !patchRequired || gotName != name { + t.Errorf("createNewVMTemplate() = (%q, %v), want (%q, true) (should switch providerSpec.Template back to the already-current computed name)", gotName, patchRequired, name) + } + + // The computed name's template must be the same VM as before the call: since it was + // already current, createNewVMTemplate should just point providerSpec.Template back at it + // rather than colliding with it via a rebuild. + found, err := vcenters[0].Finder.VirtualMachine(context.Background(), name) + if err != nil { + t.Fatalf("expected VM %q to still exist: %v", name, err) + } + if found.Reference().Value != existingComputedVM.Reference().Value { + t.Errorf("createNewVMTemplate() replaced the existing current template at %q instead of switching back to it", name) + } + + // The outdated custom-named VM must be left alone — the fix only stops using it as + // providerSpec.Template, it does not touch or destroy it. + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), customName); err != nil { + t.Errorf("createNewVMTemplate() should not have touched the outdated custom template %q: %v", customName, err) + } + + // No atomic swap should have been attempted for the computed name. + for _, prefix := range []string{"mco-tmp", "mco-old"} { + tempName := AtomicTempName(prefix, name) + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), tempName); err == nil { + t.Errorf("createNewVMTemplate() should not have created a %q temp VM %q; no rebuild should have occurred", prefix, tempName) + } + } + }) + + t.Run("providerSpec.Template is outdated and computed name has no current template: rebuilds and converges to computed name", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + + customName := "my-outdated-custom-template" + createTestVM(t, vcenters[0], fd, customName) + setVMProductVersion(t, vcenters[0], customName, "416.94.20240101") + // The version mismatch drives createNewVMTemplate into the real OVA rebuild path, which + // tags the freshly-imported VM using infra.Status.InfrastructureName as the AttachTag + // "tagID" argument; see the identical fixture on the "existing template version mismatch" + // subtest above for why the tag must actually exist in the simulator. + createInfraTag(t, vcenters[0], infra.Status.InfrastructureName) + + ps := buildVSphereProviderSpec(vcenters[0], fd, customName) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + gotName, patchRequired, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + if !patchRequired || gotName != name { + t.Errorf("createNewVMTemplate() = (%q, %v), want (%q, true) (outdated custom template should be rebuilt into the computed name)", gotName, patchRequired, name) + } + + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), name); err != nil { + t.Errorf("createNewVMTemplate() did not leave a VM named %q behind: %v", name, err) + } + tempName := AtomicTempName("mco-tmp", name) + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), tempName); err == nil { + t.Errorf("createNewVMTemplate() left a stale temp VM behind under %q", tempName) + } + }) + + t.Run("template not found but mco-old rollback VM present: recovers from a mid-swap crash", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + oldTempName := AtomicTempName("mco-old", name) + // Simulate a crash between the two renames of a prior atomic swap: the rollback VM + // exists under its temp name, but nothing exists yet under the production name. + createTestVM(t, vcenters[0], fd, oldTempName) + setVMProductVersion(t, vcenters[0], oldTempName, release) + + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + _, _, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err != nil { + t.Fatalf("createNewVMTemplate() unexpected error: %v", err) + } + + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), name); err != nil { + t.Errorf("createNewVMTemplate() did not recover the rollback VM under %q: %v", name, err) + } + if _, err := vcenters[0].Finder.VirtualMachine(context.Background(), oldTempName); err == nil { + t.Errorf("createNewVMTemplate() left the rollback VM behind under %q", oldTempName) + } + }) + + t.Run("template not found and no rollback VM present: error", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + _, _, err := createNewVMTemplate(streamData, ps, infra, secret, fake.NewSimpleClientset(), testArch, release) + if err == nil || !strings.Contains(err.Error(), "failed to determine disk provisioning type") { + t.Fatalf("createNewVMTemplate() expected a disk-provisioning-type error, got: %v", err) + } + }) + + t.Run("existing template has no product info: error", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + createTestVM(t, vcenters[0], fd, name) + clearVMProduct(t, vcenters[0], name) + + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + _, _, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err == nil || !strings.Contains(err.Error(), "unable to determine RHCOS version") { + t.Fatalf("createNewVMTemplate() expected an RHCOS-version error, got: %v", err) + } + }) + + t.Run("existing template has empty product version: error", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + fd := buildFailureDomain(vcenters[0], "fd0") + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, "") + + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + _, _, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err == nil || !strings.Contains(err.Error(), "unable to determine RHCOS version") { + t.Fatalf("createNewVMTemplate() expected an RHCOS-version error, got: %v", err) + } + }) + + t.Run("computed name exceeds 80 characters: error before touching vSphere", func(t *testing.T) { + vcenters := newSimulatedVCenters(t, 1) + longFDName := strings.Repeat("x", 80) + fd := buildFailureDomain(vcenters[0], longFDName) + infra := buildVSphereInfra("infra1", vcenters, []osconfigv1.VSpherePlatformFailureDomainSpec{fd}) + secret := buildVSphereCredsSecret(vcenters) + + name := fmt.Sprintf("%s-rhcos-%s", infra.Status.InfrastructureName, fd.Name) + if len(name) <= 80 { + t.Fatalf("test setup bug: computed name %q is not over 80 characters", name) + } + // No VM created under `name` at all: findAllRequiredResources's rollback-recovery path + // would fail first if we didn't have a version mismatch to reach the length check, so + // instead create the VM under the (too-long) name directly to reach the version-compare + // and length-check code first. + createTestVM(t, vcenters[0], fd, name) + setVMProductVersion(t, vcenters[0], name, "416.94.20240101") // force a version mismatch + + ps := buildVSphereProviderSpec(vcenters[0], fd, name) + streamData := newTestOVAStream(t, testArch, release) + + vcenters[0].activate() + _, _, err := createNewVMTemplate(streamData, ps, infra, secret, nil, testArch, release) + if err == nil || !strings.Contains(err.Error(), "exceeds the permitted limit") { + t.Fatalf("createNewVMTemplate() expected an 80-character-limit error, got: %v", err) + } + }) +} diff --git a/pkg/controller/bootimage/vsphere_helpers_test.go b/pkg/controller/bootimage/vsphere_helpers_test.go index 1f77db8bb7..ca6abda9dd 100644 --- a/pkg/controller/bootimage/vsphere_helpers_test.go +++ b/pkg/controller/bootimage/vsphere_helpers_test.go @@ -1,10 +1,16 @@ package bootimage import ( + "os" + "path/filepath" + "strings" "testing" "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/ovf" + "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" + "k8s.io/utils/ptr" machinev1beta1 "github.com/openshift/api/machine/v1beta1" "github.com/stretchr/testify/assert" @@ -112,3 +118,261 @@ func TestIsInFolder(t *testing.T) { }) } } + +func TestCheckOvaSecureBoot(t *testing.T) { + cases := []struct { + name string + envelope *ovf.Envelope + want bool + }{ + { + name: "nil virtual system", + envelope: &ovf.Envelope{}, + want: false, + }, + { + name: "secure boot enabled", + envelope: &ovf.Envelope{ + VirtualSystem: &ovf.VirtualSystem{ + VirtualHardware: []ovf.VirtualHardwareSection{ + {Config: []ovf.Config{{Key: "bootOptions.efiSecureBootEnabled", Value: "true"}}}, + }, + }, + }, + want: true, + }, + { + name: "secure boot explicitly disabled", + envelope: &ovf.Envelope{ + VirtualSystem: &ovf.VirtualSystem{ + VirtualHardware: []ovf.VirtualHardwareSection{ + {Config: []ovf.Config{{Key: "bootOptions.efiSecureBootEnabled", Value: "false"}}}, + }, + }, + }, + want: false, + }, + { + name: "config key absent", + envelope: &ovf.Envelope{ + VirtualSystem: &ovf.VirtualSystem{ + VirtualHardware: []ovf.VirtualHardwareSection{ + {Config: []ovf.Config{{Key: "some.other.key", Value: "true"}}}, + }, + }, + }, + want: false, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := checkOvaSecureBoot(tc.envelope); got != tc.want { + t.Errorf("checkOvaSecureBoot() = %v, want %v", got, tc.want) + } + }) + } +} + +func TestIsDatastoreAvailable(t *testing.T) { + ds := object.NewDatastore(nil, types.ManagedObjectReference{Type: "Datastore", Value: "datastore-1"}) + otherDS := types.ManagedObjectReference{Type: "Datastore", Value: "datastore-2"} + + cases := []struct { + name string + hosts []types.ManagedObjectReference + want bool + }{ + {name: "matching datastore present", hosts: []types.ManagedObjectReference{ds.Reference(), otherDS}, want: true}, + {name: "matching datastore absent", hosts: []types.ManagedObjectReference{otherDS}, want: false}, + {name: "no datastores on host", hosts: nil, want: false}, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := isDatastoreAvailable(ds, tc.hosts); got != tc.want { + t.Errorf("isDatastoreAvailable() = %v, want %v", got, tc.want) + } + }) + } +} + +func TestIsNetworkAvailable(t *testing.T) { + standardNet := object.NewNetwork(nil, types.ManagedObjectReference{Type: "Network", Value: "network-1"}) + otherNet := types.ManagedObjectReference{Type: "Network", Value: "network-2"} + dvpg := object.NewDistributedVirtualPortgroup(nil, types.ManagedObjectReference{Type: "DistributedVirtualPortgroup", Value: "dvportgroup-1"}) + + cases := []struct { + name string + network object.NetworkReference + hosts []types.ManagedObjectReference + want bool + }{ + {name: "standard portgroup present on host", network: standardNet, hosts: []types.ManagedObjectReference{standardNet.Reference(), otherNet}, want: true}, + {name: "standard portgroup absent from host", network: standardNet, hosts: []types.ManagedObjectReference{otherNet}, want: false}, + {name: "distributed portgroup always available", network: dvpg, hosts: []types.ManagedObjectReference{otherNet}, want: true}, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := isNetworkAvailable(tc.network, tc.hosts); got != tc.want { + t.Errorf("isNetworkAvailable() = %v, want %v", got, tc.want) + } + }) + } +} + +func TestGetDiskTypeFromExistingVM(t *testing.T) { + newVM := func(backing types.BaseVirtualDeviceBackingInfo) mo.VirtualMachine { + var devices []types.BaseVirtualDevice + if backing != nil { + devices = append(devices, &types.VirtualDisk{ + VirtualDevice: types.VirtualDevice{Backing: backing}, + }) + } + return mo.VirtualMachine{ + Config: &types.VirtualMachineConfigInfo{ + Hardware: types.VirtualHardware{Device: devices}, + }, + } + } + + cases := []struct { + name string + vm mo.VirtualMachine + want string + }{ + { + name: "thin provisioned", + vm: newVM(&types.VirtualDiskFlatVer2BackingInfo{ThinProvisioned: ptr.To(true)}), + want: "thin", + }, + { + name: "thick provisioned (lazy zeroed)", + vm: newVM(&types.VirtualDiskFlatVer2BackingInfo{ThinProvisioned: ptr.To(false)}), + want: "thick", + }, + { + name: "eager zeroed thick", + vm: newVM(&types.VirtualDiskFlatVer2BackingInfo{ThinProvisioned: ptr.To(false), EagerlyScrub: ptr.To(true)}), + want: "eagerZeroedThick", + }, + { + name: "thin provisioned flag unset", + vm: newVM(&types.VirtualDiskFlatVer2BackingInfo{}), + want: "", + }, + { + name: "no disk device present", + vm: newVM(nil), + want: "", + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := getDiskTypeFromExistingVM(tc.vm); got != tc.want { + t.Errorf("getDiskTypeFromExistingVM() = %q, want %q", got, tc.want) + } + }) + } +} + +func TestAtomicTempName(t *testing.T) { + nameA := AtomicTempName("mco-tmp", "cluster-rhcos-fd1") + nameB := AtomicTempName("mco-tmp", "cluster-rhcos-fd1") + nameC := AtomicTempName("mco-tmp", "cluster-rhcos-fd2") + + if nameA != nameB { + t.Errorf("AtomicTempName() is not deterministic: %q != %q", nameA, nameB) + } + if nameA == nameC { + t.Errorf("AtomicTempName() collided for different inputs: %q", nameA) + } + if len(nameA) != 16 { + t.Errorf("AtomicTempName() length = %d, want 16", len(nameA)) + } + if !strings.HasPrefix(nameA, "mco-tmp-") { + t.Errorf("AtomicTempName() = %q, want prefix %q", nameA, "mco-tmp-") + } +} + +func TestGetCISP(t *testing.T) { + envelope := &ovf.Envelope{ + Network: &ovf.NetworkSection{Networks: []ovf.Network{{Name: "nat"}}}, + } + networkRef := object.NewNetwork(nil, types.ManagedObjectReference{Type: "Network", Value: "network-1"}) + + cases := []struct { + name string + diskType string + wantErr bool + wantProvType string + }{ + {name: "unspecified disk type uses vsphere default policy", diskType: "", wantProvType: ""}, + {name: "thin", diskType: "thin", wantProvType: string(types.OvfCreateImportSpecParamsDiskProvisioningTypeThin)}, + {name: "thick", diskType: "thick", wantProvType: string(types.OvfCreateImportSpecParamsDiskProvisioningTypeThick)}, + {name: "eagerZeroedThick", diskType: "eagerZeroedThick", wantProvType: string(types.OvfCreateImportSpecParamsDiskProvisioningTypeEagerZeroedThick)}, + {name: "invalid disk type", diskType: "bogus", wantErr: true}, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + cisp, err := getCISP(envelope, networkRef, "my-template", tc.diskType) + if tc.wantErr { + if err == nil { + t.Fatalf("getCISP() expected an error, got nil") + } + return + } + if err != nil { + t.Fatalf("getCISP() unexpected error: %v", err) + } + if cisp.EntityName != "my-template" { + t.Errorf("cisp.EntityName = %q, want %q", cisp.EntityName, "my-template") + } + if cisp.DiskProvisioning != tc.wantProvType { + t.Errorf("cisp.DiskProvisioning = %q, want %q", cisp.DiskProvisioning, tc.wantProvType) + } + if len(cisp.NetworkMapping) != 1 || cisp.NetworkMapping[0].Name != "nat" { + t.Errorf("cisp.NetworkMapping = %+v, want a single mapping for %q", cisp.NetworkMapping, "nat") + } + if cisp.NetworkMapping[0].Network != networkRef.Reference() { + t.Errorf("cisp.NetworkMapping[0].Network = %+v, want %+v", cisp.NetworkMapping[0].Network, networkRef.Reference()) + } + }) + } +} + +func TestDebugCorruptOva(t *testing.T) { + dir := t.TempDir() + path := filepath.Join(dir, "corrupt.ova") + content := []byte("not a real ova") + if err := os.WriteFile(path, content, 0o644); err != nil { + t.Fatalf("failed to write test file: %v", err) + } + + origErr := "failed to parse ovf descriptor" + err := debugCorruptOva(path, errUnwrappable(origErr)) + if err == nil { + t.Fatalf("debugCorruptOva() returned nil error") + } + + msg := err.Error() + if !strings.Contains(msg, origErr) { + t.Errorf("debugCorruptOva() error %q does not contain original error %q", msg, origErr) + } + if !strings.Contains(msg, path) { + t.Errorf("debugCorruptOva() error %q does not contain file path %q", msg, path) + } + if !strings.Contains(msg, "sha256") { + t.Errorf("debugCorruptOva() error %q does not mention sha256", msg) + } + if !strings.Contains(msg, "size of 14 bytes") { + t.Errorf("debugCorruptOva() error %q does not report the correct file size", msg) + } +} + +type errUnwrappable string + +func (e errUnwrappable) Error() string { return string(e) } diff --git a/pkg/controller/bootimage/vsphere_object_helpers_test.go b/pkg/controller/bootimage/vsphere_object_helpers_test.go new file mode 100644 index 0000000000..e065b59b0d --- /dev/null +++ b/pkg/controller/bootimage/vsphere_object_helpers_test.go @@ -0,0 +1,340 @@ +package bootimage + +import ( + "context" + "fmt" + "path" + "strings" + "sync/atomic" + "testing" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator" + "github.com/vmware/govmomi/vapi/tags" + "github.com/vmware/govmomi/vim25/types" + + osconfigv1 "github.com/openshift/api/config/v1" +) + +var testTagCounter atomic.Int64 + +// createTestVM builds a real named, templated VM directly (folder.CreateVM + MarkAsTemplate), +// without going through the OVA import flow. Deliberately lighter-weight than driving +// createNewVMTemplateWithNameForFailureDomain: that function always stages the new VM under a +// deterministic "mco-tmp-" name derived from the *final* name before renaming it, and +// vcsim's Rename does not relocate a VM's underlying datastore folder - so a fixture built that +// way would permanently occupy the "mco-tmp-" folder for this name, and any later real +// import driven by the code under test (which reuses that same deterministic tempName) would +// fail with FileAlreadyExists. Building the fixture directly under its final name sidesteps that +// vcsim fidelity gap entirely. +func createTestVM(t *testing.T, vc *simulatedVCenter, fd osconfigv1.VSpherePlatformFailureDomainSpec, name string) *object.VirtualMachine { + t.Helper() + vc.activate() + ctx := context.Background() + + ps := buildVSphereProviderSpec(vc, fd, name) + vr, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, name) + if err != nil { + t.Fatalf("createTestVM: findAllRequiredResources failed: %v", err) + } + if vr.existingVM != nil { + t.Fatalf("createTestVM: a VM named %q already exists", name) + } + + spec := types.VirtualMachineConfigSpec{ + Name: name, + GuestId: string(types.VirtualMachineGuestOsIdentifierOtherGuest), + Files: &types.VirtualMachineFileInfo{VmPathName: fmt.Sprintf("[%s]", path.Base(vc.DatastorePath))}, + } + task, err := vr.folder.CreateVM(ctx, spec, vr.resourcePool, nil) + if err != nil { + t.Fatalf("createTestVM: CreateVM failed: %v", err) + } + info, err := task.WaitForResult(ctx) + if err != nil { + t.Fatalf("createTestVM: CreateVM task failed: %v", err) + } + vmRef, ok := info.Result.(types.ManagedObjectReference) + if !ok { + t.Fatalf("createTestVM: unexpected CreateVM task result type %T", info.Result) + } + newVM := object.NewVirtualMachine(vc.Client.Client, vmRef) + if err := newVM.MarkAsTemplate(ctx); err != nil { + t.Fatalf("createTestVM: MarkAsTemplate failed: %v", err) + } + + vm, err := vc.Finder.VirtualMachine(ctx, name) + if err != nil { + t.Fatalf("createTestVM: failed to find newly created fixture VM %q: %v", name, err) + } + return vm +} + +// createTestTag creates a tag category and a single tag within it, returning the tag's ID. +func createTestTag(t *testing.T, vc *simulatedVCenter) string { + t.Helper() + ctx := context.Background() + + n := testTagCounter.Add(1) + categoryID, err := vc.TagManager.CreateCategory(ctx, &tags.Category{ + Name: fmt.Sprintf("mco-test-category-%d", n), + Cardinality: "SINGLE", + AssociableTypes: []string{"VirtualMachine"}, + }) + if err != nil { + t.Fatalf("createTestTag: failed to create category: %v", err) + } + + tagID, err := vc.TagManager.CreateTag(ctx, &tags.Tag{ + Name: fmt.Sprintf("mco-test-tag-%d", n), + CategoryID: categoryID, + }) + if err != nil { + t.Fatalf("createTestTag: failed to create tag: %v", err) + } + return tagID +} + +// createInfraTag creates a category+tag mirroring what openshift-installer sets up at cluster +// install time (installer/pkg/infrastructure/vsphere/clusterapi/tags.go:createClusterTagID): +// a category named "openshift-" containing a tag whose NAME (not ID) is exactly +// infraName. createNewVMTemplateWithNameForFailureDomain's attachTag call passes +// infra.Status.InfrastructureName straight through as govmomi's tagID argument; govmomi's +// vapi/tags.Manager treats any non-"urn:"-prefixed string as a name and transparently resolves +// it to the real tag ID via a name lookup (see tags.isName/tagID), so this - not a raw ID - +// is the fixture that actually matches production/installer behavior. +func createInfraTag(t *testing.T, vc *simulatedVCenter, infraName string) { + t.Helper() + ctx := context.Background() + + categoryID, err := vc.TagManager.CreateCategory(ctx, &tags.Category{ + Name: fmt.Sprintf("openshift-%s", infraName), + Cardinality: "SINGLE", + AssociableTypes: []string{"VirtualMachine"}, + }) + if err != nil { + t.Fatalf("createInfraTag: failed to create category: %v", err) + } + if _, err := vc.TagManager.CreateTag(ctx, &tags.Tag{ + Name: infraName, + CategoryID: categoryID, + }); err != nil { + t.Fatalf("createInfraTag: failed to create tag: %v", err) + } +} + +func TestGetClientsFromServerURL(t *testing.T) { + vc := newSimulatedVCenter(t) + ctx := context.Background() + + t.Run("success", func(t *testing.T) { + client, tagManager, err := getClientsFromServerURL(ctx, vc.Server, vc.Username, vc.Password) + if err != nil { + t.Fatalf("getClientsFromServerURL() unexpected error: %v", err) + } + if client == nil || tagManager == nil { + t.Fatalf("getClientsFromServerURL() returned nil client or tagManager") + } + defer client.Logout(ctx) + }) + + t.Run("unreachable host", func(t *testing.T) { + _, _, err := getClientsFromServerURL(ctx, "127.0.0.1:1", vc.Username, vc.Password) + if err == nil { + t.Fatalf("getClientsFromServerURL() expected an error for an unreachable host") + } + }) +} + +func TestFindAllRequiredResources(t *testing.T) { + vc := newSimulatedVCenter(t) + ctx := context.Background() + fd := buildFailureDomain(vc, "fd0") + + t.Run("happy path, no existing VM", func(t *testing.T) { + ps := buildVSphereProviderSpec(vc, fd, "does-not-exist-yet") + vr, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, "does-not-exist-yet") + if err != nil { + t.Fatalf("findAllRequiredResources() unexpected error: %v", err) + } + if vr.folder == nil || vr.cluster == nil || vr.resourcePool == nil || vr.networkRef == nil || vr.datastore == nil { + t.Fatalf("findAllRequiredResources() left a required resource nil: %+v", vr) + } + if vr.existingVM != nil { + t.Fatalf("findAllRequiredResources() found an existingVM that should not exist") + } + }) + + t.Run("existing VM is resolved", func(t *testing.T) { + name := "existing-template" + createTestVM(t, vc, fd, name) + + ps := buildVSphereProviderSpec(vc, fd, name) + vr, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, name) + if err != nil { + t.Fatalf("findAllRequiredResources() unexpected error: %v", err) + } + if vr.existingVM == nil { + t.Fatalf("findAllRequiredResources() did not find the existing VM") + } + }) + + t.Run("bad folder", func(t *testing.T) { + ps := buildVSphereProviderSpec(vc, fd, "x") + ps.Workspace.Folder = "/DC0/vm/does-not-exist" + if _, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, "x"); err == nil || !strings.Contains(err.Error(), "failed to find folder") { + t.Fatalf("findAllRequiredResources() expected a folder-not-found error, got: %v", err) + } + }) + + t.Run("bad cluster", func(t *testing.T) { + ps := buildVSphereProviderSpec(vc, fd, "x") + badFD := fd + badFD.Topology.ComputeCluster = "/DC0/host/does-not-exist" + if _, err := findAllRequiredResources(ctx, vc.Finder, ps, badFD, nil, "x"); err == nil || !strings.Contains(err.Error(), "failed to find compute cluster") { + t.Fatalf("findAllRequiredResources() expected a cluster-not-found error, got: %v", err) + } + }) + + t.Run("bad resource pool", func(t *testing.T) { + ps := buildVSphereProviderSpec(vc, fd, "x") + ps.Workspace.ResourcePool = "/DC0/host/DC0_C0/Resources/does-not-exist" + if _, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, "x"); err == nil || !strings.Contains(err.Error(), "failed to find resource pool") { + t.Fatalf("findAllRequiredResources() expected a resource-pool-not-found error, got: %v", err) + } + }) + + t.Run("bad network", func(t *testing.T) { + ps := buildVSphereProviderSpec(vc, fd, "x") + badFD := fd + badFD.Topology.Networks = []string{"does-not-exist"} + if _, err := findAllRequiredResources(ctx, vc.Finder, ps, badFD, nil, "x"); err == nil || !strings.Contains(err.Error(), "failed to find network") { + t.Fatalf("findAllRequiredResources() expected a network-not-found error, got: %v", err) + } + }) + + t.Run("bad datastore", func(t *testing.T) { + ps := buildVSphereProviderSpec(vc, fd, "x") + ps.Workspace.Datastore = "/DC0/datastore/does-not-exist" + if _, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, "x"); err == nil || !strings.Contains(err.Error(), "failed to find datastore") { + t.Fatalf("findAllRequiredResources() expected a datastore-not-found error, got: %v", err) + } + }) +} + +func TestFindAvailableHostSystems(t *testing.T) { + vc := newSimulatedVCenter(t) + ctx := context.Background() + fd := buildFailureDomain(vc, "fd0") + ps := buildVSphereProviderSpec(vc, fd, "x") + + vr, err := findAllRequiredResources(ctx, vc.Finder, ps, fd, nil, "x") + if err != nil { + t.Fatalf("setup: findAllRequiredResources failed: %v", err) + } + hosts, err := vr.cluster.Hosts(ctx) + if err != nil || len(hosts) == 0 { + t.Fatalf("setup: failed to list cluster hosts: %v", err) + } + + t.Run("a healthy host with network+datastore is selected", func(t *testing.T) { + host, err := findAvailableHostSystems(ctx, hosts, vr.networkRef, vr.datastore) + if err != nil { + t.Fatalf("findAvailableHostSystems() unexpected error: %v", err) + } + if host == nil { + t.Fatalf("findAvailableHostSystems() returned a nil host") + } + }) + + t.Run("all hosts unavailable", func(t *testing.T) { + unavailableRef := vr.networkRef.Reference() + unavailableRef.Value = "does-not-exist" + bogusNetwork := object.NewNetwork(vc.Client.Client, unavailableRef) + + if _, err := findAvailableHostSystems(ctx, hosts, bogusNetwork, vr.datastore); err == nil { + t.Fatalf("findAvailableHostSystems() expected an error when no host has the required network") + } + }) + + t.Run("host in maintenance mode is skipped", func(t *testing.T) { + hostObj := vc.Registry.Get(hosts[0].Reference()).(*simulator.HostSystem) + hostObj.Runtime.InMaintenanceMode = true + t.Cleanup(func() { hostObj.Runtime.InMaintenanceMode = false }) + + host, err := findAvailableHostSystems(ctx, hosts[:1], vr.networkRef, vr.datastore) + if err == nil { + t.Fatalf("findAvailableHostSystems() expected an error, the only host is in maintenance mode, got host %v", host) + } + }) +} + +func TestDestroyVMIfPresent(t *testing.T) { + vc := newSimulatedVCenter(t) + ctx := context.Background() + fd := buildFailureDomain(vc, "fd0") + + t.Run("no-op when VM does not exist", func(t *testing.T) { + if err := destroyVMIfPresent(ctx, vc.Finder, "does-not-exist"); err != nil { + t.Fatalf("destroyVMIfPresent() unexpected error for absent VM: %v", err) + } + }) + + t.Run("destroys an existing VM", func(t *testing.T) { + name := "to-be-destroyed" + createTestVM(t, vc, fd, name) + + if err := destroyVMIfPresent(ctx, vc.Finder, name); err != nil { + t.Fatalf("destroyVMIfPresent() unexpected error: %v", err) + } + if _, err := vc.Finder.VirtualMachine(ctx, name); err == nil { + t.Fatalf("destroyVMIfPresent() did not actually destroy the VM") + } + }) +} + +func TestSwapTemplate(t *testing.T) { + vc := newSimulatedVCenter(t) + ctx := context.Background() + fd := buildFailureDomain(vc, "fd0") + + prodName := "prod-template" + existingVM := createTestVM(t, vc, fd, prodName) + newVM := createTestVM(t, vc, fd, "new-incoming-template") + oldTempName := AtomicTempName("mco-old", prodName) + + if err := swapTemplate(ctx, existingVM, newVM, prodName, oldTempName); err != nil { + t.Fatalf("swapTemplate() unexpected error: %v", err) + } + + found, err := vc.Finder.VirtualMachine(ctx, prodName) + if err != nil { + t.Fatalf("swapTemplate() left no VM named %q: %v", prodName, err) + } + if found.Reference().Value != newVM.Reference().Value { + t.Fatalf("swapTemplate() left the wrong VM under %q", prodName) + } + if _, err := vc.Finder.VirtualMachine(ctx, oldTempName); err == nil { + t.Fatalf("swapTemplate() left the old VM behind under %q instead of destroying it", oldTempName) + } +} + +func TestAttachTag(t *testing.T) { + vc := newSimulatedVCenter(t) + ctx := context.Background() + fd := buildFailureDomain(vc, "fd0") + vm := createTestVM(t, vc, fd, "tag-target") + tagID := createTestTag(t, vc) + + t.Run("success", func(t *testing.T) { + if err := attachTag(ctx, vc.TagManager, vm.Reference().Value, tagID); err != nil { + t.Fatalf("attachTag() unexpected error: %v", err) + } + }) + + t.Run("invalid tag ID", func(t *testing.T) { + if err := attachTag(ctx, vc.TagManager, vm.Reference().Value, "bogus-tag-id"); err == nil { + t.Fatalf("attachTag() expected an error for an invalid tag ID") + } + }) +} diff --git a/pkg/controller/bootimage/vsphere_ova_import_spike_test.go b/pkg/controller/bootimage/vsphere_ova_import_spike_test.go new file mode 100644 index 0000000000..08c311087f --- /dev/null +++ b/pkg/controller/bootimage/vsphere_ova_import_spike_test.go @@ -0,0 +1,268 @@ +package bootimage + +import ( + "archive/tar" + "context" + "crypto/tls" + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/vmware/govmomi" + "github.com/vmware/govmomi/find" + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/ovf" + "github.com/vmware/govmomi/ovf/importer" + "github.com/vmware/govmomi/simulator" +) + +// minimalOVFTemplate is a hand-trimmed OVF descriptor (structurally modeled on govmomi's own +// govc/test fixture ovf/fixtures/ttylinux.ovf) referencing a tiny synthetic disk instead of a +// real VMDK. CreateImportSpec only parses this XML text; it never reads the referenced disk +// file, so the disk payload does not need to be a valid VMDK bitstream. +const minimalOVFTemplate = ` + + + + + + Virtual disk information + + + + The list of logical networks + + The nat network + + + + A virtual machine + mco-test-vm + + The kind of installed guest operating system + + + Virtual hardware requirements + + Virtual Hardware Family + 0 + mco-test-vm + vmx-09 + + + hertz * 10^6 + Number of Virtual CPUs + 1 virtual CPU(s) + 1 + 3 + 1 + + + byte * 2^20 + Memory Size + 32MB of memory + 2 + 4 + 32 + + + 0 + IDE Controller + ideController0 + 3 + 5 + + + 0 + disk0 + ovf:/disk/vmdisk1 + 4 + 3 + 17 + + + 1 + true + nat + E1000 ethernet adapter on "nat" + ethernet0 + 5 + E1000 + 10 + + + +` + +// buildMinimalOVA writes a tiny synthetic .ova (a plain tar of a hand-written .ovf plus a +// dummy disk payload) to a temp dir and returns its path. Used to spike/exercise the OVF +// import flow (CreateImportSpec -> ImportVApp -> NFC lease upload) against vcsim without +// needing a real multi-megabyte RHCOS/ttylinux OVA fixture checked into the repo. +func buildMinimalOVA(t *testing.T) string { + t.Helper() + + diskContent := []byte("not-a-real-vmdk-just-bytes-for-the-nfc-lease-to-store") + ovfXML := fmt.Sprintf(minimalOVFTemplate, len(diskContent), len(diskContent)) + + dir := t.TempDir() + ovaPath := filepath.Join(dir, "mco-test.ova") + + f, err := os.Create(ovaPath) + if err != nil { + t.Fatalf("failed to create ova file: %v", err) + } + defer f.Close() + + tw := tar.NewWriter(f) + defer tw.Close() + + for name, content := range map[string][]byte{ + "mco-test.ovf": []byte(ovfXML), + "disk1.vmdk": diskContent, + } { + hdr := &tar.Header{ + Name: name, + Mode: 0o644, + Size: int64(len(content)), + } + if err := tw.WriteHeader(hdr); err != nil { + t.Fatalf("failed to write tar header for %s: %v", name, err) + } + if _, err := tw.Write(content); err != nil { + t.Fatalf("failed to write tar content for %s: %v", name, err) + } + } + + return ovaPath +} + +// TestSpikeVcsimSupportsOvfImport is a throwaway spike (see plan A0) confirming vcsim +// implements enough of CreateImportSpec/ImportVApp/NFC-lease-upload to exercise the same +// import flow as createNewVMTemplateWithNameForFailureDomain. If this test is green, the +// full decision-tree in createNewVMTemplate can be tested end-to-end against vcsim without +// needing a fake-importer seam. +func TestSpikeVcsimSupportsOvfImport(t *testing.T) { + model := simulator.VPX() + model.Datacenter = 1 + model.Cluster = 1 + model.Host = 1 + model.Datastore = 1 + if err := model.Create(); err != nil { + t.Fatalf("failed to create simulator model: %v", err) + } + defer model.Remove() + + model.Service.TLS = new(tls.Config) + server := model.Service.NewServer() + defer server.Close() + + ctx := context.Background() + client, err := govmomi.NewClient(ctx, server.URL, true) + if err != nil { + t.Fatalf("failed to connect to simulator: %v", err) + } + + finder := find.NewFinder(client.Client, false) + dc, err := finder.DefaultDatacenter(ctx) + if err != nil { + t.Fatalf("failed to find default datacenter: %v", err) + } + finder = finder.SetDatacenter(dc) + + ds, err := finder.DefaultDatastore(ctx) + if err != nil { + t.Fatalf("failed to find default datastore: %v", err) + } + folders, err := dc.Folders(ctx) + if err != nil { + t.Fatalf("failed to find datacenter folders: %v", err) + } + cluster, err := finder.DefaultClusterComputeResource(ctx) + if err != nil { + t.Fatalf("failed to find default cluster: %v", err) + } + pool, err := cluster.ResourcePool(ctx) + if err != nil { + t.Fatalf("failed to find cluster resource pool: %v", err) + } + hosts, err := cluster.Hosts(ctx) + if err != nil || len(hosts) == 0 { + t.Fatalf("failed to find cluster hosts: %v", err) + } + networks, err := finder.NetworkList(ctx, "*") + if err != nil || len(networks) == 0 { + t.Fatalf("failed to find any network: %v", err) + } + network := networks[0] + + ovaPath := buildMinimalOVA(t) + archive := &importer.TapeArchive{Path: ovaPath} + ovfDescriptor, err := importer.ReadOvf("*.ovf", archive) + if err != nil { + t.Fatalf("failed to read ovf from archive: %v", err) + } + ovfEnvelope, err := importer.ReadEnvelope(ovfDescriptor) + if err != nil { + t.Fatalf("failed to parse ovf envelope: %v", err) + } + if len(ovfEnvelope.Network.Networks) != 1 { + t.Fatalf("expected exactly one network in test fixture, got %d", len(ovfEnvelope.Network.Networks)) + } + + cisp, err := getCISP(ovfEnvelope, network, "mco-test-import", "") + if err != nil { + t.Fatalf("getCISP failed: %v", err) + } + + m := ovf.NewManager(client.Client) + spec, err := m.CreateImportSpec(ctx, string(ovfDescriptor), pool.Reference(), ds.Reference(), cisp) + if err != nil { + t.Fatalf("CreateImportSpec failed: %v", err) + } + if spec.Error != nil { + t.Fatalf("CreateImportSpec returned spec error: %s", spec.Error[0].LocalizedMessage) + } + + lease, err := pool.ImportVApp(ctx, spec.ImportSpec, folders.VmFolder, hosts[0]) + if err != nil { + t.Fatalf("ImportVApp failed: %v", err) + } + + info, err := lease.Wait(ctx, spec.FileItem) + if err != nil { + t.Fatalf("lease.Wait failed: %v", err) + } + + u := lease.StartUpdater(ctx, info) + defer u.Done() + + for _, item := range info.Items { + if err := upload(ctx, archive, lease, item); err != nil { + t.Fatalf("upload failed: %v", err) + } + } + + if err := lease.Complete(ctx); err != nil { + t.Fatalf("lease.Complete failed: %v", err) + } + + vm := object.NewVirtualMachine(client.Client, info.Entity) + if vm == nil { + t.Fatalf("imported VM not found, managed object id: %s", info.Entity.Value) + } + + if err := vm.MarkAsTemplate(ctx); err != nil { + t.Fatalf("MarkAsTemplate failed: %v", err) + } + + found, err := finder.VirtualMachine(ctx, "mco-test-import") + if err != nil { + t.Fatalf("failed to find imported template by name: %v", err) + } + if found.Reference().Value != vm.Reference().Value { + t.Fatalf("found VM does not match imported VM") + } + + t.Logf("SPIKE RESULT: vcsim fully supports the OVF import flow used by createNewVMTemplateWithNameForFailureDomain") +} diff --git a/pkg/controller/bootimage/vsphere_simulator_test.go b/pkg/controller/bootimage/vsphere_simulator_test.go new file mode 100644 index 0000000000..e9c120d38a --- /dev/null +++ b/pkg/controller/bootimage/vsphere_simulator_test.go @@ -0,0 +1,262 @@ +package bootimage + +import ( + "context" + "crypto/tls" + "fmt" + "testing" + + "github.com/vmware/govmomi" + "github.com/vmware/govmomi/find" + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator" + "github.com/vmware/govmomi/vapi/rest" + "github.com/vmware/govmomi/vapi/tags" + + // Registers the vAPI (REST) endpoints, including tag management, on the simulator's + // HTTP server. Required for attachTag/getClientsFromServerURL's REST login to work. + _ "github.com/vmware/govmomi/vapi/simulator" + + osconfigv1 "github.com/openshift/api/config/v1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// simulatedVCenter is one independent vcsim instance standing in for a real vCenter, with its +// resource names/paths discovered from the running model rather than hardcoded, so tests stay +// correct if govmomi's default VPX topology ever changes. +type simulatedVCenter struct { + Server string // host:port, used as providerSpec.Workspace.Server / VSpherePlatformVCenterSpec.Server + Username string + Password string + Model *simulator.Model + HTTPServer *simulator.Server + Client *govmomi.Client + TagManager *tags.Manager + Finder *find.Finder + // Registry is this vCenter's own object registry, captured immediately after model.Create(). + // govmomi v0.45.1 has no Model.Map() accessor (added in later versions) and the package-level + // simulator.Map var is reassigned by every model.Create() call, so with more than one + // simulated vCenter alive at once it only ever reflects the most-recently-created one. Tests + // that need to reach into a specific vCenter's simulated objects directly (e.g. to mutate a + // VM's product version) must go through vc.Registry, never the simulator.Map global. + Registry *simulator.Registry + + DatacenterName string + ClusterPath string // e.g. /DC0/host/DC0_C0 + DatastorePath string // e.g. /DC0/datastore/LocalDS_0 + NetworkName string // e.g. "VM Network" - a simple name, joined onto ClusterPath by production code + ResourcePoolPath string // e.g. /DC0/host/DC0_C0/Resources + VMFolderPath string // e.g. /DC0/vm + + cluster *object.ClusterComputeResource +} + +// newSimulatedVCenter starts one vcsim instance with a single datacenter/cluster/host/datastore +// (deliberately minimal and deterministic - just enough for one failure domain's resources to +// resolve unambiguously) and connects a govmomi + REST/tags client to it. Cleanup is registered +// automatically via t.Cleanup. +func newSimulatedVCenter(t *testing.T) *simulatedVCenter { + t.Helper() + + model := simulator.VPX() + model.Datacenter = 1 + model.Cluster = 1 + model.Host = 1 + model.Datastore = 1 + if err := model.Create(); err != nil { + t.Fatalf("failed to create simulator model: %v", err) + } + t.Cleanup(model.Remove) + registry := simulator.Map + + model.Service.TLS = new(tls.Config) + model.Service.RegisterEndpoints = true + server := model.Service.NewServer() + t.Cleanup(server.Close) + + ctx := context.Background() + client, err := govmomi.NewClient(ctx, server.URL, true) + if err != nil { + t.Fatalf("failed to connect to simulator: %v", err) + } + + password, _ := server.URL.User.Password() + username := server.URL.User.Username() + + restClient := rest.NewClient(client.Client) + if err := restClient.Login(ctx, server.URL.User); err != nil { + t.Fatalf("failed to log in to simulator REST endpoint: %v", err) + } + t.Cleanup(func() { _ = restClient.Logout(context.Background()) }) + + finder := find.NewFinder(client.Client, false) + dc, err := finder.DefaultDatacenter(ctx) + if err != nil { + t.Fatalf("failed to find default datacenter: %v", err) + } + finder = finder.SetDatacenter(dc) + + cluster, err := finder.DefaultClusterComputeResource(ctx) + if err != nil { + t.Fatalf("failed to find default cluster: %v", err) + } + datastore, err := finder.DefaultDatastore(ctx) + if err != nil { + t.Fatalf("failed to find default datastore: %v", err) + } + // Resolved through the finder (not cluster.ResourcePool(ctx)) so that InventoryPath is + // populated - object.ResourcePool built directly from a ComputeResource's raw property + // reference does not carry an inventory path. + pool, err := finder.ResourcePool(ctx, cluster.InventoryPath+"/Resources") + if err != nil { + t.Fatalf("failed to find cluster resource pool: %v", err) + } + folders, err := dc.Folders(ctx) + if err != nil { + t.Fatalf("failed to find datacenter folders: %v", err) + } + networks, err := finder.NetworkList(ctx, "*") + if err != nil || len(networks) == 0 { + t.Fatalf("failed to find any network: %v", err) + } + var networkName string + for _, n := range networks { + if net, ok := n.(*object.Network); ok { + networkName = net.Name() + break + } + } + if networkName == "" { + t.Fatalf("no standard (non-distributed) network found in simulator model") + } + + return &simulatedVCenter{ + Server: server.URL.Host, + Username: username, + Password: password, + Model: model, + HTTPServer: server, + Client: client, + TagManager: tags.NewManager(restClient), + Finder: finder, + Registry: registry, + DatacenterName: dc.Name(), + ClusterPath: cluster.InventoryPath, + DatastorePath: datastore.InventoryPath, + NetworkName: networkName, + ResourcePoolPath: pool.InventoryPath, + VMFolderPath: folders.VmFolder.InventoryPath, + cluster: cluster, + } +} + +// activate makes vc's registry the active one for any subsequent operation that spawns a vcsim +// Task (import, rename, destroy, ...). govmomi v0.45.1's simulator tracks Task objects via the +// package-level simulator.Map global rather than per-Service state (see the "alias the global +// Map to reduce data races" comment in simulator/task.go), and model.Create() overwrites that +// global every time a new simulatedVCenter is constructed. With more than one simulated vCenter +// alive at once, any mutating call must re-activate its target vCenter first, or the resulting +// Task gets registered into whichever vCenter's registry happened to be created most recently +// instead of the one actually performing the operation. +func (vc *simulatedVCenter) activate() *simulatedVCenter { + simulator.Map = vc.Registry + return vc +} + +// newSimulatedVCenters starts n independent simulated vCenters, useful for exercising +// multi-vCenter reconciliation (createNewVMTemplate must only touch the vCenter/failure domain +// matching a given providerSpec, never the others). +func newSimulatedVCenters(t *testing.T, n int) []*simulatedVCenter { + t.Helper() + vcenters := make([]*simulatedVCenter, n) + for i := range vcenters { + vcenters[i] = newSimulatedVCenter(t) + } + return vcenters +} + +// buildFailureDomain builds a VSpherePlatformFailureDomainSpec whose topology fields resolve +// against the given simulated vCenter's actual discovered resources. +func buildFailureDomain(vc *simulatedVCenter, fdName string, modifiers ...func(*osconfigv1.VSpherePlatformFailureDomainSpec)) osconfigv1.VSpherePlatformFailureDomainSpec { + fd := osconfigv1.VSpherePlatformFailureDomainSpec{ + Name: fdName, + Region: "region1", + Zone: "zone1", + Server: vc.Server, + Topology: osconfigv1.VSpherePlatformTopology{ + Datacenter: vc.DatacenterName, + ComputeCluster: vc.ClusterPath, + Networks: []string{vc.NetworkName}, + Datastore: vc.DatastorePath, + ResourcePool: vc.ResourcePoolPath, + }, + } + for _, m := range modifiers { + m(&fd) + } + return fd +} + +// buildVSphereInfra builds an Infrastructure CR wiring together one or more simulated vCenters +// and failure domains, matching the shape createNewVMTemplate expects from +// infra.Spec.PlatformSpec.VSphere. +func buildVSphereInfra(infraName string, vcenters []*simulatedVCenter, failureDomains []osconfigv1.VSpherePlatformFailureDomainSpec) *osconfigv1.Infrastructure { + vcenterSpecs := make([]osconfigv1.VSpherePlatformVCenterSpec, 0, len(vcenters)) + for _, vc := range vcenters { + vcenterSpecs = append(vcenterSpecs, osconfigv1.VSpherePlatformVCenterSpec{ + Server: vc.Server, + Datacenters: []string{vc.DatacenterName}, + }) + } + + return &osconfigv1.Infrastructure{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster"}, + Spec: osconfigv1.InfrastructureSpec{ + PlatformSpec: osconfigv1.PlatformSpec{ + Type: osconfigv1.VSpherePlatformType, + VSphere: &osconfigv1.VSpherePlatformSpec{ + VCenters: vcenterSpecs, + FailureDomains: failureDomains, + }, + }, + }, + Status: osconfigv1.InfrastructureStatus{ + InfrastructureName: infraName, + PlatformStatus: &osconfigv1.PlatformStatus{ + Type: osconfigv1.VSpherePlatformType, + }, + }, + } +} + +// buildVSphereProviderSpec builds a VSphereMachineProviderSpec whose Workspace fields match the +// given failure domain's topology on the given simulated vCenter, as a real MachineSet's +// providerSpec would after being reconciled onto that failure domain. +func buildVSphereProviderSpec(vc *simulatedVCenter, fd osconfigv1.VSpherePlatformFailureDomainSpec, templateName string) *machinev1beta1.VSphereMachineProviderSpec { + return &machinev1beta1.VSphereMachineProviderSpec{ + Template: templateName, + Workspace: &machinev1beta1.Workspace{ + Server: vc.Server, + Datacenter: fd.Topology.Datacenter, + Datastore: fd.Topology.Datastore, + ResourcePool: fd.Topology.ResourcePool, + Folder: vc.VMFolderPath, + }, + } +} + +// buildVSphereCredsSecret builds the "vsphere-creds" Secret shape read by createNewVMTemplate / +// getClientsFromServerURL: one ".username" / ".password" key pair per vCenter. +func buildVSphereCredsSecret(vcenters []*simulatedVCenter) *corev1.Secret { + data := map[string][]byte{} + for _, vc := range vcenters { + data[fmt.Sprintf("%s.username", vc.Server)] = []byte(vc.Username) + data[fmt.Sprintf("%s.password", vc.Server)] = []byte(vc.Password) + } + return &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "vsphere-creds", Namespace: "kube-system"}, + Data: data, + } +} diff --git a/pkg/controller/common/featuregates_test.go b/pkg/controller/common/featuregates_test.go index 1a6e043b0a..95d1b1b290 100644 --- a/pkg/controller/common/featuregates_test.go +++ b/pkg/controller/common/featuregates_test.go @@ -181,3 +181,80 @@ func checkFeatureGates(t *testing.T, handler *FeatureGatesHandlerImpl) { assert.True(t, handler.Enabled(FeatureGatesTestExistingEnaFeatureGate2)) assert.False(t, handler.Enabled(FeatureGatesTestExistingDisFeatureGate1)) } + +func TestCheckBootImagePlatform(t *testing.T) { + cases := []struct { + name string + infra *configv1.Infrastructure + wantSupported bool + wantCPMSSupported bool + wantEnabledByDflt bool + }{ + { + name: "AWS: opt-out on machinesets, opt-in on CPMS", + infra: infraWithPlatform(configv1.AWSPlatformType), + wantSupported: true, + wantCPMSSupported: true, + wantEnabledByDflt: true, + }, + { + name: "GCP: opt-out on machinesets, opt-in on CPMS", + infra: infraWithPlatform(configv1.GCPPlatformType), + wantSupported: true, + wantCPMSSupported: true, + wantEnabledByDflt: true, + }, + { + name: "vSphere: opt-out on machinesets, CPMS not supported", + infra: infraWithPlatform(configv1.VSpherePlatformType), + wantSupported: true, + wantCPMSSupported: false, + wantEnabledByDflt: true, + }, + { + name: "Azure (standard): opt-out on machinesets, opt-in on CPMS", + infra: infraWithPlatform(configv1.AzurePlatformType), + wantSupported: true, + wantCPMSSupported: true, + wantEnabledByDflt: true, + }, + { + name: "Azure Stack Cloud: unsupported entirely", + infra: &configv1.Infrastructure{ + Status: configv1.InfrastructureStatus{ + PlatformStatus: &configv1.PlatformStatus{ + Type: configv1.AzurePlatformType, + Azure: &configv1.AzurePlatformStatus{CloudName: configv1.AzureStackCloud}, + }, + }, + }, + wantSupported: false, + wantCPMSSupported: false, + wantEnabledByDflt: false, + }, + { + name: "unsupported platform (e.g. bare metal)", + infra: infraWithPlatform(configv1.BareMetalPlatformType), + wantSupported: false, + wantCPMSSupported: false, + wantEnabledByDflt: false, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + supported, cpmsSupported, enabledByDefault := CheckBootImagePlatform(tc.infra) + assert.Equal(t, tc.wantSupported, supported, "supported") + assert.Equal(t, tc.wantCPMSSupported, cpmsSupported, "cpmsSupported") + assert.Equal(t, tc.wantEnabledByDflt, enabledByDefault, "enabledByDefault") + }) + } +} + +func infraWithPlatform(platform configv1.PlatformType) *configv1.Infrastructure { + return &configv1.Infrastructure{ + Status: configv1.InfrastructureStatus{ + PlatformStatus: &configv1.PlatformStatus{Type: platform}, + }, + } +} diff --git a/test/extended-priv/mco_bootimages.go b/test/extended-priv/mco_bootimages.go index 040d3d6913..a758176985 100644 --- a/test/extended-priv/mco_bootimages.go +++ b/test/extended-priv/mco_bootimages.go @@ -2,6 +2,7 @@ package extended import ( "fmt" + "path" "regexp" "strings" @@ -12,6 +13,7 @@ import ( logger "github.com/openshift/machine-config-operator/test/extended-priv/util/logext" "github.com/tidwall/gjson" "github.com/tidwall/sjson" + utilrand "k8s.io/apimachinery/pkg/util/rand" e2e "k8s.io/kubernetes/test/e2e/framework" ) @@ -424,7 +426,7 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/longdurati clonedSecretName = fmt.Sprintf("cloned-user-data-%s-copy", GetCurrentTestPolarionIDNumber()) // We make the the regexp end in a "$" to make sure that no more versions than the expected ones are present expectedFailedMessageRegexp = regexp.QuoteMeta(fmt.Sprintf(mapiBaseErrorMessageTemplate+ - " failed to unmarshal decoded user-data to json (secret %s): invalid character 'h' in literal true (expecting 'r')t", clonedMSName, clonedMSName, clonedSecretName)) + "$" + " failed to unmarshal decoded user-data to json (secret %s): invalid character 'h' in literal true (expecting 'r')", clonedMSName, clonedMSName, clonedSecretName)) + "$" ) setNotJSONUserData := func(_ string) (string, error) { @@ -679,8 +681,336 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/longdurati exutil.By("Set the original architecture in the cloneed machineset") setArchitectureAndCheckStatus(clonedMS, machineConfiguration, arch.String()) }) + + g.It("[OTP] Boot image controller preserves a valid non-standard providerSpec.Template name", g.Label("Platform:vsphere"), func() { + // This is vSphere-specific: it is the only platform where providerSpec.Template names a + // vCenter template object directly rather than referencing an AMI/image ID, so it is the + // only platform where the boot image controller has to resolve/preserve an existing + // template by an arbitrary, non-standard name (see + // https://github.com/openshift/machine-config-operator/pull/6234). + skipTestIfSupportedPlatformNotMatched(oc, VspherePlatform) + + var ( + clonedMSName = "cloned-tc-custom-template-name-copy" + machineSet = NewMachineSetList(oc.AsAdmin(), MachineAPINamespace).GetAllOrFail()[0] + customTemplateName = "mcotest-custom-template-name" + labelName = "test" + labelValue = "update" + ) + + exutil.By("Opt-in boot images update") + o.Expect( + machineConfiguration.SetPartialManagedBootImagesConfig(MachineSetResource, labelName, labelValue), + ).To(o.Succeed(), "Error configuring Partial managedBootImages in the 'cluster' MachineConfiguration resource") + logger.Infof("OK!\n") + + exutil.By("Clone the first machineset") + clonedMS, err := machineSet.Duplicate(clonedMSName) + o.Expect(err).NotTo(o.HaveOccurred(), "Error duplicating %s", machineSet) + defer clonedMS.Delete() + logger.Infof("OK!\n") + + exutil.By("Upload the current RHCOS OVA under a non-standard (custom) template name") + currentVersion, _, err := exutil.GetClusterVersion(oc.AsAdmin()) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the current cluster version") + + rhcosHandler, err := GetRHCOSHandler(VspherePlatform) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the rhcos handler") + + baseImageURL, err := rhcosHandler.GetBaseImageURLFromRHCOSImageInfo(currentVersion, OSImageStreamRHEL9, architecture.AMD64) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the current base image URL") + + msServer, err := machineSet.Get(`{.spec.template.spec.providerSpec.value.workspace.server}`) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting workspace.server from %s", machineSet) + msDC, err := machineSet.Get(`{.spec.template.spec.providerSpec.value.workspace.datacenter}`) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting workspace.datacenter from %s", machineSet) + + o.Expect( + uploadBaseImageToVsphereForWorkspace(oc, baseImageURL, customTemplateName, msServer, msDC), + ).To(o.Succeed(), "Error uploading the current base image %s under the custom name %s", baseImageURL, customTemplateName) + logger.Infof("OK!\n") + + exutil.By("Point the cloned machineset's providerSpec.Template at the custom-named, already-current template") + o.Expect(clonedMS.SetCoreOsBootImage(customTemplateName)).To(o.Succeed(), + "Error setting the custom template name in %s", clonedMS) + logger.Infof("OK!\n") + + exutil.By("Label the cloned machineset so that it is reconciled") + o.Expect(clonedMS.AddLabel(labelName, labelValue)).To(o.Succeed(), + "Error labeling %s", clonedMS) + logger.Infof("OK!\n") + + exutil.By("Check that no failures are reported") + o.Eventually(machineConfiguration, "5m", "20s").Should(HaveConditionField("BootImageUpdateDegraded", "status", "False"), + "Expected %s not to be BootImageUpdateDegraded.\n%s", machineConfiguration.PrettyString()) + o.Eventually(machineConfiguration, "5m", "20s").Should(HaveConditionField("BootImageUpdateProgressing", "status", "False"), + "Expected %s not to be BootImageUpdateProgressing.\n%s", machineConfiguration.PrettyString()) + logger.Infof("OK!\n") + + exutil.By("Check that the custom template name is preserved rather than being renamed back to the computed name") + // The custom name already points at a current, valid template - the controller should + // recognize that via providerSpec.Template, not silently discard it in favor of the + // name it would otherwise compute from the infra ID and failure domain. + o.Consistently(clonedMS.GetCoreOsBootImage, "3m", "20s").Should(o.Equal(customTemplateName), + "%s's providerSpec.Template was changed away from the custom name, even though it already pointed at a valid, current template", clonedMS) + logger.Infof("OK!\n") + + exutil.By("Check that the custom-named template is recognized as up to date") + CheckCurrentOSImageIsUpdated(clonedMS) + logger.Infof("OK!\n") + }) + + g.It("[OTP] Reconciles MachineSets spread across multiple vSphere vCenters", g.Label("Platform:vsphere"), func() { + skipTestIfSupportedPlatformNotMatched(oc, VspherePlatform) + + groups, cleanup, err := buildWorkspaceGroupsAcrossVCenters(oc) + o.Expect(err).NotTo(o.HaveOccurred(), "Error building workspace groups across vCenters") + defer cleanup() + if len(groups) < 2 { + g.Skip(fmt.Sprintf("This test needs at least 2 vCenters configured in the infrastructure resource, found %d", len(groups))) + } + + reconcileOneMachineSetPerVsphereWorkspaceGroup(oc, machineConfiguration, groups, "multi-vcenter") + }) + + g.It("[OTP] Reconciles MachineSets spread across multiple vSphere failure domains", g.Label("Platform:vsphere"), func() { + skipTestIfSupportedPlatformNotMatched(oc, VspherePlatform) + + groups, err := groupMachineSetsByVsphereWorkspaceField(oc, "datacenter", "datastore", "resourcePool", "server") + o.Expect(err).NotTo(o.HaveOccurred(), "Error grouping machinesets by failure domain") + if len(groups) < 2 { + g.Skip(fmt.Sprintf("This test needs MachineSets spread across at least 2 failure domains, found %d", len(groups))) + } + + reconcileOneMachineSetPerVsphereWorkspaceGroup(oc, machineConfiguration, groups, "multi-fd") + }) }) +// vsphereWorkspaceGroup is one distinct combination of providerSpec.value.workspace field +// values found among the cluster's existing MachineSets, along with the MachineSets that use it. +type vsphereWorkspaceGroup struct { + key string + machineSets []*MachineSet +} + +// groupMachineSetsByVsphereWorkspaceField groups all existing MachineSets by the given +// providerSpec.value.workspace field name(s) (e.g. "server", or +// "datacenter","datastore","resourcePool" together to key on failure domain identity). Used to +// discover, from already-existing cluster state, whether MachineSets are actually spread across +// more than one vCenter/failure domain - rather than trying to force a MachineSet onto a +// different one, which risks provisioning against topology this test doesn't control. +func groupMachineSetsByVsphereWorkspaceField(oc *exutil.CLI, fields ...string) ([]vsphereWorkspaceGroup, error) { + allMS, err := NewMachineSetList(oc.AsAdmin(), MachineAPINamespace).GetAll() + if err != nil { + return nil, err + } + + order := []string{} + byKey := map[string][]*MachineSet{} + for _, ms := range allMS { + values := make([]string, 0, len(fields)) + for _, field := range fields { + value, err := ms.Get(fmt.Sprintf(`{.spec.template.spec.providerSpec.value.workspace.%s}`, field)) + if err != nil { + return nil, fmt.Errorf("error reading workspace.%s from %s: %w", field, ms, err) + } + values = append(values, value) + } + key := strings.Join(values, "|") + if _, ok := byKey[key]; !ok { + order = append(order, key) + } + byKey[key] = append(byKey[key], ms) + } + + groups := make([]vsphereWorkspaceGroup, 0, len(order)) + for _, key := range order { + groups = append(groups, vsphereWorkspaceGroup{key: key, machineSets: byKey[key]}) + } + return groups, nil +} + +// buildWorkspaceGroupsAcrossVCenters reads all failure domains from the +// infrastructure resource, groups them by vCenter server, and returns one +// vsphereWorkspaceGroup per server. For servers that already have existing +// MachineSets, the group uses those. For servers that have no existing +// MachineSets (e.g. because workers were only placed on a subset of vCenters), +// the group creates a synthetic MachineSet by cloning an existing one and +// patching its workspace fields to match a failure domain on that server. +func buildWorkspaceGroupsAcrossVCenters(oc *exutil.CLI) ([]vsphereWorkspaceGroup, func(), error) { + fds, err := exutil.GetAllVSphereFailureDomains(oc.AsAdmin()) + if err != nil { + return nil, func() {}, err + } + + allMS, err := NewMachineSetList(oc.AsAdmin(), MachineAPINamespace).GetAll() + if err != nil { + return nil, func() {}, err + } + + var syntheticMachineSets []*MachineSet + cleanup := func() { + for _, ms := range syntheticMachineSets { + if err := ms.Delete(); err != nil { + logger.Infof("Warning: failed to delete synthetic MachineSet %s: %v", ms.GetName(), err) + } + } + } + + // Index existing MachineSets by their workspace server. + msByServer := map[string][]*MachineSet{} + for _, ms := range allMS { + server, sErr := ms.Get(`{.spec.template.spec.providerSpec.value.workspace.server}`) + if sErr != nil { + continue + } + msByServer[server] = append(msByServer[server], ms) + } + + // Group failure domains by server, preserving insertion order. + var fdOrder []string + fdByServer := map[string][]exutil.VSphereConnectionInfo{} + for _, fd := range fds { + if _, ok := fdByServer[fd.Server]; !ok { + fdOrder = append(fdOrder, fd.Server) + } + fdByServer[fd.Server] = append(fdByServer[fd.Server], fd) + } + + // Build one workspace group per server. + var groups []vsphereWorkspaceGroup + for _, server := range fdOrder { + if msList, ok := msByServer[server]; ok && len(msList) > 0 { + groups = append(groups, vsphereWorkspaceGroup{ + key: server, + machineSets: msList, + }) + continue + } + + // No existing MachineSet targets this server. Clone one from another + // server and patch its workspace to match a failure domain here. + fd := fdByServer[server][0] + if len(allMS) == 0 { + return nil, cleanup, fmt.Errorf("cannot create a synthetic MachineSet for server %s: no existing MachineSets", server) + } + + donor := allMS[0] + syntheticName := fmt.Sprintf("mco-synthetic-%s", fd.FailureDomainName) + + // Get the donor's folder to extract the cluster suffix + donorFolder, fErr := donor.Get(`{.spec.template.spec.providerSpec.value.workspace.folder}`) + if fErr != nil { + return nil, cleanup, fmt.Errorf("error creating synthetic MachineSet for server %s: cannot read donor folder: %w", server, fErr) + } + // Replace the datacenter component with the target datacenter + newFolder := donorFolder + if parts := strings.SplitN(donorFolder, "/", 3); len(parts) >= 3 { + newFolder = path.Join("/", fd.DataCenter, parts[2]) + } + + syntheticMS, cloneErr := CloneResource(donor, syntheticName, donor.GetNamespace(), + func(resJSON string) (string, error) { + s, e := sjson.Set(resJSON, "spec.replicas", 0) + if e != nil { + return "", e + } + s, e = sjson.Set(s, `spec.selector.matchLabels.machine\.openshift\.io/cluster-api-machineset`, syntheticName) + if e != nil { + return "", e + } + s, e = sjson.Set(s, `spec.template.metadata.labels.machine\.openshift\.io/cluster-api-machineset`, syntheticName) + if e != nil { + return "", e + } + s, e = sjson.Set(s, "spec.template.spec.providerSpec.value.workspace.server", fd.Server) + if e != nil { + return "", e + } + s, e = sjson.Set(s, "spec.template.spec.providerSpec.value.workspace.datacenter", fd.DataCenter) + if e != nil { + return "", e + } + s, e = sjson.Set(s, "spec.template.spec.providerSpec.value.workspace.datastore", fd.DataStore) + if e != nil { + return "", e + } + s, e = sjson.Set(s, "spec.template.spec.providerSpec.value.workspace.resourcePool", fd.ResourcePool) + if e != nil { + return "", e + } + s, e = sjson.Set(s, "spec.template.spec.providerSpec.value.workspace.folder", newFolder) + if e != nil { + return "", e + } + s, e = sjson.Set(s, "spec.template.spec.providerSpec.value.network.devices.0.networkName", fd.Network) + if e != nil { + return "", e + } + return s, nil + }, + ) + if cloneErr != nil { + return nil, cleanup, fmt.Errorf("error creating synthetic MachineSet for server %s: %w", server, cloneErr) + } + logger.Infof("Created synthetic MachineSet %s targeting server %s (failure domain %s)", syntheticMS.GetName(), server, fd.FailureDomainName) + ms := NewMachineSet(oc.AsAdmin(), syntheticMS.GetNamespace(), syntheticMS.GetName()) + syntheticMachineSets = append(syntheticMachineSets, ms) + groups = append(groups, vsphereWorkspaceGroup{ + key: server, + machineSets: []*MachineSet{ms}, + }) + } + + return groups, cleanup, nil +} + +// reconcileOneMachineSetPerVsphereWorkspaceGroup clones one MachineSet from each of the given +// (already distinct) workspace groups, sets a backdated boot image on each, and verifies every +// clone is independently reconciled to a current, valid image - exercising the boot image +// controller's vCenter/failure-domain matching across more than one group in a single test run. +func reconcileOneMachineSetPerVsphereWorkspaceGroup(oc *exutil.CLI, machineConfiguration *MachineConfiguration, groups []vsphereWorkspaceGroup, testTag string) { + exutil.By("Opt-in boot images update") + o.Expect( + machineConfiguration.SetAllManagedBootImagesConfig(MachineSetResource), + ).To(o.Succeed(), "Error configuring ALL managedBootImages in the 'cluster' MachineConfiguration resource") + logger.Infof("OK!\n") + + fakeImageName, fakeImageURL := getBackdatedBootImageNameAndURL(oc.AsAdmin()) + + var clonedMachineSets []*MachineSet + for i, group := range groups { + exutil.By(fmt.Sprintf("Clone a MachineSet from workspace group %d/%d (%s)", i+1, len(groups), group.key)) + clonedMSName := fmt.Sprintf("cloned-tc-%s-%d-%s", testTag, i, utilrand.String(5)) + representative := group.machineSets[0] + clonedMS, err := representative.Duplicate(clonedMSName) + o.Expect(err).NotTo(o.HaveOccurred(), "Error duplicating %s", representative) + defer clonedMS.Delete() + clonedMachineSets = append(clonedMachineSets, clonedMS) + + server, err := representative.Get(`{.spec.template.spec.providerSpec.value.workspace.server}`) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting workspace.server from %s", representative) + datacenter, err := representative.Get(`{.spec.template.spec.providerSpec.value.workspace.datacenter}`) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting workspace.datacenter from %s", representative) + + o.Expect( + uploadBaseImageToVsphereForWorkspace(oc, fakeImageURL, fakeImageName, server, datacenter), + ).To(o.Succeed(), "Error uploading backdated image %s to %s/%s", fakeImageName, server, datacenter) + + o.Expect(clonedMS.SetCoreOsBootImage(fakeImageName)).To(o.Succeed(), + "Error setting a fake boot image in %s", clonedMS) + logger.Infof("OK!\n") + } + + exutil.By("Check that every cloned MachineSet is independently reconciled to a current image") + for _, clonedMS := range clonedMachineSets { + o.Eventually(clonedMS.GetCoreOsBootImage, "15m", "20s").ShouldNot(o.Or(o.Equal(fakeImageName), o.BeEmpty()), + "%s was NOT updated to use the right boot image", clonedMS) + CheckCurrentOSImageIsUpdated(clonedMS) + } + logger.Infof("OK!\n") +} + func DuplicateMachineSetWithCustomBootImage(ms *MachineSet, newBootImage, newName string) (*MachineSet, error) { var ( @@ -952,43 +1282,54 @@ func getBackdatedBootImage(oc *exutil.CLI) string { // We use a similar resourceID as the one generated in a normal installation. Note that it contains "gen2", so it should use "hyperVGen2" return `{"offer":"","publisher":"","resourceID":"/resourceGroups/fake-499nn-rg/providers/Microsoft.Compute/galleries/gallery_fake21az_499nn/images/fake-499nn-gen2/versions/latest","sku":"","version":""}` case VspherePlatform: - // In Vsphere we need the image to be present in the vcenter, so we need to manually upload it - var ( - // We will use 4.16 as the original version that will be updated to the current version - imageVersion = "4.16" - // Vsphere only support AMD64 - arch = architecture.AMD64 - ) - - // Get the right base image name from the rhcos json info stored in the github repositories - exutil.By(fmt.Sprintf("Get the base image for version %s", imageVersion)) - rhcosHandler, err := GetRHCOSHandler(platform) - o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the rhcos handler") - - baseImage, err := rhcosHandler.GetBaseImageFromRHCOSImageInfo(imageVersion, OSImageStreamRHEL9, arch, "") - o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the base image") - logger.Infof("Using base image %s", baseImage) - - baseImageURL, err := rhcosHandler.GetBaseImageURLFromRHCOSImageInfo(imageVersion, OSImageStreamRHEL9, arch) - o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the base image URL") - - // To avoid collisions we will add prefix to identify our image - baseImage = "mcotest-" + baseImage + name, url := getBackdatedBootImageNameAndURL(oc) o.Expect( - uploadBaseImageToCloud(oc, platform, baseImageURL, baseImage), - ).To(o.Succeed(), "Error uploading the base image %s to the cloud", baseImageURL) - logger.Infof("Uplodated: %s", baseImage) + uploadBaseImageToCloud(oc, platform, url, name), + ).To(o.Succeed(), "Error uploading the base image %s to the cloud", url) + logger.Infof("Uplodated: %s", name) logger.Infof("OK!\n") - return baseImage + return name default: return "" } } -// getReleaseFromVsphereTemplate gets the release version from a vSphere template -func getReleaseFromVsphereTemplate(oc *exutil.CLI, vsphereTemplate string) (string, error) { - vsInfo, err := exutil.GetVSphereConnectionInfo(oc.AsAdmin()) +// getBackdatedBootImageNameAndURL returns the vSphere template name and OVA URL +// for a backdated RHCOS image without uploading it. The caller is responsible +// for uploading to the correct vCenter/datacenter(s). +func getBackdatedBootImageNameAndURL(_ *exutil.CLI) (string, string) { + var ( + imageVersion = "4.16" + arch = architecture.AMD64 + ) + + exutil.By(fmt.Sprintf("Get the base image for version %s", imageVersion)) + rhcosHandler, err := GetRHCOSHandler(VspherePlatform) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the rhcos handler") + + baseImage, err := rhcosHandler.GetBaseImageFromRHCOSImageInfo(imageVersion, OSImageStreamRHEL9, arch, "") + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the base image") + logger.Infof("Using base image %s", baseImage) + + baseImageURL, err := rhcosHandler.GetBaseImageURLFromRHCOSImageInfo(imageVersion, OSImageStreamRHEL9, arch) + o.Expect(err).NotTo(o.HaveOccurred(), "Error getting the base image URL") + + return "mcotest-" + baseImage, baseImageURL +} + +// getReleaseFromVsphereTemplate gets the release version from a vSphere +// template. When server and datacenter are provided, the lookup targets that +// specific vCenter/datacenter; when both are empty it falls back to +// failureDomains[0] for backwards compatibility. +func getReleaseFromVsphereTemplate(oc *exutil.CLI, vsphereTemplate, server, datacenter string) (string, error) { + var vsInfo *exutil.VSphereConnectionInfo + var err error + if server != "" && datacenter != "" { + vsInfo, err = exutil.GetVSphereConnectionInfoForWorkspace(oc.AsAdmin(), server, datacenter) + } else { + vsInfo, err = exutil.GetVSphereConnectionInfo(oc.AsAdmin()) + } if err != nil { return "", err } @@ -1015,12 +1356,20 @@ func CheckCurrentOSImageIsUpdated(bir BootImageResource) { o.Eventually(bir.GetCoreOsBootImage, "5m", "20s").Should(o.ContainSubstring(currentCoreOsBootImage), "%s was NOT updated to use the right boot image", bir) case VspherePlatform: + var vsServer, vsDC string + if ms, ok := bir.(*MachineSet); ok { + var sErr, dErr error + vsServer, sErr = ms.Get(`{.spec.template.spec.providerSpec.value.workspace.server}`) + o.Expect(sErr).NotTo(o.HaveOccurred(), "failed to get workspace.server from MachineSet %s", ms.GetName()) + vsDC, dErr = ms.Get(`{.spec.template.spec.providerSpec.value.workspace.datacenter}`) + o.Expect(dErr).NotTo(o.HaveOccurred(), "failed to get workspace.datacenter from MachineSet %s", ms.GetName()) + } o.Eventually(func() (string, error) { bootImage, err := bir.GetCoreOsBootImage() if err != nil { return "", err } - return getReleaseFromVsphereTemplate(oc.AsAdmin(), bootImage) + return getReleaseFromVsphereTemplate(oc.AsAdmin(), bootImage, vsServer, vsDC) }, "5m", "20s"). Should(o.Equal(currentCoreOsBootImage), "The image used to update %s doen't have the right version", bir) case AzurePlatform: diff --git a/test/extended-priv/mco_scale.go b/test/extended-priv/mco_scale.go index 171e3e2af6..206285efe2 100644 --- a/test/extended-priv/mco_scale.go +++ b/test/extended-priv/mco_scale.go @@ -697,6 +697,17 @@ func uploadBaseImageToCloud(oc *exutil.CLI, platform, baseImageURL, baseImage st } } +// uploadBaseImageToVsphereForWorkspace uploads a vSphere OVA to the +// vCenter/datacenter identified by the given server and datacenter strings +// (taken from a MachineSet's providerSpec.value.workspace). +func uploadBaseImageToVsphereForWorkspace(oc *exutil.CLI, baseImageURL, baseImage, server, datacenter string) error { + vsInfo, err := exutil.GetVSphereConnectionInfoForWorkspace(oc.AsAdmin(), server, datacenter) + if err != nil { + return err + } + return exutil.UploadBaseImageToVsphere(baseImageURL, baseImage, vsInfo) +} + func IsBootImageUpdateSupported(oc *exutil.CLI) bool { var ( platform = exutil.CheckPlatform(oc.AsAdmin()) diff --git a/test/extended-priv/util/vsphere.go b/test/extended-priv/util/vsphere.go index 5ec501436e..4fe53ee9c7 100644 --- a/test/extended-priv/util/vsphere.go +++ b/test/extended-priv/util/vsphere.go @@ -293,13 +293,14 @@ func GetReleaseFromVsphereTemplate(vsphereTemplate, server, dataCenter, user, pa // VSphereConnectionInfo holds vSphere connection parameters extracted from the cluster type VSphereConnectionInfo struct { - Server string - DataCenter string - DataStore string - ResourcePool string - Network string - User string - Password string + FailureDomainName string + Server string + DataCenter string + DataStore string + ResourcePool string + Network string + User string + Password string } // GetVSphereConnectionInfo extracts vSphere connection parameters from the infrastructure resource and credentials secret @@ -354,15 +355,20 @@ func GetVSphereConnectionInfo(oc *CLI) (*VSphereConnectionInfo, error) { return nil, err } + // The vsphere-creds secret holds one ".username"/".password" pair per + // vCenter. With more than one vCenter configured, matching on "username"/"password" alone + // would non-deterministically pick whichever key Go's map iteration happens to visit last - + // match this failure domain's own server explicitly instead. + userKey, passKey := info.Server+".username", info.Server+".password" for k, vb64 := range dataMap { v, decErr := base64.StdEncoding.DecodeString(vb64) if decErr != nil { return nil, fmt.Errorf("cannot decode secret value for key %s: %w", k, decErr) } - if strings.Contains(k, "username") { + if k == userKey { info.User = string(v) } - if strings.Contains(k, "password") { + if k == passKey { info.Password = string(v) } } @@ -376,3 +382,93 @@ func GetVSphereConnectionInfo(oc *CLI) (*VSphereConnectionInfo, error) { return &info, nil } + +// GetAllVSphereFailureDomains returns a VSphereConnectionInfo for every failure +// domain configured in the infrastructure resource, with credentials resolved +// from the vsphere-creds secret. +func GetAllVSphereFailureDomains(oc *CLI) ([]VSphereConnectionInfo, error) { + fdJSON, err := oc.AsAdmin().WithoutNamespace().Run("get").Args( + "infrastructure", "cluster", "-o", "jsonpath={.spec.platformSpec.vsphere.failureDomains}").Output() + if err != nil { + return nil, fmt.Errorf("cannot get failureDomains from infrastructure resource: %w", err) + } + if fdJSON == "" { + return nil, fmt.Errorf("empty failureDomains in infrastructure resource") + } + + secretData, err := oc.AsAdmin().WithoutNamespace().Run("get").Args( + "secret", "vsphere-creds", "-n", "kube-system", "-o", "jsonpath={.data}").Output() + if err != nil { + return nil, fmt.Errorf("cannot get vsphere-creds secret: %w", err) + } + credsMap := map[string]string{} + if err := json.Unmarshal([]byte(secretData), &credsMap); err != nil { + return nil, fmt.Errorf("cannot parse vsphere-creds secret: %w", err) + } + + decodedCreds := make(map[string]string, len(credsMap)) + for k, vb64 := range credsMap { + v, err := base64.StdEncoding.DecodeString(vb64) + if err != nil { + return nil, fmt.Errorf("cannot decode secret value for key %s: %w", k, err) + } + decodedCreds[k] = string(v) + } + + var result []VSphereConnectionInfo + var missingErr error + fds := gjson.Parse(fdJSON) + fds.ForEach(func(_, fd gjson.Result) bool { + info := VSphereConnectionInfo{ + FailureDomainName: fd.Get("name").String(), + Server: fd.Get("server").String(), + DataCenter: fd.Get("topology.datacenter").String(), + DataStore: fd.Get("topology.datastore").String(), + ResourcePool: fd.Get("topology.resourcePool").String(), + Network: fd.Get("topology.networks.0").String(), + } + + userKey := info.Server + ".username" + passKey := info.Server + ".password" + + user, userOK := decodedCreds[userKey] + pass, passOK := decodedCreds[passKey] + if !userOK || !passOK { + missingErr = fmt.Errorf("missing credential for failure domain %q: userKey=%q (present=%v), passKey=%q (present=%v)", + info.FailureDomainName, userKey, userOK, passKey, passOK) + return false + } + info.User = user + info.Password = pass + + result = append(result, info) + return true + }) + + if missingErr != nil { + return nil, missingErr + } + if len(result) == 0 { + return nil, fmt.Errorf("no failure domains found in infrastructure resource") + } + return result, nil +} + +// GetVSphereConnectionInfoForWorkspace returns a VSphereConnectionInfo for the +// failure domain that matches the given server and datacenter. This is used to +// look up the correct vCenter connection parameters for a specific MachineSet's +// workspace. +func GetVSphereConnectionInfoForWorkspace(oc *CLI, server, datacenter string) (*VSphereConnectionInfo, error) { + fds, err := GetAllVSphereFailureDomains(oc) + if err != nil { + return nil, err + } + + for _, fd := range fds { + if fd.Server == server && fd.DataCenter == datacenter { + return &fd, nil + } + } + + return nil, fmt.Errorf("no failure domain found matching server=%q datacenter=%q", server, datacenter) +} From 35e5a9543164d26f12b81248e7959fee66edc66f Mon Sep 17 00:00:00 2001 From: Joseph Callen Date: Tue, 4 Aug 2026 16:36:26 -0400 Subject: [PATCH 3/3] vendor: pull in govmomi simulator/toolbox/vapi packages for test coverage Vendors additional packages from the already-present github.com/vmware/govmomi module (no version bump): the simulator package (and its esx/vpx/internal subpackages) used to back the vSphere boot image unit tests with a fake vCenter, plus toolbox, units, vapi, and vapi/{simulator,vcenter,vm} needed transitively. Co-Authored-By: Claude Sonnet 5 --- go.mod | 2 +- .../vmware/govmomi/simulator/alarm_manager.go | 270 + .../simulator/authorization_manager.go | 336 + .../simulator/cluster_compute_resource.go | 669 + .../vmware/govmomi/simulator/container.go | 833 + .../simulator/container_host_system.go | 353 + .../simulator/container_virtual_machine.go | 511 + .../govmomi/simulator/crypto_manager_kmip.go | 614 + .../simulator/custom_fields_manager.go | 221 + .../simulator/customization_spec_manager.go | 358 + .../vmware/govmomi/simulator/datacenter.go | 222 + .../vmware/govmomi/simulator/dataset.go | 65 + .../vmware/govmomi/simulator/datastore.go | 117 + .../simulator/datastore_namespace_manager.go | 67 + .../vmware/govmomi/simulator/doc.go | 22 + .../vmware/govmomi/simulator/dvs.go | 434 + .../vmware/govmomi/simulator/dvs_manager.go | 51 + .../vmware/govmomi/simulator/entity.go | 47 + .../govmomi/simulator/environment_browser.go | 341 + .../simulator/esx/authorization_manager.go | 105 + .../govmomi/simulator/esx/datacenter.go | 60 + .../vmware/govmomi/simulator/esx/doc.go | 20 + .../govmomi/simulator/esx/event_manager.go | 308 + .../govmomi/simulator/esx/host_capability.go | 24 + .../esx/host_config_filesystemvolume.go | 144 + .../govmomi/simulator/esx/host_config_info.go | 1119 + .../simulator/esx/host_firewall_system.go | 1425 + .../simulator/esx/host_hardware_info.go | 865 + .../simulator/esx/host_storage_device_info.go | 347 + .../govmomi/simulator/esx/host_system.go | 1802 ++ .../simulator/esx/host_vnic_manager.go | 47 + .../simulator/esx/performance_manager.go | 15072 +++++++++++ .../simulator/esx/performance_manager_data.go | 1213 + .../govmomi/simulator/esx/resource_pool.go | 166 + .../govmomi/simulator/esx/root_folder.go | 77 + .../govmomi/simulator/esx/service_content.go | 87 + .../vmware/govmomi/simulator/esx/setting.go | 40 + .../govmomi/simulator/esx/task_manager.go | 10413 ++++++++ .../govmomi/simulator/esx/virtual_device.go | 243 + .../vmware/govmomi/simulator/event_manager.go | 442 + .../govmomi/simulator/extension_manager.go | 170 + .../vmware/govmomi/simulator/file_manager.go | 252 + .../vmware/govmomi/simulator/folder.go | 1158 + .../vmware/govmomi/simulator/guest_id.go | 22 + .../simulator/guest_operations_manager.go | 457 + .../govmomi/simulator/history_collector.go | 181 + .../simulator/host_certificate_manager.go | 111 + .../simulator/host_datastore_browser.go | 254 + .../simulator/host_datastore_system.go | 209 + .../govmomi/simulator/host_firewall_system.go | 87 + .../simulator/host_local_account_manager.go | 72 + .../govmomi/simulator/host_network_system.go | 212 + .../govmomi/simulator/host_storage_system.go | 134 + .../vmware/govmomi/simulator/host_system.go | 602 + .../govmomi/simulator/host_vnic_manager.go | 59 + .../govmomi/simulator/http_nfc_lease.go | 198 + .../govmomi/simulator/internal/object_lock.go | 102 + .../govmomi/simulator/internal/server.go | 353 + .../govmomi/simulator/internal/testcert.go | 76 + .../govmomi/simulator/internal/types.go | 74 + .../govmomi/simulator/ip_pool_manager.go | 387 + .../govmomi/simulator/license_manager.go | 188 + .../vmware/govmomi/simulator/model.go | 977 + .../vmware/govmomi/simulator/object.go | 80 + .../govmomi/simulator/option_manager.go | 139 + .../vmware/govmomi/simulator/ovf_manager.go | 364 + .../govmomi/simulator/performance_manager.go | 296 + .../vmware/govmomi/simulator/portgroup.go | 97 + .../govmomi/simulator/property_collector.go | 1088 + .../govmomi/simulator/property_filter.go | 162 + .../vmware/govmomi/simulator/registry.go | 690 + .../vmware/govmomi/simulator/resource_pool.go | 536 + .../vmware/govmomi/simulator/search_index.go | 273 + .../govmomi/simulator/service_instance.go | 99 + .../govmomi/simulator/session_manager.go | 490 + .../vmware/govmomi/simulator/simulator.go | 992 + .../vmware/govmomi/simulator/snapshot.go | 176 + .../simulator/storage_resource_manager.go | 184 + .../vmware/govmomi/simulator/task.go | 273 + .../vmware/govmomi/simulator/task_manager.go | 398 + .../govmomi/simulator/tenant_manager.go | 79 + .../govmomi/simulator/user_directory.go | 104 + .../vmware/govmomi/simulator/view_manager.go | 304 + .../govmomi/simulator/virtual_disk_manager.go | 291 + .../govmomi/simulator/virtual_machine.go | 3089 +++ .../simulator/vm_compatibility_checker.go | 188 + .../simulator/vm_provisioning_checker.go | 49 + .../govmomi/simulator/vpx/alarm_manager.go | 219 + .../vmware/govmomi/simulator/vpx/doc.go | 20 + .../simulator/vpx/performance_manager.go | 21840 ++++++++++++++++ .../simulator/vpx/performance_manager_data.go | 1873 ++ .../govmomi/simulator/vpx/root_folder.go | 64 + .../govmomi/simulator/vpx/service_content.go | 91 + .../vmware/govmomi/simulator/vpx/setting.go | 78 + .../govmomi/simulator/vpx/task_manager.go | 11133 ++++++++ .../simulator/vstorage_object_manager.go | 473 + .../vmware/govmomi/toolbox/hgfs/archive.go | 341 + .../vmware/govmomi/toolbox/hgfs/encoding.go | 73 + .../vmware/govmomi/toolbox/hgfs/hgfs_linux.go | 58 + .../vmware/govmomi/toolbox/hgfs/hgfs_other.go | 27 + .../vmware/govmomi/toolbox/hgfs/protocol.go | 847 + .../vmware/govmomi/toolbox/hgfs/server.go | 585 + .../vmware/govmomi/toolbox/process/process.go | 640 + .../vmware/govmomi/toolbox/vix/property.go | 236 + .../vmware/govmomi/toolbox/vix/protocol.go | 847 + .../github.com/vmware/govmomi/units/size.go | 109 + vendor/github.com/vmware/govmomi/vapi/doc.go | 21 + .../vmware/govmomi/vapi/resource.go | 35 + .../govmomi/vapi/simulator/simulator.go | 2653 ++ .../govmomi/vapi/vcenter/vcenter_ovf.go | 313 + .../govmomi/vapi/vcenter/vcenter_vmtx.go | 337 + .../vmware/govmomi/vapi/vm/dataset/dataset.go | 200 + .../govmomi/vapi/vm/internal/internal.go | 24 + vendor/modules.txt | 13 + 114 files changed, 99477 insertions(+), 1 deletion(-) create mode 100644 vendor/github.com/vmware/govmomi/simulator/alarm_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/authorization_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/cluster_compute_resource.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/container.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/container_host_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/container_virtual_machine.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/crypto_manager_kmip.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/custom_fields_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/customization_spec_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/datacenter.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/dataset.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/datastore.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/datastore_namespace_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/doc.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/dvs.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/dvs_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/entity.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/environment_browser.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/authorization_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/datacenter.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/doc.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/event_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_capability.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_config_filesystemvolume.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_config_info.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_firewall_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_hardware_info.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_storage_device_info.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/host_vnic_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/performance_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/performance_manager_data.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/resource_pool.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/root_folder.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/service_content.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/setting.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/task_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/esx/virtual_device.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/event_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/extension_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/file_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/folder.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/guest_id.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/guest_operations_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/history_collector.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_certificate_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_datastore_browser.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_datastore_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_firewall_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_local_account_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_network_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_storage_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_system.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/host_vnic_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/http_nfc_lease.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/internal/object_lock.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/internal/server.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/internal/testcert.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/internal/types.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/ip_pool_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/license_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/model.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/object.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/option_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/ovf_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/performance_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/portgroup.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/property_collector.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/property_filter.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/registry.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/resource_pool.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/search_index.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/service_instance.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/session_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/simulator.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/snapshot.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/storage_resource_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/task.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/task_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/tenant_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/user_directory.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/view_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/virtual_disk_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/virtual_machine.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vm_compatibility_checker.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vm_provisioning_checker.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/alarm_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/doc.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager_data.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/root_folder.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/service_content.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/setting.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vpx/task_manager.go create mode 100644 vendor/github.com/vmware/govmomi/simulator/vstorage_object_manager.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/hgfs/archive.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/hgfs/encoding.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_linux.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_other.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/hgfs/protocol.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/hgfs/server.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/process/process.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/vix/property.go create mode 100644 vendor/github.com/vmware/govmomi/toolbox/vix/protocol.go create mode 100644 vendor/github.com/vmware/govmomi/units/size.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/doc.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/resource.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/simulator/simulator.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_ovf.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_vmtx.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/vm/dataset/dataset.go create mode 100644 vendor/github.com/vmware/govmomi/vapi/vm/internal/internal.go diff --git a/go.mod b/go.mod index ea7bf57077..5de311c7e4 100644 --- a/go.mod +++ b/go.mod @@ -360,7 +360,7 @@ require ( github.com/opencontainers/image-spec v1.1.1 github.com/opencontainers/runtime-spec v1.3.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect - github.com/pkg/errors v0.9.1 + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.7.0 // indirect github.com/proglottis/gpgme v0.1.4 // indirect diff --git a/vendor/github.com/vmware/govmomi/simulator/alarm_manager.go b/vendor/github.com/vmware/govmomi/simulator/alarm_manager.go new file mode 100644 index 0000000000..91c94ff805 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/alarm_manager.go @@ -0,0 +1,270 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + "time" + + "github.com/vmware/govmomi/simulator/vpx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type AlarmManager struct { + mo.AlarmManager + + types.GetAlarmResponse +} + +func (m *AlarmManager) init(r *Registry) { + if m.GetAlarmResponse.Returnval != nil { + return + } + + m.GetAlarmResponse.Returnval = make([]types.ManagedObjectReference, len(vpx.Alarm)) + for i, alarm := range vpx.Alarm { + m.GetAlarmResponse.Returnval[i] = alarm.Self + r.Put(&Alarm{Alarm: alarm}) + } +} + +func (*AlarmManager) trimPrefix(s string) string { + return strings.TrimPrefix(s, "vim.") +} + +func (*AlarmManager) key(refs ...types.ManagedObjectReference) string { + keys := make([]string, len(refs)) + for i := range refs { + s := strings.Split(refs[i].Value, "-") + keys[i] = s[len(s)-1] + } + return strings.Join(keys, ".") +} + +// only handling the common use case of EventEx for now +func (m *AlarmManager) matchAlarm(alarm *Alarm, event *types.EventEx) (*mo.Alarm, types.ManagedEntityStatus) { + id := event.EventTypeId + kind := m.trimPrefix(event.ObjectType) + + switch op := alarm.Info.Expression.(type) { + case *types.OrAlarmExpression: + for i := range op.Expression { + switch x := op.Expression[i].(type) { + case *types.EventAlarmExpression: + if x.EventTypeId == id && kind == m.trimPrefix(x.ObjectType) { + return &alarm.Alarm, x.Status + } + } + } + } + return nil, "" +} + +// update (e.g. triggeredAlarmState) and propagate up the inventory hierarchy +func (*AlarmManager) update(ctx *Context, me mo.Entity, update func(mo.Entity) *types.ManagedObjectReference) { + for { + if me == nil { + break + } + ctx.WithLock(me, func() { + parent := update(me) + if parent == nil { + me = nil + } else { + me = ctx.Map.Get(*parent).(mo.Entity) + } + }) + } +} + +// postEvent triggers Alarms based on Events +func (m *AlarmManager) postEvent(ctx *Context, base types.BaseEvent) { + event, ok := base.(*types.EventEx) + if !ok { + return + } + + entity := types.ManagedObjectReference{Type: event.ObjectType, Value: event.ObjectId} + me := ctx.Map.Get(entity).(mo.Entity) + + for _, ref := range m.GetAlarmResponse.Returnval { + alarm := ctx.Map.Get(ref).(*Alarm) + match, status := m.matchAlarm(alarm, event) + if match == nil { + continue + } + + now := time.Now() + key := m.key(match.Self, entity) + + update := func(me mo.Entity) *types.ManagedObjectReference { + obj := me.Entity() + + for i, state := range obj.TriggeredAlarmState { + if state.Key != key { + continue + } + + switch status { + case state.OverallStatus: + // no change + return nil + case types.ManagedEntityStatusGreen: + // remove + obj.TriggeredAlarmState = + append(obj.TriggeredAlarmState[:i], + obj.TriggeredAlarmState[i+1:]...) + return obj.Parent + default: + // status change (e.g. yellow -> red) + obj.TriggeredAlarmState[i].OverallStatus = status + return obj.Parent + } + } + + if status == types.ManagedEntityStatusGreen { + return nil // green only clears a triggered alarm + } + + // add + state := types.AlarmState{ + Key: key, + Entity: entity, + Alarm: match.Self, + OverallStatus: status, + Time: now, + EventKey: event.Key, + Acknowledged: types.NewBool(false), + } + + obj.TriggeredAlarmState = append(obj.TriggeredAlarmState, state) + + return obj.Parent + } + + m.update(ctx, me, update) + } +} + +func (m *AlarmManager) GetAlarm(ctx *Context, req *types.GetAlarm) soap.HasFault { + body := &methods.GetAlarmBody{ + Res: new(types.GetAlarmResponse), + } + + if req.Entity == nil || *req.Entity == ctx.Map.content().RootFolder { + body.Res.Returnval = m.GetAlarmResponse.Returnval + } // else TODO + + return body +} + +func (m *AlarmManager) CreateAlarm(ctx *Context, req *types.CreateAlarm) soap.HasFault { + body := new(methods.CreateAlarmBody) + + name := req.Spec.GetAlarmSpec().Name + + for _, alarm := range ctx.Map.AllReference("Alarm") { + if alarm.(*Alarm).Info.Name == name { + body.Fault_ = Fault("", &types.DuplicateName{Name: name}) + return body + } + } + + alarm := Alarm{ + Alarm: mo.Alarm{ + Info: types.AlarmInfo{ + AlarmSpec: *req.Spec.GetAlarmSpec(), + Entity: req.Entity, + LastModifiedTime: time.Now(), + LastModifiedUser: ctx.Session.UserName, + }, + }, + } + + ref := ctx.Map.Put(&alarm).Reference() + alarm.Info.Alarm = ref + m.GetAlarmResponse.Returnval = append(m.GetAlarmResponse.Returnval, ref) + + body.Res = &types.CreateAlarmResponse{ + Returnval: ref, + } + + return body +} + +func (m *AlarmManager) AcknowledgeAlarm(ctx *Context, req *types.AcknowledgeAlarm) soap.HasFault { + body := new(methods.AcknowledgeAlarmBody) + + now := types.NewTime(time.Now()) + key := m.key(req.Alarm, req.Entity) + me := ctx.Map.Get(req.Entity).(mo.Entity) + + update := func(me mo.Entity) *types.ManagedObjectReference { + obj := me.Entity() + + for i, state := range obj.TriggeredAlarmState { + if state.Key == key { + if *obj.TriggeredAlarmState[i].Acknowledged { + return nil // already ack-ed + } + obj.TriggeredAlarmState[i].Acknowledged = types.NewBool(true) + obj.TriggeredAlarmState[i].AcknowledgedTime = now + obj.TriggeredAlarmState[i].AcknowledgedByUser = ctx.Session.UserName + return obj.Parent + } + } + + return nil + } + + m.update(ctx, me, update) + + body.Res = new(types.AcknowledgeAlarmResponse) + + return body +} + +type Alarm struct { + mo.Alarm +} + +func (a *Alarm) ReconfigureAlarm(ctx *Context, req *types.ReconfigureAlarm) soap.HasFault { + body := new(methods.ReconfigureAlarmBody) + + // TODO: spec validation + + a.Info.AlarmSpec = *req.Spec.GetAlarmSpec() + + body.Res = new(types.ReconfigureAlarmResponse) + + return body +} + +func (a *Alarm) RemoveAlarm(ctx *Context, req *types.RemoveAlarm) soap.HasFault { + m := ctx.Map.AlarmManager() + + RemoveReference(&m.GetAlarmResponse.Returnval, req.This) + + ctx.Map.Remove(ctx, req.This) + + return &methods.RemoveAlarmBody{ + Res: new(types.RemoveAlarmResponse), + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/authorization_manager.go b/vendor/github.com/vmware/govmomi/simulator/authorization_manager.go new file mode 100644 index 0000000000..924ff978fe --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/authorization_manager.go @@ -0,0 +1,336 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type AuthorizationManager struct { + mo.AuthorizationManager + + permissions map[types.ManagedObjectReference][]types.Permission + privileges map[string]struct{} + system []string + nextID int32 +} + +func (m *AuthorizationManager) init(r *Registry) { + if len(m.RoleList) == 0 { + m.RoleList = make([]types.AuthorizationRole, len(esx.RoleList)) + copy(m.RoleList, esx.RoleList) + } + + m.permissions = make(map[types.ManagedObjectReference][]types.Permission) + + l := object.AuthorizationRoleList(m.RoleList) + m.system = l.ByName("ReadOnly").Privilege + admin := l.ByName("Admin") + m.privileges = make(map[string]struct{}, len(admin.Privilege)) + + for _, id := range admin.Privilege { + m.privileges[id] = struct{}{} + } + + root := r.content().RootFolder + + for _, u := range DefaultUserGroup { + m.permissions[root] = append(m.permissions[root], types.Permission{ + Entity: &root, + Principal: u.Principal, + Group: u.Group, + RoleId: admin.RoleId, + Propagate: true, + }) + } +} + +func (m *AuthorizationManager) RetrieveEntityPermissions(req *types.RetrieveEntityPermissions) soap.HasFault { + e := Map.Get(req.Entity).(mo.Entity) + + p := m.permissions[e.Reference()] + + if req.Inherited { + for { + parent := e.Entity().Parent + if parent == nil { + break + } + + e = Map.Get(parent.Reference()).(mo.Entity) + + p = append(p, m.permissions[e.Reference()]...) + } + } + + return &methods.RetrieveEntityPermissionsBody{ + Res: &types.RetrieveEntityPermissionsResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) RetrieveAllPermissions(req *types.RetrieveAllPermissions) soap.HasFault { + var p []types.Permission + + for _, v := range m.permissions { + p = append(p, v...) + } + + return &methods.RetrieveAllPermissionsBody{ + Res: &types.RetrieveAllPermissionsResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) RemoveEntityPermission(req *types.RemoveEntityPermission) soap.HasFault { + var p []types.Permission + + for _, v := range m.permissions[req.Entity] { + if v.Group == req.IsGroup && v.Principal == req.User { + continue + } + p = append(p, v) + } + + m.permissions[req.Entity] = p + + return &methods.RemoveEntityPermissionBody{ + Res: &types.RemoveEntityPermissionResponse{}, + } +} + +func (m *AuthorizationManager) SetEntityPermissions(req *types.SetEntityPermissions) soap.HasFault { + m.permissions[req.Entity] = req.Permission + + return &methods.SetEntityPermissionsBody{ + Res: &types.SetEntityPermissionsResponse{}, + } +} + +func (m *AuthorizationManager) RetrieveRolePermissions(req *types.RetrieveRolePermissions) soap.HasFault { + var p []types.Permission + + for _, set := range m.permissions { + for _, v := range set { + if v.RoleId == req.RoleId { + p = append(p, v) + } + } + } + + return &methods.RetrieveRolePermissionsBody{ + Res: &types.RetrieveRolePermissionsResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) HasPrivilegeOnEntities(req *types.HasPrivilegeOnEntities) soap.HasFault { + var p []types.EntityPrivilege + + for _, e := range req.Entity { + priv := types.EntityPrivilege{Entity: e} + + for _, id := range req.PrivId { + priv.PrivAvailability = append(priv.PrivAvailability, types.PrivilegeAvailability{ + PrivId: id, + IsGranted: true, + }) + } + + p = append(p, priv) + } + + return &methods.HasPrivilegeOnEntitiesBody{ + Res: &types.HasPrivilegeOnEntitiesResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) HasPrivilegeOnEntity(req *types.HasPrivilegeOnEntity) soap.HasFault { + p := make([]bool, len(req.PrivId)) + + for i := range req.PrivId { + p[i] = true + } + + return &methods.HasPrivilegeOnEntityBody{ + Res: &types.HasPrivilegeOnEntityResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) HasUserPrivilegeOnEntities(req *types.HasUserPrivilegeOnEntities) soap.HasFault { + var p []types.EntityPrivilege + + for _, e := range req.Entities { + priv := types.EntityPrivilege{Entity: e} + + for _, id := range req.PrivId { + priv.PrivAvailability = append(priv.PrivAvailability, types.PrivilegeAvailability{ + PrivId: id, + IsGranted: true, + }) + } + + p = append(p, priv) + } + + return &methods.HasUserPrivilegeOnEntitiesBody{ + Res: &types.HasUserPrivilegeOnEntitiesResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) FetchUserPrivilegeOnEntities(req *types.FetchUserPrivilegeOnEntities) soap.HasFault { + admin := object.AuthorizationRoleList(m.RoleList).ByName("Admin").Privilege + + var p []types.UserPrivilegeResult + + for _, e := range req.Entities { + p = append(p, types.UserPrivilegeResult{ + Entity: e, + Privileges: admin, + }) + } + + return &methods.FetchUserPrivilegeOnEntitiesBody{ + Res: &types.FetchUserPrivilegeOnEntitiesResponse{ + Returnval: p, + }, + } +} + +func (m *AuthorizationManager) AddAuthorizationRole(req *types.AddAuthorizationRole) soap.HasFault { + body := &methods.AddAuthorizationRoleBody{} + + for _, role := range m.RoleList { + if role.Name == req.Name { + body.Fault_ = Fault("", &types.AlreadyExists{}) + return body + } + } + + ids, err := m.privIDs(req.PrivIds) + if err != nil { + body.Fault_ = err + return body + } + + m.RoleList = append(m.RoleList, types.AuthorizationRole{ + Info: &types.Description{ + Label: req.Name, + Summary: req.Name, + }, + RoleId: m.nextID, + Privilege: ids, + Name: req.Name, + System: false, + }) + + m.nextID++ + + body.Res = &types.AddAuthorizationRoleResponse{} + + return body +} + +func (m *AuthorizationManager) UpdateAuthorizationRole(req *types.UpdateAuthorizationRole) soap.HasFault { + body := &methods.UpdateAuthorizationRoleBody{} + + for _, role := range m.RoleList { + if role.Name == req.NewName && role.RoleId != req.RoleId { + body.Fault_ = Fault("", &types.AlreadyExists{}) + return body + } + } + + for i, role := range m.RoleList { + if role.RoleId == req.RoleId { + if len(req.PrivIds) != 0 { + ids, err := m.privIDs(req.PrivIds) + if err != nil { + body.Fault_ = err + return body + } + m.RoleList[i].Privilege = ids + } + + m.RoleList[i].Name = req.NewName + + body.Res = &types.UpdateAuthorizationRoleResponse{} + return body + } + } + + body.Fault_ = Fault("", &types.NotFound{}) + + return body +} + +func (m *AuthorizationManager) RemoveAuthorizationRole(req *types.RemoveAuthorizationRole) soap.HasFault { + body := &methods.RemoveAuthorizationRoleBody{} + + for i, role := range m.RoleList { + if role.RoleId == req.RoleId { + m.RoleList = append(m.RoleList[:i], m.RoleList[i+1:]...) + + body.Res = &types.RemoveAuthorizationRoleResponse{} + return body + } + } + + body.Fault_ = Fault("", &types.NotFound{}) + + return body +} + +func (m *AuthorizationManager) privIDs(ids []string) ([]string, *soap.Fault) { + system := make(map[string]struct{}, len(m.system)) + + for _, id := range ids { + if _, ok := m.privileges[id]; !ok { + return nil, Fault("", &types.InvalidArgument{InvalidProperty: "privIds"}) + } + + if strings.HasPrefix(id, "System.") { + system[id] = struct{}{} + } + } + + for _, id := range m.system { + if _, ok := system[id]; ok { + continue + } + + ids = append(ids, id) + } + + return ids, nil +} diff --git a/vendor/github.com/vmware/govmomi/simulator/cluster_compute_resource.go b/vendor/github.com/vmware/govmomi/simulator/cluster_compute_resource.go new file mode 100644 index 0000000000..01c39362d8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/cluster_compute_resource.go @@ -0,0 +1,669 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "log" + "math/rand" + "sync/atomic" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type ClusterComputeResource struct { + mo.ClusterComputeResource + + ruleKey int32 +} + +func (c *ClusterComputeResource) RenameTask(ctx *Context, req *types.Rename_Task) soap.HasFault { + return RenameTask(ctx, c, req) +} + +type addHost struct { + *ClusterComputeResource + + req *types.AddHost_Task +} + +func (add *addHost) Run(task *Task) (types.AnyType, types.BaseMethodFault) { + spec := add.req.Spec + + if spec.HostName == "" { + return nil, &types.NoHost{} + } + + cr := add.ClusterComputeResource + template := esx.HostSystem + + if h := task.ctx.Map.FindByName(spec.UserName, cr.Host); h != nil { + // "clone" an existing host from the inventory + template = h.(*HostSystem).HostSystem + template.Vm = nil + } else { + template.Network = cr.Network[:1] // VM Network + } + + host := NewHostSystem(template) + host.configure(task.ctx, spec, add.req.AsConnected) + + task.ctx.Map.PutEntity(cr, task.ctx.Map.NewEntity(host)) + host.Summary.Host = &host.Self + host.Config.Host = host.Self + + task.ctx.Map.WithLock(task.ctx, *cr.EnvironmentBrowser, func() { + eb := task.ctx.Map.Get(*cr.EnvironmentBrowser).(*EnvironmentBrowser) + eb.addHost(task.ctx, host.Self) + }) + + cr.Host = append(cr.Host, host.Reference()) + addComputeResource(cr.Summary.GetComputeResourceSummary(), host) + + return host.Reference(), nil +} + +func (c *ClusterComputeResource) AddHostTask(ctx *Context, add *types.AddHost_Task) soap.HasFault { + return &methods.AddHost_TaskBody{ + Res: &types.AddHost_TaskResponse{ + Returnval: NewTask(&addHost{c, add}).Run(ctx), + }, + } +} + +func (c *ClusterComputeResource) update(cfg *types.ClusterConfigInfoEx, cspec *types.ClusterConfigSpecEx) types.BaseMethodFault { + if cspec.DasConfig != nil { + if val := cspec.DasConfig.Enabled; val != nil { + cfg.DasConfig.Enabled = val + } + if val := cspec.DasConfig.AdmissionControlEnabled; val != nil { + cfg.DasConfig.AdmissionControlEnabled = val + } + } + if cspec.DrsConfig != nil { + if val := cspec.DrsConfig.Enabled; val != nil { + cfg.DrsConfig.Enabled = val + } + if val := cspec.DrsConfig.DefaultVmBehavior; val != "" { + cfg.DrsConfig.DefaultVmBehavior = val + } + } + + return nil +} + +func (c *ClusterComputeResource) updateRules(cfg *types.ClusterConfigInfoEx, cspec *types.ClusterConfigSpecEx) types.BaseMethodFault { + for _, spec := range cspec.RulesSpec { + var i int + exists := false + + match := func(info types.BaseClusterRuleInfo) bool { + return info.GetClusterRuleInfo().Name == spec.Info.GetClusterRuleInfo().Name + } + + if spec.Operation == types.ArrayUpdateOperationRemove { + match = func(rule types.BaseClusterRuleInfo) bool { + return rule.GetClusterRuleInfo().Key == spec.ArrayUpdateSpec.RemoveKey.(int32) + } + } + + for i = range cfg.Rule { + if match(cfg.Rule[i].GetClusterRuleInfo()) { + exists = true + break + } + } + + switch spec.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + info := spec.Info.GetClusterRuleInfo() + info.Key = atomic.AddInt32(&c.ruleKey, 1) + info.RuleUuid = uuid.New().String() + cfg.Rule = append(cfg.Rule, spec.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + cfg.Rule[i] = spec.Info + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + cfg.Rule = append(cfg.Rule[:i], cfg.Rule[i+1:]...) + } + } + + return nil +} + +func (c *ClusterComputeResource) updateGroups(cfg *types.ClusterConfigInfoEx, cspec *types.ClusterConfigSpecEx) types.BaseMethodFault { + for _, spec := range cspec.GroupSpec { + var i int + exists := false + + match := func(info types.BaseClusterGroupInfo) bool { + return info.GetClusterGroupInfo().Name == spec.Info.GetClusterGroupInfo().Name + } + + if spec.Operation == types.ArrayUpdateOperationRemove { + match = func(info types.BaseClusterGroupInfo) bool { + return info.GetClusterGroupInfo().Name == spec.ArrayUpdateSpec.RemoveKey.(string) + } + } + + for i = range cfg.Group { + if match(cfg.Group[i].GetClusterGroupInfo()) { + exists = true + break + } + } + + switch spec.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + cfg.Group = append(cfg.Group, spec.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + cfg.Group[i] = spec.Info + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + cfg.Group = append(cfg.Group[:i], cfg.Group[i+1:]...) + } + } + + return nil +} + +func (c *ClusterComputeResource) updateOverridesDAS(cfg *types.ClusterConfigInfoEx, cspec *types.ClusterConfigSpecEx) types.BaseMethodFault { + for _, spec := range cspec.DasVmConfigSpec { + var i int + var key types.ManagedObjectReference + exists := false + + if spec.Operation == types.ArrayUpdateOperationRemove { + key = spec.RemoveKey.(types.ManagedObjectReference) + } else { + key = spec.Info.Key + } + + for i = range cfg.DasVmConfig { + if cfg.DasVmConfig[i].Key == key { + exists = true + break + } + } + + switch spec.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + cfg.DasVmConfig = append(cfg.DasVmConfig, *spec.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + src := spec.Info.DasSettings + if src == nil { + return new(types.InvalidArgument) + } + dst := cfg.DasVmConfig[i].DasSettings + if src.RestartPriority != "" { + dst.RestartPriority = src.RestartPriority + } + if src.RestartPriorityTimeout != 0 { + dst.RestartPriorityTimeout = src.RestartPriorityTimeout + } + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + cfg.DasVmConfig = append(cfg.DasVmConfig[:i], cfg.DasVmConfig[i+1:]...) + } + } + + return nil +} + +func (c *ClusterComputeResource) updateOverridesDRS(cfg *types.ClusterConfigInfoEx, cspec *types.ClusterConfigSpecEx) types.BaseMethodFault { + for _, spec := range cspec.DrsVmConfigSpec { + var i int + var key types.ManagedObjectReference + exists := false + + if spec.Operation == types.ArrayUpdateOperationRemove { + key = spec.RemoveKey.(types.ManagedObjectReference) + } else { + key = spec.Info.Key + } + + for i = range cfg.DrsVmConfig { + if cfg.DrsVmConfig[i].Key == key { + exists = true + break + } + } + + switch spec.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + cfg.DrsVmConfig = append(cfg.DrsVmConfig, *spec.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + if spec.Info.Enabled != nil { + cfg.DrsVmConfig[i].Enabled = spec.Info.Enabled + } + if spec.Info.Behavior != "" { + cfg.DrsVmConfig[i].Behavior = spec.Info.Behavior + } + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + cfg.DrsVmConfig = append(cfg.DrsVmConfig[:i], cfg.DrsVmConfig[i+1:]...) + } + } + + return nil +} + +func (c *ClusterComputeResource) updateOverridesVmOrchestration(cfg *types.ClusterConfigInfoEx, cspec *types.ClusterConfigSpecEx) types.BaseMethodFault { + for _, spec := range cspec.VmOrchestrationSpec { + var i int + var key types.ManagedObjectReference + exists := false + + if spec.Operation == types.ArrayUpdateOperationRemove { + key = spec.RemoveKey.(types.ManagedObjectReference) + } else { + key = spec.Info.Vm + } + + for i = range cfg.VmOrchestration { + if cfg.VmOrchestration[i].Vm == key { + exists = true + break + } + } + + switch spec.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + cfg.VmOrchestration = append(cfg.VmOrchestration, *spec.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + if spec.Info.VmReadiness.ReadyCondition != "" { + cfg.VmOrchestration[i].VmReadiness.ReadyCondition = spec.Info.VmReadiness.ReadyCondition + } + if spec.Info.VmReadiness.PostReadyDelay != 0 { + cfg.VmOrchestration[i].VmReadiness.PostReadyDelay = spec.Info.VmReadiness.PostReadyDelay + } + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + cfg.VmOrchestration = append(cfg.VmOrchestration[:i], cfg.VmOrchestration[i+1:]...) + } + } + + return nil +} + +func (c *ClusterComputeResource) ReconfigureComputeResourceTask(ctx *Context, req *types.ReconfigureComputeResource_Task) soap.HasFault { + task := CreateTask(c, "reconfigureCluster", func(*Task) (types.AnyType, types.BaseMethodFault) { + spec, ok := req.Spec.(*types.ClusterConfigSpecEx) + if !ok { + return nil, new(types.InvalidArgument) + } + + updates := []func(*types.ClusterConfigInfoEx, *types.ClusterConfigSpecEx) types.BaseMethodFault{ + c.update, + c.updateRules, + c.updateGroups, + c.updateOverridesDAS, + c.updateOverridesDRS, + c.updateOverridesVmOrchestration, + } + + for _, update := range updates { + if err := update(c.ConfigurationEx.(*types.ClusterConfigInfoEx), spec); err != nil { + return nil, err + } + } + + return nil, nil + }) + + return &methods.ReconfigureComputeResource_TaskBody{ + Res: &types.ReconfigureComputeResource_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (c *ClusterComputeResource) MoveIntoTask(ctx *Context, req *types.MoveInto_Task) soap.HasFault { + task := CreateTask(c, "moveInto", func(*Task) (types.AnyType, types.BaseMethodFault) { + for _, ref := range req.Host { + host := ctx.Map.Get(ref).(*HostSystem) + + if *host.Parent == c.Self { + return nil, new(types.DuplicateName) // host already in this cluster + } + + switch parent := ctx.Map.Get(*host.Parent).(type) { + case *ClusterComputeResource: + if !host.Runtime.InMaintenanceMode { + return nil, new(types.InvalidState) + } + + RemoveReference(&parent.Host, ref) + case *mo.ComputeResource: + ctx.Map.Remove(ctx, parent.Self) + } + + c.Host = append(c.Host, ref) + host.Parent = &c.Self + } + + return nil, nil + }) + + return &methods.MoveInto_TaskBody{ + Res: &types.MoveInto_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (c *ClusterComputeResource) PlaceVm(ctx *Context, req *types.PlaceVm) soap.HasFault { + body := new(methods.PlaceVmBody) + + if len(c.Host) == 0 { + body.Fault_ = Fault("", new(types.InvalidState)) + return body + } + + res := types.ClusterRecommendation{ + Key: "1", + Type: "V1", + Time: time.Now(), + Rating: 1, + Reason: string(types.RecommendationReasonCodeXvmotionPlacement), + ReasonText: string(types.RecommendationReasonCodeXvmotionPlacement), + Target: &c.Self, + } + + hosts := req.PlacementSpec.Hosts + if len(hosts) == 0 { + hosts = c.Host + } + + datastores := req.PlacementSpec.Datastores + if len(datastores) == 0 { + datastores = c.Datastore + } + + switch types.PlacementSpecPlacementType(req.PlacementSpec.PlacementType) { + case types.PlacementSpecPlacementTypeClone, types.PlacementSpecPlacementTypeCreate: + spec := &types.VirtualMachineRelocateSpec{ + Datastore: &datastores[rand.Intn(len(c.Datastore))], + Host: &hosts[rand.Intn(len(c.Host))], + Pool: c.ResourcePool, + } + res.Action = append(res.Action, &types.PlacementAction{ + Vm: req.PlacementSpec.Vm, + TargetHost: spec.Host, + RelocateSpec: spec, + }) + case types.PlacementSpecPlacementTypeReconfigure: + // Validate input. + if req.PlacementSpec.ConfigSpec == nil { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "PlacementSpec.configSpec", + }) + return body + } + + // Update PlacementResult. + vmObj := ctx.Map.Get(*req.PlacementSpec.Vm).(*VirtualMachine) + spec := &types.VirtualMachineRelocateSpec{ + Datastore: &vmObj.Datastore[0], + Host: vmObj.Runtime.Host, + Pool: vmObj.ResourcePool, + DiskMoveType: string(types.VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndAllowSharing), + } + res.Action = append(res.Action, &types.PlacementAction{ + Vm: req.PlacementSpec.Vm, + TargetHost: spec.Host, + RelocateSpec: spec, + }) + case types.PlacementSpecPlacementTypeRelocate: + // Validate fields of req.PlacementSpec, if explicitly provided. + if !validatePlacementSpecForPlaceVmRelocate(ctx, req, body) { + return body + } + + // After validating req.PlacementSpec, we must have a valid req.PlacementSpec.Vm. + vmObj := ctx.Map.Get(*req.PlacementSpec.Vm).(*VirtualMachine) + + // Populate RelocateSpec's common fields, if not explicitly provided. + populateRelocateSpecForPlaceVmRelocate(&req.PlacementSpec.RelocateSpec, vmObj) + + // Update PlacementResult. + res.Action = append(res.Action, &types.PlacementAction{ + Vm: req.PlacementSpec.Vm, + TargetHost: req.PlacementSpec.RelocateSpec.Host, + RelocateSpec: req.PlacementSpec.RelocateSpec, + }) + default: + log.Printf("unsupported placement type: %s", req.PlacementSpec.PlacementType) + body.Fault_ = Fault("", new(types.NotSupported)) + return body + } + + body.Res = &types.PlaceVmResponse{ + Returnval: types.PlacementResult{ + Recommendations: []types.ClusterRecommendation{res}, + }, + } + + return body +} + +// validatePlacementSpecForPlaceVmRelocate validates the fields of req.PlacementSpec for a relocate placement type. +// Returns true if the fields are valid, false otherwise. +func validatePlacementSpecForPlaceVmRelocate(ctx *Context, req *types.PlaceVm, body *methods.PlaceVmBody) bool { + if req.PlacementSpec.Vm == nil { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "PlacementSpec", + }) + return false + } + + // Oddly when the VM is not found, PlaceVm complains about configSpec being invalid, despite this being + // a relocate placement type. Possibly due to treating the missing VM as a create placement type + // internally, which requires the configSpec to be present. + vmObj, exist := ctx.Map.Get(*req.PlacementSpec.Vm).(*VirtualMachine) + if !exist { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "PlacementSpec.configSpec", + }) + return false + } + + return validateRelocateSpecForPlaceVmRelocate(ctx, req.PlacementSpec.RelocateSpec, body, vmObj) +} + +// validateRelocateSpecForPlaceVmRelocate validates the fields of req.PlacementSpec.RelocateSpec for a relocate +// placement type. Returns true if the fields are valid, false otherwise. +func validateRelocateSpecForPlaceVmRelocate(ctx *Context, spec *types.VirtualMachineRelocateSpec, body *methods.PlaceVmBody, vmObj *VirtualMachine) bool { + if spec == nil { + // An empty relocate spec is valid, as it will be populated with default values. + return true + } + + if spec.Host != nil { + if _, exist := ctx.Map.Get(*spec.Host).(*HostSystem); !exist { + body.Fault_ = Fault("", &types.ManagedObjectNotFound{ + Obj: *spec.Host, + }) + return false + } + } + + if spec.Datastore != nil { + if _, exist := ctx.Map.Get(*spec.Datastore).(*Datastore); !exist { + body.Fault_ = Fault("", &types.ManagedObjectNotFound{ + Obj: *spec.Datastore, + }) + return false + } + } + + if spec.Pool != nil { + if _, exist := ctx.Map.Get(*spec.Pool).(*ResourcePool); !exist { + body.Fault_ = Fault("", &types.ManagedObjectNotFound{ + Obj: *spec.Pool, + }) + return false + } + } + + if spec.Disk != nil { + deviceList := object.VirtualDeviceList(vmObj.Config.Hardware.Device) + vdiskList := deviceList.SelectByType(&types.VirtualDisk{}) + for _, disk := range spec.Disk { + var diskFound bool + for _, vdisk := range vdiskList { + if disk.DiskId == vdisk.GetVirtualDevice().Key { + diskFound = true + break + } + } + if !diskFound { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "PlacementSpec.vm", + }) + return false + } + + // Unlike a non-existing spec.Datastore that throws ManagedObjectNotFound, a non-existing disk.Datastore + // throws InvalidArgument. + if _, exist := ctx.Map.Get(disk.Datastore).(*Datastore); !exist { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "RelocateSpec", + }) + return false + } + } + } + + return true +} + +// populateRelocateSpecForPlaceVmRelocate populates the fields of req.PlacementSpec.RelocateSpec for a relocate +// placement type, if not explicitly provided. +func populateRelocateSpecForPlaceVmRelocate(specPtr **types.VirtualMachineRelocateSpec, vmObj *VirtualMachine) { + if *specPtr == nil { + *specPtr = &types.VirtualMachineRelocateSpec{} + } + + spec := *specPtr + + if spec.DiskMoveType == "" { + spec.DiskMoveType = string(types.VirtualMachineRelocateDiskMoveOptionsMoveAllDiskBackingsAndDisallowSharing) + } + + if spec.Datastore == nil { + spec.Datastore = &vmObj.Datastore[0] + } + + if spec.Host == nil { + spec.Host = vmObj.Runtime.Host + } + + if spec.Pool == nil { + spec.Pool = vmObj.ResourcePool + } + + if spec.Disk == nil { + deviceList := object.VirtualDeviceList(vmObj.Config.Hardware.Device) + for _, vdisk := range deviceList.SelectByType(&types.VirtualDisk{}) { + spec.Disk = append(spec.Disk, types.VirtualMachineRelocateSpecDiskLocator{ + DiskId: vdisk.GetVirtualDevice().Key, + Datastore: *spec.Datastore, + DiskMoveType: spec.DiskMoveType, + }) + } + } +} + +func CreateClusterComputeResource(ctx *Context, f *Folder, name string, spec types.ClusterConfigSpecEx) (*ClusterComputeResource, types.BaseMethodFault) { + if e := ctx.Map.FindByName(name, f.ChildEntity); e != nil { + return nil, &types.DuplicateName{ + Name: e.Entity().Name, + Object: e.Reference(), + } + } + + cluster := &ClusterComputeResource{} + cluster.EnvironmentBrowser = newEnvironmentBrowser(ctx) + cluster.Name = name + cluster.Network = ctx.Map.getEntityDatacenter(f).defaultNetwork() + cluster.Summary = &types.ClusterComputeResourceSummary{ + UsageSummary: new(types.ClusterUsageSummary), + } + + config := &types.ClusterConfigInfoEx{} + cluster.ConfigurationEx = config + + config.VmSwapPlacement = string(types.VirtualMachineConfigInfoSwapPlacementTypeVmDirectory) + config.DrsConfig.Enabled = types.NewBool(true) + + pool := NewResourcePool() + ctx.Map.PutEntity(cluster, ctx.Map.NewEntity(pool)) + cluster.ResourcePool = &pool.Self + + folderPutChild(ctx, &f.Folder, cluster) + pool.Owner = cluster.Self + + return cluster, nil +} diff --git a/vendor/github.com/vmware/govmomi/simulator/container.go b/vendor/github.com/vmware/govmomi/simulator/container.go new file mode 100644 index 0000000000..f39ef99702 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/container.go @@ -0,0 +1,833 @@ +/* +Copyright (c) 2018 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "archive/tar" + "bufio" + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "log" + "net" + "os" + "os/exec" + "path" + "regexp" + "strings" + "sync" + "time" +) + +var ( + shell = "/bin/sh" + eventWatch eventWatcher +) + +const ( + deleteWithContainer = "lifecycle=container" + createdByVcsim = "createdBy=vcsim" +) + +func init() { + if sh, err := exec.LookPath("bash"); err != nil { + shell = sh + } +} + +type eventWatcher struct { + sync.Mutex + + stdin io.WriteCloser + stdout io.ReadCloser + process *os.Process + + // watches is a map of container IDs to container objects + watches map[string]*container +} + +// container provides methods to manage a container within a simulator VM lifecycle. +type container struct { + sync.Mutex + + id string + name string + + cancelWatch context.CancelFunc + changes chan struct{} +} + +type networkSettings struct { + Gateway string + IPAddress string + IPPrefixLen int + MacAddress string +} + +type containerDetails struct { + State struct { + Running bool + Paused bool + } + NetworkSettings struct { + networkSettings + Networks map[string]networkSettings + } +} + +type unknownContainer error +type uninitializedContainer error + +var sanitizeNameRx = regexp.MustCompile(`[\(\)\s]`) + +func sanitizeName(name string) string { + return sanitizeNameRx.ReplaceAllString(name, "-") +} + +func constructContainerName(name, uid string) string { + return fmt.Sprintf("vcsim-%s-%s", sanitizeName(name), uid) +} + +func constructVolumeName(containerName, uid, volumeName string) string { + return constructContainerName(containerName, uid) + "--" + sanitizeName(volumeName) +} + +func extractNameAndUid(containerName string) (name string, uid string, err error) { + parts := strings.Split(strings.TrimPrefix(containerName, "vcsim-"), "-") + if len(parts) != 2 { + err = fmt.Errorf("container name does not match expected vcsim-name-uid format: %s", containerName) + return + } + + return parts[0], parts[1], nil +} + +func prefixToMask(prefix int) string { + mask := net.CIDRMask(prefix, 32) + return fmt.Sprintf("%d.%d.%d.%d", mask[0], mask[1], mask[2], mask[3]) +} + +type tarEntry struct { + header *tar.Header + content []byte +} + +// From https://docs.docker.com/engine/reference/commandline/cp/ : +// > It is not possible to copy certain system files such as resources under /proc, /sys, /dev, tmpfs, and mounts created by the user in the container. +// > However, you can still copy such files by manually running tar in docker exec. +func copyToGuest(id string, dest string, length int64, reader io.Reader) error { + cmd := exec.Command("docker", "exec", "-i", id, "tar", "Cxf", path.Dir(dest), "-") + cmd.Stderr = os.Stderr + stdin, err := cmd.StdinPipe() + if err != nil { + return err + } + + err = cmd.Start() + if err != nil { + return err + } + + tw := tar.NewWriter(stdin) + _ = tw.WriteHeader(&tar.Header{ + Name: path.Base(dest), + Size: length, + Mode: 0444, + ModTime: time.Now(), + }) + + _, err = io.Copy(tw, reader) + + twErr := tw.Close() + stdinErr := stdin.Close() + + waitErr := cmd.Wait() + + if err != nil || twErr != nil || stdinErr != nil || waitErr != nil { + return fmt.Errorf("copy: {%s}, tw: {%s}, stdin: {%s}, wait: {%s}", err, twErr, stdinErr, waitErr) + } + + return nil +} + +func copyFromGuest(id string, src string, sink func(int64, io.Reader) error) error { + cmd := exec.Command("docker", "exec", id, "tar", "Ccf", path.Dir(src), "-", path.Base(src)) + cmd.Stderr = os.Stderr + stdout, err := cmd.StdoutPipe() + if err != nil { + return err + } + if err = cmd.Start(); err != nil { + return err + } + + tr := tar.NewReader(stdout) + header, err := tr.Next() + if err != nil { + return err + } + + err = sink(header.Size, tr) + waitErr := cmd.Wait() + + if err != nil || waitErr != nil { + return fmt.Errorf("err: {%s}, wait: {%s}", err, waitErr) + } + + return nil +} + +// createVolume creates a volume populated with the provided files +// If the header.Size is omitted or set to zero, then len(content+1) is used. +// Docker appears to treat this volume create command as idempotent so long as it's identical +// to an existing volume, so we can use this both for creating volumes inline in container create (for labelling) and +// for population after. +// returns: +// +// uid - string +// err - error or nil +func createVolume(volumeName string, labels []string, files []tarEntry) (string, error) { + image := os.Getenv("VCSIM_BUSYBOX") + if image == "" { + image = "busybox" + } + + name := sanitizeName(volumeName) + uid := "" + + // label the volume if specified - this requires the volume be created before use + if len(labels) > 0 { + run := []string{"volume", "create"} + for i := range labels { + run = append(run, "--label", labels[i]) + } + run = append(run, name) + cmd := exec.Command("docker", run...) + out, err := cmd.Output() + if err != nil { + return "", err + } + uid = strings.TrimSpace(string(out)) + + if name == "" { + name = uid + } + } + + run := []string{"run", "--rm", "-i"} + run = append(run, "-v", name+":/"+name) + run = append(run, image, "tar", "-C", "/"+name, "-xf", "-") + cmd := exec.Command("docker", run...) + stdin, err := cmd.StdinPipe() + if err != nil { + return uid, err + } + + err = cmd.Start() + if err != nil { + return uid, err + } + + tw := tar.NewWriter(stdin) + + for _, file := range files { + header := file.header + + if header.Size == 0 && len(file.content) > 0 { + header.Size = int64(len(file.content)) + } + + if header.ModTime.IsZero() { + header.ModTime = time.Now() + } + + if header.Mode == 0 { + header.Mode = 0444 + } + + tarErr := tw.WriteHeader(header) + if tarErr == nil { + _, tarErr = tw.Write(file.content) + } + } + + err = nil + twErr := tw.Close() + stdinErr := stdin.Close() + if twErr != nil || stdinErr != nil { + err = fmt.Errorf("tw: {%s}, stdin: {%s}", twErr, stdinErr) + } + + if waitErr := cmd.Wait(); waitErr != nil { + stderr := "" + if xerr, ok := waitErr.(*exec.ExitError); ok { + stderr = string(xerr.Stderr) + } + log.Printf("%s %s: %s %s", name, cmd.Args, waitErr, stderr) + + err = fmt.Errorf("%s, wait: {%s}", err, waitErr) + return uid, err + } + + return uid, err +} + +func getBridge(bridgeName string) (string, error) { + // {"CreatedAt":"2023-07-11 19:22:25.45027052 +0000 UTC","Driver":"bridge","ID":"fe52c7502c5d","IPv6":"false","Internal":"false","Labels":"goodbye=,hello=","Name":"testnet","Scope":"local"} + // podman has distinctly different fields at v4.4.1 so commented out fields that don't match. We only actually care about ID + type bridgeNet struct { + // CreatedAt string + Driver string + ID string + // IPv6 string + // Internal string + // Labels string + Name string + // Scope string + } + + // if the underlay bridge already exists, return that + // we don't check for a specific label or similar so that it's possible to use a bridge created by other frameworks for composite testing + var bridge bridgeNet + cmd := exec.Command("docker", "network", "ls", "--format={{json .}}", "-f", fmt.Sprintf("name=%s$", bridgeName)) + out, err := cmd.Output() + if err != nil { + log.Printf("vcsim %s: %s, %s", cmd.Args, err, out) + return "", err + } + + // unfortunately docker returns an empty string not an empty json doc and podman returns '[]' + // podman also returns an array of matches even when there's only one, so we normalize. + str := strings.TrimSpace(string(out)) + str = strings.TrimPrefix(str, "[") + str = strings.TrimSuffix(str, "]") + if len(str) == 0 { + return "", nil + } + + err = json.Unmarshal([]byte(str), &bridge) + if err != nil { + log.Printf("vcsim %s: %s, %s", cmd.Args, err, str) + return "", err + } + + return bridge.ID, nil +} + +// createBridge creates a bridge network if one does not already exist +// returns: +// +// uid - string +// err - error or nil +func createBridge(bridgeName string, labels ...string) (string, error) { + + id, err := getBridge(bridgeName) + if err != nil { + return "", err + } + + if id != "" { + return id, nil + } + + run := []string{"network", "create", "--label", createdByVcsim} + for i := range labels { + run = append(run, "--label", labels[i]) + } + run = append(run, bridgeName) + + cmd := exec.Command("docker", run...) + out, err := cmd.Output() + if err != nil { + log.Printf("vcsim %s: %s: %s", cmd.Args, out, err) + return "", err + } + + // docker returns the ID regardless of whether you supply a name when creating the network, however + // podman returns the pretty name, so we have to normalize + id, err = getBridge(bridgeName) + if err != nil { + return "", err + } + + return id, nil +} + +// create +// - name - pretty name, eg. vm name +// - id - uuid or similar - this is merged into container name rather than dictating containerID +// - networks - set of bridges to connect the container to +// - volumes - colon separated tuple of volume name to mount path. Passed directly to docker via -v so mount options can be postfixed. +// - env - array of environment vairables in name=value form +// - optsAndImage - pass-though options and must include at least the container image to use, including tag if necessary +// - args - the command+args to pass to the container +func create(ctx *Context, name string, id string, networks []string, volumes []string, ports []string, env []string, image string, args []string) (*container, error) { + if len(image) == 0 { + return nil, errors.New("cannot create container backing without an image") + } + + var c container + c.name = constructContainerName(name, id) + c.changes = make(chan struct{}) + + for i := range volumes { + // we'll pre-create anonymous volumes, simply for labelling consistency + volName := strings.Split(volumes[i], ":") + createVolume(volName[0], []string{deleteWithContainer, "container=" + c.name}, nil) + } + + // assemble env + var dockerNet []string + var dockerVol []string + var dockerPort []string + var dockerEnv []string + + for i := range env { + dockerEnv = append(dockerEnv, "--env", env[i]) + } + + for i := range volumes { + dockerVol = append(dockerVol, "-v", volumes[i]) + } + + for i := range ports { + dockerPort = append(dockerPort, "-p", ports[i]) + } + + for i := range networks { + dockerNet = append(dockerNet, "--network", networks[i]) + } + + run := []string{"docker", "create", "--name", c.name} + run = append(run, dockerNet...) + run = append(run, dockerVol...) + run = append(run, dockerPort...) + run = append(run, dockerEnv...) + run = append(run, image) + run = append(run, args...) + + // this combines all the run options into a single string that's passed to /bin/bash -c as the single argument to force bash parsing. + // TODO: make this configurable behaviour so users also have the option of not escaping everything for bash + cmd := exec.Command(shell, "-c", strings.Join(run, " ")) + out, err := cmd.Output() + if err != nil { + stderr := "" + if xerr, ok := err.(*exec.ExitError); ok { + stderr = string(xerr.Stderr) + } + log.Printf("%s %s: %s %s", name, cmd.Args, err, stderr) + + return nil, err + } + + c.id = strings.TrimSpace(string(out)) + + return &c, nil +} + +// createVolume takes the specified files and writes them into a volume named for the container. +func (c *container) createVolume(name string, labels []string, files []tarEntry) (string, error) { + return createVolume(c.name+"--"+name, append(labels, "container="+c.name), files) +} + +// inspect retrieves and parses container properties into directly usable struct +// returns: +// +// out - the stdout of the command +// detail - basic struct populated with container details +// err: +// * if c.id is empty, or docker returns "No such object", will return an uninitializedContainer error +// * err from either execution or parsing of json output +func (c *container) inspect() (out []byte, detail containerDetails, err error) { + c.Lock() + id := c.id + c.Unlock() + + if id == "" { + err = uninitializedContainer(errors.New("inspect of uninitialized container")) + return + } + + var details []containerDetails + + cmd := exec.Command("docker", "inspect", c.id) + out, err = cmd.Output() + if eErr, ok := err.(*exec.ExitError); ok { + if strings.Contains(string(eErr.Stderr), "No such object") { + err = uninitializedContainer(errors.New("inspect of uninitialized container")) + } + } + + if err != nil { + return + } + + if err = json.NewDecoder(bytes.NewReader(out)).Decode(&details); err != nil { + return + } + + if len(details) != 1 { + err = fmt.Errorf("multiple containers (%d) match ID: %s", len(details), c.id) + return + } + + detail = details[0] + return +} + +// start +// - if the container already exists, start it or unpause it. +func (c *container) start(ctx *Context) error { + c.Lock() + id := c.id + c.Unlock() + + if id == "" { + return uninitializedContainer(errors.New("start of uninitialized container")) + } + + start := "start" + _, detail, err := c.inspect() + if err != nil { + return err + } + + if detail.State.Paused { + start = "unpause" + } + + cmd := exec.Command("docker", start, c.id) + err = cmd.Run() + if err != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, err) + } + + return err +} + +// pause the container (if any) for the given vm. +func (c *container) pause(ctx *Context) error { + c.Lock() + id := c.id + c.Unlock() + + if id == "" { + return uninitializedContainer(errors.New("pause of uninitialized container")) + } + + cmd := exec.Command("docker", "pause", c.id) + err := cmd.Run() + if err != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, err) + } + + return err +} + +// restart the container (if any) for the given vm. +func (c *container) restart(ctx *Context) error { + c.Lock() + id := c.id + c.Unlock() + + if id == "" { + return uninitializedContainer(errors.New("restart of uninitialized container")) + } + + cmd := exec.Command("docker", "restart", c.id) + err := cmd.Run() + if err != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, err) + } + + return err +} + +// stop the container (if any) for the given vm. +func (c *container) stop(ctx *Context) error { + c.Lock() + id := c.id + c.Unlock() + + if id == "" { + return uninitializedContainer(errors.New("stop of uninitialized container")) + } + + cmd := exec.Command("docker", "stop", c.id) + err := cmd.Run() + if err != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, err) + } + + return err +} + +// exec invokes the specified command, with executable being the first of the args, in the specified container +// returns +// +// string - combined stdout and stderr from command +// err +// * uninitializedContainer error - if c.id is empty +// * err from cmd execution +func (c *container) exec(ctx *Context, args []string) (string, error) { + c.Lock() + id := c.id + c.Unlock() + + if id == "" { + return "", uninitializedContainer(errors.New("exec into uninitialized container")) + } + + args = append([]string{"exec", c.id}, args...) + cmd := exec.Command("docker", args...) + res, err := cmd.CombinedOutput() + if err != nil { + log.Printf("%s: %s (%s)", c.name, cmd.Args, string(res)) + return "", err + } + + return strings.TrimSpace(string(res)), nil +} + +// remove the container (if any) for the given vm. Considers removal of an uninitialized container success. +// Also removes volumes and networks that indicate they are lifecycle coupled with this container. +// returns: +// +// err - joined err from deletion of container and any volumes or networks that have coupled lifecycle +func (c *container) remove(ctx *Context) error { + c.Lock() + defer c.Unlock() + + if c.id == "" { + // consider absence success + return nil + } + + cmd := exec.Command("docker", "rm", "-v", "-f", c.id) + err := cmd.Run() + if err != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, err) + return err + } + + cmd = exec.Command("docker", "volume", "ls", "-q", "--filter", "label=container="+c.name, "--filter", "label="+deleteWithContainer) + volumesToReap, lsverr := cmd.Output() + if lsverr != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, lsverr) + } + log.Printf("%s volumes: %s", c.name, volumesToReap) + + var rmverr error + if len(volumesToReap) > 0 { + run := []string{"volume", "rm", "-f"} + run = append(run, strings.Split(string(volumesToReap), "\n")...) + cmd = exec.Command("docker", run...) + out, rmverr := cmd.Output() + if rmverr != nil { + log.Printf("%s %s: %s, %s", c.name, cmd.Args, rmverr, out) + } + } + + cmd = exec.Command("docker", "network", "ls", "-q", "--filter", "label=container="+c.name, "--filter", "label="+deleteWithContainer) + networksToReap, lsnerr := cmd.Output() + if lsnerr != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, lsnerr) + } + + var rmnerr error + if len(networksToReap) > 0 { + run := []string{"network", "rm", "-f"} + run = append(run, strings.Split(string(volumesToReap), "\n")...) + cmd = exec.Command("docker", run...) + rmnerr = cmd.Run() + if rmnerr != nil { + log.Printf("%s %s: %s", c.name, cmd.Args, rmnerr) + } + } + + if err != nil || lsverr != nil || rmverr != nil || lsnerr != nil || rmnerr != nil { + return fmt.Errorf("err: {%s}, lsverr: {%s}, rmverr: {%s}, lsnerr:{%s}, rmerr: {%s}", err, lsverr, rmverr, lsnerr, rmnerr) + } + + if c.cancelWatch != nil { + c.cancelWatch() + eventWatch.ignore(c) + } + c.id = "" + return nil +} + +// updated is a simple trigger allowing a caller to indicate that something has likely changed about the container +// and interested parties should re-inspect as needed. +func (c *container) updated() { + consolidationWindow := 250 * time.Millisecond + if d, err := time.ParseDuration(os.Getenv("VCSIM_EVENT_CONSOLIDATION_WINDOW")); err == nil { + consolidationWindow = d + } + + select { + case c.changes <- struct{}{}: + time.Sleep(consolidationWindow) + // as this is only a hint to avoid waiting for the full inspect interval, we don't care about accumulating + // multiple triggers. We do pause to allow large numbers of sequential updates to consolidate + default: + } +} + +// watchContainer monitors the underlying container and updates +// properties based on the container status. This occurs until either +// the container or the VM is removed. +// returns: +// +// err - uninitializedContainer error - if c.id is empty +func (c *container) watchContainer(ctx context.Context, updateFn func(*containerDetails, *container) error) error { + c.Lock() + defer c.Unlock() + + if c.id == "" { + return uninitializedContainer(errors.New("Attempt to watch uninitialized container")) + } + + eventWatch.watch(c) + + cancelCtx, cancelFunc := context.WithCancel(ctx) + c.cancelWatch = cancelFunc + + // Update the VM from the container at regular intervals until the done + // channel is closed. + go func() { + inspectInterval := 10 * time.Second + if d, err := time.ParseDuration(os.Getenv("VCSIM_INSPECT_INTERVAL")); err == nil { + inspectInterval = d + } + ticker := time.NewTicker(inspectInterval) + + update := func() { + _, details, err := c.inspect() + var rmErr error + var removing bool + if _, ok := err.(uninitializedContainer); ok { + removing = true + rmErr = c.remove(SpoofContext()) + } + + updateErr := updateFn(&details, c) + // if we don't succeed we want to re-try + if removing && rmErr == nil && updateErr == nil { + ticker.Stop() + return + } + if updateErr != nil { + log.Printf("vcsim container watch: %s %s", c.id, updateErr) + } + } + + for { + select { + case <-c.changes: + update() + case <-ticker.C: + update() + case <-cancelCtx.Done(): + return + } + } + }() + + return nil +} + +func (w *eventWatcher) watch(c *container) { + w.Lock() + defer w.Unlock() + + if w.watches == nil { + w.watches = make(map[string]*container) + } + + w.watches[c.id] = c + + if w.stdin == nil { + cmd := exec.Command("docker", "events", "--format", "'{{.ID}}'", "--filter", "Type=container") + w.stdout, _ = cmd.StdoutPipe() + w.stdin, _ = cmd.StdinPipe() + err := cmd.Start() + if err != nil { + log.Printf("docker event watcher: %s %s", cmd.Args, err) + w.stdin = nil + w.stdout = nil + w.process = nil + + return + } + + w.process = cmd.Process + + go w.monitor() + } +} + +func (w *eventWatcher) ignore(c *container) { + w.Lock() + + delete(w.watches, c.id) + + if len(w.watches) == 0 && w.stdin != nil { + w.stop() + } + + w.Unlock() +} + +func (w *eventWatcher) monitor() { + w.Lock() + watches := len(w.watches) + w.Unlock() + + if watches == 0 { + return + } + + scanner := bufio.NewScanner(w.stdout) + for scanner.Scan() { + id := strings.TrimSpace(scanner.Text()) + + w.Lock() + container := w.watches[id] + w.Unlock() + + if container != nil { + // this is called in a routine to allow an event consolidation window + go container.updated() + } + } +} + +func (w *eventWatcher) stop() { + if w.stdin != nil { + w.stdin.Close() + w.stdin = nil + } + if w.stdout != nil { + w.stdout.Close() + w.stdout = nil + } + w.process.Kill() +} diff --git a/vendor/github.com/vmware/govmomi/simulator/container_host_system.go b/vendor/github.com/vmware/govmomi/simulator/container_host_system.go new file mode 100644 index 0000000000..9d1511e60e --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/container_host_system.go @@ -0,0 +1,353 @@ +/* +Copyright (c) 2023-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "strings" + + "github.com/vmware/govmomi/units" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/types" +) + +const ( + advOptPrefixPnicToUnderlayPrefix = "RUN.underlay." + advOptContainerBackingImage = "RUN.container" + defaultUnderlayBridgeName = "vcsim-underlay" +) + +type simHost struct { + host *HostSystem + c *container +} + +// createSimHostMounts iterates over the provide filesystem mount info, creating docker volumes. It does _not_ delete volumes +// already created if creation of one fails. +// Returns: +// volume mounts: mount options suitable to pass directly to docker +// exec commands: a set of commands to run in the sim host after creation +// error: if construction of the above outputs fails +func createSimHostMounts(ctx *Context, containerName string, mounts []types.HostFileSystemMountInfo) ([]string, [][]string, error) { + var dockerVol []string + var symlinkCmds [][]string + + for i := range mounts { + info := &mounts[i] + name := info.Volume.GetHostFileSystemVolume().Name + + // NOTE: if we ever need persistence cross-invocation we can look at encoding the disk info as a label + labels := []string{"name=" + name, "container=" + containerName, deleteWithContainer} + dockerUuid, err := createVolume("", labels, nil) + if err != nil { + return nil, nil, err + } + + uuid := volumeIDtoHostVolumeUUID(dockerUuid) + name = strings.Replace(name, uuidToken, uuid, -1) + + switch vol := info.Volume.(type) { + case *types.HostVmfsVolume: + vol.BlockSizeMb = 1 + vol.BlockSize = units.KB + vol.UnmapGranularity = units.KB + vol.UnmapPriority = "low" + vol.MajorVersion = 6 + vol.Version = "6.82" + vol.Uuid = uuid + vol.HostFileSystemVolume.Name = name + for e := range vol.Extent { + vol.Extent[e].DiskName = "____simulated_volume_____" + if vol.Extent[e].Partition == 0 { + // HACK: this should be unique within the diskname, but for now this will suffice + // partitions start at 1 + vol.Extent[e].Partition = int32(e + 1) + } + } + vol.Ssd = types.NewBool(true) + vol.Local = types.NewBool(true) + case *types.HostVfatVolume: + vol.HostFileSystemVolume.Name = name + } + + info.VStorageSupport = "vStorageUnsupported" + + info.MountInfo.Path = "/vmfs/volumes/" + uuid + info.MountInfo.Mounted = types.NewBool(true) + info.MountInfo.Accessible = types.NewBool(true) + if info.MountInfo.AccessMode == "" { + info.MountInfo.AccessMode = "readWrite" + } + + opt := "rw" + if info.MountInfo.AccessMode == "readOnly" { + opt = "ro" + } + + dockerVol = append(dockerVol, fmt.Sprintf("%s:/vmfs/volumes/%s:%s", dockerUuid, uuid, opt)) + + // create symlinks from /vmfs/volumes/ for the Volume Name - the direct mount (path) is only the uuid + // ? can we do this via a script in the ESX image instead of via exec? + // ? are the volume names exposed in any manner inside the host? They must be because these mounts exist but where does that come from? Chicken and egg problem? ConfigStore? + symlinkCmds = append(symlinkCmds, []string{"ln", "-s", fmt.Sprintf("/vmfs/volumes/%s", uuid), fmt.Sprintf("/vmfs/volumes/%s", name)}) + if strings.HasPrefix(name, "OSDATA") { + symlinkCmds = append(symlinkCmds, []string{"mkdir", "-p", "/var/lib/vmware"}) + symlinkCmds = append(symlinkCmds, []string{"ln", "-s", fmt.Sprintf("/vmfs/volumes/%s", uuid), "/var/lib/vmware/osdata"}) + } + } + + return dockerVol, symlinkCmds, nil +} + +// createSimHostNetworks creates the networks for the host if not already created. Because we expect multiple hosts on the same network to act as a cluster +// it's likely that only the first host will create networks. +// This includes: +// * bridge network per-pNIC +// * bridge network per-DVS +// +// Returns: +// * array of networks to attach to +// * array of commands to run +// * error +// +// TODO: implement bridge network per DVS - not needed until container backed VMs are "created" on container backed "hosts" +func createSimHostNetworks(ctx *Context, containerName string, networkInfo *types.HostNetworkInfo, advOpts *OptionManager) ([]string, [][]string, error) { + var dockerNet []string + var cmds [][]string + + existingNets := make(map[string]string) + + // a pnic does not have an IP so this is purely a connectivity statement, not a network identity, however this is not how docker works + // so we're going to end up with a veth (our pnic) that does have an IP assigned. That IP will end up being used in a NetConfig structure associated + // with the pNIC. See HostSystem.getNetConfigInterface. + for i := range networkInfo.Pnic { + pnicName := networkInfo.Pnic[i].Device + + bridge := getPnicUnderlay(advOpts, pnicName) + + if pnic, attached := existingNets[bridge]; attached { + return nil, nil, fmt.Errorf("cannot attach multiple pNICs to the same underlay: %s and %s both attempting to connect to %s for %s", pnic, pnicName, bridge, containerName) + } + + _, err := createBridge(bridge) + if err != nil { + return nil, nil, err + } + + dockerNet = append(dockerNet, bridge) + existingNets[bridge] = pnicName + } + + return dockerNet, cmds, nil +} + +func getPnicUnderlay(advOpts *OptionManager, pnicName string) string { + queryRes := advOpts.QueryOptions(&types.QueryOptions{Name: advOptPrefixPnicToUnderlayPrefix + pnicName}).(*methods.QueryOptionsBody).Res + return queryRes.Returnval[0].GetOptionValue().Value.(string) +} + +// createSimulationHostcreates a simHost binding if the host.ConfigManager.AdvancedOption set contains a key "RUN.container". +// If the set does not contain that key, this returns nil. +// Methods on the simHost type are written to check for nil object so the return from this call can be blindly +// assigned and invoked without the caller caring about whether a binding for a backing container was warranted. +// +// The created simhost is based off of the details of the supplied host system. +// VMFS locations are created based on FileSystemMountInfo +// Bridge networks are created to simulate underlay networks - one per pNIC. You cannot connect two pNICs to the same underlay. +// +// On Network connectivity - initially this is using docker network constructs. This means we cannot easily use nested "ip netns" so we cannot +// have a perfect representation of the ESX structure: pnic(veth)->vswtich(bridge)->{vmk,vnic}(veth) +// Instead we have the following: +// * bridge network per underlay - everything connects directly to the underlay +// * VMs/CRXs connect to the underlay dictated by the Uplink pNIC attached to their vSwitch +// * hostd vmknic gets the "host" container IP - we don't currently support multiple vmknics with different IPs +// * no support for mocking VLANs +func createSimulationHost(ctx *Context, host *HostSystem) (*simHost, error) { + sh := &simHost{ + host: host, + } + + advOpts := ctx.Map.Get(host.ConfigManager.AdvancedOption.Reference()).(*OptionManager) + fault := advOpts.QueryOptions(&types.QueryOptions{Name: "RUN.container"}).(*methods.QueryOptionsBody).Fault() + if fault != nil { + if _, ok := fault.VimFault().(*types.InvalidName); ok { + return nil, nil + } + return nil, fmt.Errorf("errror retrieving container backing from host config manager: %+v", fault.VimFault()) + } + + // assemble env + var dockerEnv []string + + var execCmds [][]string + + var err error + + hName := host.Summary.Config.Name + hUuid := host.Summary.Hardware.Uuid + containerName := constructContainerName(hName, hUuid) + + // create volumes and mounts + dockerVol, volCmds, err := createSimHostMounts(ctx, containerName, host.Config.FileSystemVolume.MountInfo) + if err != nil { + return nil, err + } + execCmds = append(execCmds, volCmds...) + + // create networks + dockerNet, netCmds, err := createSimHostNetworks(ctx, containerName, host.Config.Network, advOpts) + if err != nil { + return nil, err + } + execCmds = append(execCmds, netCmds...) + + // create the container + sh.c, err = create(ctx, hName, hUuid, dockerNet, dockerVol, nil, dockerEnv, "alpine", []string{"sleep", "infinity"}) + if err != nil { + return nil, err + } + + // start the container + err = sh.c.start(ctx) + if err != nil { + return nil, err + } + + // run post-creation steps + for _, cmd := range execCmds { + _, err := sh.c.exec(ctx, cmd) + if err != nil { + return nil, err + } + } + + _, detail, err := sh.c.inspect() + if err != nil { + return nil, err + } + for i := range host.Config.Network.Pnic { + pnic := &host.Config.Network.Pnic[i] + bridge := getPnicUnderlay(advOpts, pnic.Device) + settings := detail.NetworkSettings.Networks[bridge] + + // it doesn't really make sense at an ESX level to set this information as IP bindings are associated with + // vnics (VMs) or vmknics (daemons such as hostd). + // However it's a useful location to stash this info in a manner that can be retrieved at a later date. + pnic.Spec.Ip.IpAddress = settings.IPAddress + pnic.Spec.Ip.SubnetMask = prefixToMask(settings.IPPrefixLen) + + pnic.Mac = settings.MacAddress + } + + // update the active "management" nicType with the container IP for vmnic0 + netconfig, err := host.getNetConfigInterface(ctx, "management") + if err != nil { + return nil, err + } + netconfig.vmk.Spec.Ip.IpAddress = netconfig.uplink.Spec.Ip.IpAddress + netconfig.vmk.Spec.Ip.SubnetMask = netconfig.uplink.Spec.Ip.SubnetMask + netconfig.vmk.Spec.Mac = netconfig.uplink.Mac + + return sh, nil +} + +// remove destroys the container associated with the host and any volumes with labels specifying their lifecycle +// is coupled with the container +func (sh *simHost) remove(ctx *Context) error { + if sh == nil { + return nil + } + + return sh.c.remove(ctx) +} + +// volumeIDtoHostVolumeUUID takes the 64 char docker uuid and converts it into a 32char ESX form of 8-8-4-12 +// Perhaps we should do this using an md5 rehash, but instead we just take the first 32char for ease of cross-reference. +func volumeIDtoHostVolumeUUID(id string) string { + return fmt.Sprintf("%s-%s-%s-%s", id[0:8], id[8:16], id[16:20], id[20:32]) +} + +// By reference to physical system, partition numbering tends to work out like this: +// 1. EFI System (100 MB) +// Free space (1.97 MB) +// 5. Basic Data (4 GB) (bootbank1) +// 6. Basic Data (4 GB) (bootbank2) +// 7. VMFSL (119.9 GB) (os-data) +// 8. VMFS (1 TB) (datastore1) +// I assume the jump from 1 -> 5 harks back to the primary/logical partitions from MBT days +const uuidToken = "%__UUID__%" + +var defaultSimVolumes = []types.HostFileSystemMountInfo{ + { + MountInfo: types.HostMountInfo{ + AccessMode: "readWrite", + }, + Volume: &types.HostVmfsVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "VMFS", + Name: "datastore1", + Capacity: 1 * units.TB, + }, + Extent: []types.HostScsiDiskPartition{ + { + Partition: 8, + }, + }, + }, + }, + { + MountInfo: types.HostMountInfo{ + AccessMode: "readWrite", + }, + Volume: &types.HostVmfsVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "OTHER", + Name: "OSDATA-%__UUID__%", + Capacity: 128 * units.GB, + }, + Extent: []types.HostScsiDiskPartition{ + { + Partition: 7, + }, + }, + }, + }, + { + MountInfo: types.HostMountInfo{ + AccessMode: "readOnly", + }, + Volume: &types.HostVfatVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "OTHER", + Name: "BOOTBANK1", + Capacity: 4 * units.GB, + }, + }, + }, + { + MountInfo: types.HostMountInfo{ + AccessMode: "readOnly", + }, + Volume: &types.HostVfatVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "OTHER", + Name: "BOOTBANK2", + Capacity: 4 * units.GB, + }, + }, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/container_virtual_machine.go b/vendor/github.com/vmware/govmomi/simulator/container_virtual_machine.go new file mode 100644 index 0000000000..5a0b7753a9 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/container_virtual_machine.go @@ -0,0 +1,511 @@ +/* +Copyright (c) 2023-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "archive/tar" + "context" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "log" + "net/http" + "strconv" + "strings" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/types" +) + +const ContainerBackingOptionKey = "RUN.container" + +var ( + toolsRunning = []types.PropertyChange{ + {Name: "guest.toolsStatus", Val: types.VirtualMachineToolsStatusToolsOk}, + {Name: "guest.toolsRunningStatus", Val: string(types.VirtualMachineToolsRunningStatusGuestToolsRunning)}, + } + + toolsNotRunning = []types.PropertyChange{ + {Name: "guest.toolsStatus", Val: types.VirtualMachineToolsStatusToolsNotRunning}, + {Name: "guest.toolsRunningStatus", Val: string(types.VirtualMachineToolsRunningStatusGuestToolsNotRunning)}, + } +) + +type simVM struct { + vm *VirtualMachine + c *container +} + +// createSimulationVM inspects the provided VirtualMachine and creates a simVM binding for it if +// the vm.Config.ExtraConfig set contains a key "RUN.container". +// If the ExtraConfig set does not contain that key, this returns nil. +// Methods on the simVM type are written to check for nil object so the return from this call can be blindly +// assigned and invoked without the caller caring about whether a binding for a backing container was warranted. +func createSimulationVM(vm *VirtualMachine) *simVM { + svm := &simVM{ + vm: vm, + } + + for _, opt := range vm.Config.ExtraConfig { + val := opt.GetOptionValue() + if val.Key == ContainerBackingOptionKey { + return svm + } + } + + return nil +} + +// applies container network settings to vm.Guest properties. +func (svm *simVM) syncNetworkConfigToVMGuestProperties() error { + if svm == nil { + return nil + } + + out, detail, err := svm.c.inspect() + if err != nil { + return err + } + + svm.vm.Config.Annotation = "inspect" + svm.vm.logPrintf("%s: %s", svm.vm.Config.Annotation, string(out)) + + netS := detail.NetworkSettings.networkSettings + + // ? Why is this valid - we're taking the first entry while iterating over a MAP + for _, n := range detail.NetworkSettings.Networks { + netS = n + break + } + + if detail.State.Paused { + svm.vm.Runtime.PowerState = types.VirtualMachinePowerStateSuspended + } else if detail.State.Running { + svm.vm.Runtime.PowerState = types.VirtualMachinePowerStatePoweredOn + } else { + svm.vm.Runtime.PowerState = types.VirtualMachinePowerStatePoweredOff + } + + svm.vm.Guest.IpAddress = netS.IPAddress + svm.vm.Summary.Guest.IpAddress = netS.IPAddress + + if len(svm.vm.Guest.Net) != 0 { + net := &svm.vm.Guest.Net[0] + net.IpAddress = []string{netS.IPAddress} + net.MacAddress = netS.MacAddress + net.IpConfig = &types.NetIpConfigInfo{ + IpAddress: []types.NetIpConfigInfoIpAddress{{ + IpAddress: netS.IPAddress, + PrefixLength: int32(netS.IPPrefixLen), + State: string(types.NetIpConfigInfoIpAddressStatusPreferred), + }}, + } + } + + for _, d := range svm.vm.Config.Hardware.Device { + if eth, ok := d.(types.BaseVirtualEthernetCard); ok { + eth.GetVirtualEthernetCard().MacAddress = netS.MacAddress + break + } + } + + return nil +} + +func (svm *simVM) prepareGuestOperation(auth types.BaseGuestAuthentication) types.BaseMethodFault { + if svm == nil || svm.c == nil || svm.c.id == "" { + return new(types.GuestOperationsUnavailable) + } + + if svm.vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOn { + return &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOn, + ExistingState: svm.vm.Runtime.PowerState, + } + } + + switch creds := auth.(type) { + case *types.NamePasswordAuthentication: + if creds.Username == "" || creds.Password == "" { + return new(types.InvalidGuestLogin) + } + default: + return new(types.InvalidGuestLogin) + } + + return nil +} + +// populateDMI writes BIOS UUID DMI files to a container volume +func (svm *simVM) populateDMI() error { + if svm.c == nil { + return nil + } + + files := []tarEntry{ + { + &tar.Header{ + Name: "product_uuid", + Mode: 0444, + }, + []byte(productUUID(svm.vm.uid)), + }, + { + &tar.Header{ + Name: "product_serial", + Mode: 0444, + }, + []byte(productSerial(svm.vm.uid)), + }, + } + + _, err := svm.c.createVolume("dmi", []string{deleteWithContainer}, files) + return err +} + +// start runs the container if specified by the RUN.container extraConfig property. +// lazily creates a container backing if specified by an ExtraConfig property with key "RUN.container" +func (svm *simVM) start(ctx *Context) error { + if svm == nil { + return nil + } + + if svm.c != nil && svm.c.id != "" { + err := svm.c.start(ctx) + if err != nil { + log.Printf("%s %s: %s", svm.vm.Name, "start", err) + } else { + ctx.Update(svm.vm, toolsRunning) + } + + return err + } + + var args []string + var env []string + var ports []string + mountDMI := true + + for _, opt := range svm.vm.Config.ExtraConfig { + val := opt.GetOptionValue() + if val.Key == ContainerBackingOptionKey { + run := val.Value.(string) + err := json.Unmarshal([]byte(run), &args) + if err != nil { + args = []string{run} + } + + continue + } + + if val.Key == "RUN.mountdmi" { + var mount bool + err := json.Unmarshal([]byte(val.Value.(string)), &mount) + if err == nil { + mountDMI = mount + } + + continue + } + + if strings.HasPrefix(val.Key, "RUN.port.") { + // ? would this not make more sense as a set of tuples in the value? + // or inlined into the RUN.container freeform string as is the case with the nginx volume in the examples? + sKey := strings.Split(val.Key, ".") + containerPort := sKey[len(sKey)-1] + ports = append(ports, fmt.Sprintf("%s:%s", val.Value.(string), containerPort)) + + continue + } + + if strings.HasPrefix(val.Key, "RUN.env.") { + sKey := strings.Split(val.Key, ".") + envKey := sKey[len(sKey)-1] + env = append(env, fmt.Sprintf("%s=%s", envKey, val.Value.(string))) + } + + if strings.HasPrefix(val.Key, "guestinfo.") { + key := strings.Replace(strings.ToUpper(val.Key), ".", "_", -1) + env = append(env, fmt.Sprintf("VMX_%s=%s", key, val.Value.(string))) + + continue + } + } + + if len(args) == 0 { + // not an error - it's simply a simVM that shouldn't be backed by a container + return nil + } + + if len(env) != 0 { + // Configure env as the data access method for cloud-init-vmware-guestinfo + env = append(env, "VMX_GUESTINFO=true") + } + + volumes := []string{} + if mountDMI { + volumes = append(volumes, constructVolumeName(svm.vm.Name, svm.vm.uid.String(), "dmi")+":/sys/class/dmi/id") + } + + var err error + svm.c, err = create(ctx, svm.vm.Name, svm.vm.uid.String(), nil, volumes, ports, env, args[0], args[1:]) + if err != nil { + return err + } + + if mountDMI { + // not combined with the test assembling volumes because we want to have the container name first. + // cannot add a label to a volume after creation, so if we want to associate with the container ID the + // container must come first + err = svm.populateDMI() + if err != nil { + return err + } + } + + err = svm.c.start(ctx) + if err != nil { + log.Printf("%s %s: %s %s", svm.vm.Name, "start", args, err) + return err + } + + ctx.Update(svm.vm, toolsRunning) + + svm.vm.logPrintf("%s: %s", args, svm.c.id) + + if err = svm.syncNetworkConfigToVMGuestProperties(); err != nil { + log.Printf("%s inspect %s: %s", svm.vm.Name, svm.c.id, err) + } + + callback := func(details *containerDetails, c *container) error { + spoofctx := SpoofContext() + + if c.id == "" && svm.vm != nil { + // If the container cannot be found then destroy this VM unless the VM is no longer configured for container backing (svm.vm == nil) + taskRef := svm.vm.DestroyTask(spoofctx, &types.Destroy_Task{This: svm.vm.Self}).(*methods.Destroy_TaskBody).Res.Returnval + task, ok := spoofctx.Map.Get(taskRef).(*Task) + if !ok { + panic(fmt.Sprintf("couldn't retrieve task for moref %+q while deleting VM %s", taskRef, svm.vm.Name)) + } + + // Wait for the task to complete and see if there is an error. + task.Wait() + if task.Info.Error != nil { + msg := fmt.Sprintf("failed to destroy vm: err=%v", *task.Info.Error) + svm.vm.logPrintf(msg) + + return errors.New(msg) + } + } + + return svm.syncNetworkConfigToVMGuestProperties() + } + + // Start watching the container resource. + err = svm.c.watchContainer(context.Background(), callback) + if _, ok := err.(uninitializedContainer); ok { + // the container has been deleted before we could watch, despite successful launch so clean up. + callback(nil, svm.c) + + // successful launch so nil the error + return nil + } + + return err +} + +// stop the container (if any) for the given vm. +func (svm *simVM) stop(ctx *Context) error { + if svm == nil || svm.c == nil { + return nil + } + + err := svm.c.stop(ctx) + if err != nil { + log.Printf("%s %s: %s", svm.vm.Name, "stop", err) + + return err + } + + ctx.Update(svm.vm, toolsNotRunning) + + return nil +} + +// pause the container (if any) for the given vm. +func (svm *simVM) pause(ctx *Context) error { + if svm == nil || svm.c == nil { + return nil + } + + err := svm.c.pause(ctx) + if err != nil { + log.Printf("%s %s: %s", svm.vm.Name, "pause", err) + + return err + } + + ctx.Update(svm.vm, toolsNotRunning) + + return nil +} + +// restart the container (if any) for the given vm. +func (svm *simVM) restart(ctx *Context) error { + if svm == nil || svm.c == nil { + return nil + } + + err := svm.c.restart(ctx) + if err != nil { + log.Printf("%s %s: %s", svm.vm.Name, "restart", err) + + return err + } + + ctx.Update(svm.vm, toolsRunning) + + return nil +} + +// remove the container (if any) for the given vm. +func (svm *simVM) remove(ctx *Context) error { + if svm == nil || svm.c == nil { + return nil + } + + err := svm.c.remove(ctx) + if err != nil { + log.Printf("%s %s: %s", svm.vm.Name, "remove", err) + + return err + } + + return nil +} + +func (svm *simVM) exec(ctx *Context, auth types.BaseGuestAuthentication, args []string) (string, types.BaseMethodFault) { + if svm == nil || svm.c == nil { + return "", nil + } + + fault := svm.prepareGuestOperation(auth) + if fault != nil { + return "", fault + } + + out, err := svm.c.exec(ctx, args) + if err != nil { + log.Printf("%s: %s (%s)", svm.vm.Name, args, string(out)) + return "", new(types.GuestOperationsFault) + } + + return strings.TrimSpace(string(out)), nil +} + +func guestUpload(id string, file string, r *http.Request) error { + // TODO: decide behaviour for no container + err := copyToGuest(id, file, r.ContentLength, r.Body) + _ = r.Body.Close() + return err +} + +func guestDownload(id string, file string, w http.ResponseWriter) error { + // TODO: decide behaviour for no container + sink := func(len int64, r io.Reader) error { + w.Header().Set("Content-Length", strconv.FormatInt(len, 10)) + _, err := io.Copy(w, r) + return err + } + + err := copyFromGuest(id, file, sink) + return err +} + +const guestPrefix = "/guestFile/" + +// ServeGuest handles container guest file upload/download +func ServeGuest(w http.ResponseWriter, r *http.Request) { + // Real vCenter form: /guestFile?id=139&token=... + // vcsim form: /guestFile/tmp/foo/bar?id=ebc8837b8cb6&token=... + + id := r.URL.Query().Get("id") + file := strings.TrimPrefix(r.URL.Path, guestPrefix[:len(guestPrefix)-1]) + var err error + + switch r.Method { + case http.MethodPut: + err = guestUpload(id, file, r) + case http.MethodGet: + err = guestDownload(id, file, w) + default: + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + if err != nil { + log.Printf("%s %s: %s", r.Method, r.URL, err) + w.WriteHeader(http.StatusInternalServerError) + } +} + +// productSerial returns the uuid in /sys/class/dmi/id/product_serial format +func productSerial(id uuid.UUID) string { + var dst [len(id)*2 + len(id) - 1]byte + + j := 0 + for i := 0; i < len(id); i++ { + hex.Encode(dst[j:j+2], id[i:i+1]) + j += 3 + if j < len(dst) { + s := j - 1 + if s == len(dst)/2 { + dst[s] = '-' + } else { + dst[s] = ' ' + } + } + } + + return fmt.Sprintf("VMware-%s", string(dst[:])) +} + +// productUUID returns the uuid in /sys/class/dmi/id/product_uuid format +func productUUID(id uuid.UUID) string { + var dst [36]byte + + hex.Encode(dst[0:2], id[3:4]) + hex.Encode(dst[2:4], id[2:3]) + hex.Encode(dst[4:6], id[1:2]) + hex.Encode(dst[6:8], id[0:1]) + dst[8] = '-' + hex.Encode(dst[9:11], id[5:6]) + hex.Encode(dst[11:13], id[4:5]) + dst[13] = '-' + hex.Encode(dst[14:16], id[7:8]) + hex.Encode(dst[16:18], id[6:7]) + dst[18] = '-' + hex.Encode(dst[19:23], id[8:10]) + dst[23] = '-' + hex.Encode(dst[24:], id[10:]) + + return strings.ToUpper(string(dst[:])) +} diff --git a/vendor/github.com/vmware/govmomi/simulator/crypto_manager_kmip.go b/vendor/github.com/vmware/govmomi/simulator/crypto_manager_kmip.go new file mode 100644 index 0000000000..ed0c2db59d --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/crypto_manager_kmip.go @@ -0,0 +1,614 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "slices" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +const ( + nativeKeyProvider = string(types.KmipClusterInfoKmsManagementTypeNativeProvider) +) + +type CryptoManagerKmip struct { + mo.CryptoManagerKmip + + keyIDToProviderID map[string]string +} + +func (m *CryptoManagerKmip) init(r *Registry) { + if m.keyIDToProviderID == nil { + m.keyIDToProviderID = map[string]string{} + } +} + +func (m *CryptoManagerKmip) ListKmipServers( + ctx *Context, req *types.ListKmipServers) soap.HasFault { + + body := methods.ListKmipServersBody{ + Res: &types.ListKmipServersResponse{}, + } + + if len(m.KmipServers) > 0 { + limit := len(m.KmipServers) + if req.Limit != nil { + if reqLimit := int(*req.Limit); reqLimit >= 0 && reqLimit < limit { + limit = reqLimit + } + } + body.Res.Returnval = m.KmipServers[0:limit] + } + + return &body + +} + +// TODO: Implement req.DefaultsToParent +func (m *CryptoManagerKmip) GetDefaultKmsCluster( + ctx *Context, req *types.GetDefaultKmsCluster) soap.HasFault { + + var ( + providerID string + body methods.GetDefaultKmsClusterBody + ) + + for i := range m.KmipServers { + c := m.KmipServers[i] + if req.Entity != nil { + for j := range c.UseAsEntityDefault { + if *req.Entity == c.UseAsEntityDefault[j] { + providerID = c.ClusterId.Id + } + } + } else if c.UseAsDefault { + providerID = c.ClusterId.Id + } + if providerID != "" { + break + } + } + + if providerID == "" { + body.Fault_ = Fault("No default provider", &types.RuntimeFault{}) + } else { + body.Res = &types.GetDefaultKmsClusterResponse{ + Returnval: &types.KeyProviderId{Id: providerID}, + } + } + + return &body +} + +type retrieveKmipServerStatusTask struct { + *CryptoManagerKmip + get []types.KmipClusterInfo + ctx *Context +} + +func (c *retrieveKmipServerStatusTask) Run( + task *Task) (types.AnyType, types.BaseMethodFault) { + + var result []types.CryptoManagerKmipClusterStatus + + if len(c.get) == 0 { + c.get = make([]types.KmipClusterInfo, len(c.KmipServers)) + copy(c.get, c.KmipServers) + } + + for i := range c.get { + g := &c.get[i] + if len(g.Servers) == 0 { + for j := range c.KmipServers { + if g.ClusterId.Id == c.KmipServers[j].ClusterId.Id { + g.Servers = make( + []types.KmipServerInfo, len(c.KmipServers[j].Servers)) + copy(g.Servers, c.KmipServers[j].Servers) + } + } + } + } + + for i := range c.KmipServers { + for j := range c.get { + if c.KmipServers[i].ClusterId.Id == c.get[j].ClusterId.Id { + clusterStatus := types.CryptoManagerKmipClusterStatus{ + ClusterId: types.KeyProviderId{ + Id: c.KmipServers[i].ClusterId.Id, + }, + ManagementType: c.KmipServers[i].ManagementType, + OverallStatus: types.ManagedEntityStatusGreen, + } + for k := range c.KmipServers[i].Servers { + for l := range c.get[j].Servers { + if c.KmipServers[i].Servers[k].Name == c.get[j].Servers[l].Name { + clusterStatus.Servers = append( + clusterStatus.Servers, + types.CryptoManagerKmipServerStatus{ + Name: c.KmipServers[i].Servers[k].Name, + Status: types.ManagedEntityStatusGreen, + }, + ) + } + } + } + result = append(result, clusterStatus) + } + } + } + + return types.ArrayOfCryptoManagerKmipClusterStatus{ + CryptoManagerKmipClusterStatus: result, + }, nil +} + +func (m *CryptoManagerKmip) RetrieveKmipServersStatusTask( + ctx *Context, req *types.RetrieveKmipServersStatus_Task) soap.HasFault { + + var body methods.RetrieveKmipServersStatus_TaskBody + + runner := &retrieveKmipServerStatusTask{ + CryptoManagerKmip: m, + ctx: ctx, + get: req.Clusters, + } + task := CreateTask( + runner.Reference(), + "retrieveKmipServerStatus", + runner.Run) + + body.Res = &types.RetrieveKmipServersStatus_TaskResponse{ + Returnval: task.Run(ctx), + } + + return &body +} + +func (m *CryptoManagerKmip) MarkDefault( + ctx *Context, req *types.MarkDefault) soap.HasFault { + + return m.SetDefaultKmsCluster( + ctx, + &types.SetDefaultKmsCluster{ + This: req.This, + ClusterId: &types.KeyProviderId{ + Id: req.ClusterId.Id, + }, + }) + +} + +func (m *CryptoManagerKmip) SetDefaultKmsCluster( + ctx *Context, req *types.SetDefaultKmsCluster) soap.HasFault { + + var ( + validClusterID bool + body methods.SetDefaultKmsClusterBody + ) + + for i := range m.KmipServers { + c := &m.KmipServers[i] + if req.ClusterId != nil && req.ClusterId.Id != "" { + if c.ClusterId.Id != req.ClusterId.Id { + c.UseAsDefault = false + c.UseAsEntityDefault = nil + } else { + validClusterID = true + if req.Entity == nil { + c.UseAsDefault = true + } else { + found := false + for j := range c.UseAsEntityDefault { + if *req.Entity == c.UseAsEntityDefault[j] { + found = true + break + } + } + if !found { + c.UseAsEntityDefault = append( + c.UseAsEntityDefault, + *req.Entity) + } + } + } + } else if req.Entity != nil { + x := -1 + for j := range c.UseAsEntityDefault { + if *req.Entity == c.UseAsEntityDefault[j] { + x = j + break + } + } + if x >= 0 { + c.UseAsEntityDefault = slices.Delete( + c.UseAsEntityDefault, x, x+1) + } + } else { + c.UseAsDefault = false + } + } + + if req.ClusterId != nil && req.ClusterId.Id != "" && !validClusterID { + body.Fault_ = Fault("Invalid cluster ID", &types.RuntimeFault{}) + } else { + body.Res = &types.SetDefaultKmsClusterResponse{} + } + + return &body +} + +// real vCenter only allows TrustAuthority, but we allow more to simplify test setup +var validClusterTypes = []string{ + string(types.KmipClusterInfoKmsManagementTypeTrustAuthority), + string(types.KmipClusterInfoKmsManagementTypeUnknown), + string(types.KmipClusterInfoKmsManagementTypeNativeProvider), +} + +func (m *CryptoManagerKmip) RegisterKmsCluster( + ctx *Context, req *types.RegisterKmsCluster) soap.HasFault { + + var body methods.RegisterKmsClusterBody + + if slices.Contains(validClusterTypes, req.ManagementType) { + for i := range m.KmipServers { + if req.ClusterId.Id == m.KmipServers[i].ClusterId.Id { + body.Fault_ = Fault("Already registered", &types.RuntimeFault{}) + } + } + } else { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "managementType", + }) + } + if body.Fault_ == nil { + body.Res = &types.RegisterKmsClusterResponse{} + m.KmipServers = append(m.KmipServers, + types.KmipClusterInfo{ + ClusterId: types.KeyProviderId{ + Id: req.ClusterId.Id, + }, + ManagementType: req.ManagementType, + }) + } + + return &body +} + +func (m *CryptoManagerKmip) UnregisterKmsCluster( + ctx *Context, req *types.UnregisterKmsCluster) soap.HasFault { + + var body methods.UnregisterKmsClusterBody + + x := -1 + for i := range m.KmipServers { + if req.ClusterId.Id == m.KmipServers[i].ClusterId.Id { + x = i + } + } + + if x < 0 { + body.Fault_ = Fault("Invalid cluster ID", &types.RuntimeFault{}) + } else { + m.KmipServers = slices.Delete(m.KmipServers, x, x+1) + body.Res = &types.UnregisterKmsClusterResponse{} + } + + return &body +} + +func (m *CryptoManagerKmip) RegisterKmipServer( + ctx *Context, req *types.RegisterKmipServer) soap.HasFault { + + var ( + validClusterID bool + alreadyRegistered bool + body methods.RegisterKmipServerBody + ) + + if req.Server.Info.Name == "" { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "server.info.name"}) + return &body + } + + for i := range m.KmipServers { + c := &m.KmipServers[i] + + if req.Server.ClusterId.Id == c.ClusterId.Id { + validClusterID = true + for j := range c.Servers { + if req.Server.Info.Name == c.Servers[j].Name { + alreadyRegistered = true + break + } + } + if !alreadyRegistered { + c.Servers = append(c.Servers, req.Server.Info) + } + } + + if validClusterID || alreadyRegistered { + break + } + } + + if alreadyRegistered { + body.Fault_ = Fault("Already registered", &types.RuntimeFault{}) + } else { + if !validClusterID { + m.KmipServers = append(m.KmipServers, + types.KmipClusterInfo{ + ClusterId: types.KeyProviderId{ + Id: req.Server.ClusterId.Id, + }, + ManagementType: string(types.KmipClusterInfoKmsManagementTypeVCenter), + Servers: []types.KmipServerInfo{req.Server.Info}, + }) + } + + body.Res = &types.RegisterKmipServerResponse{} + } + + return &body +} + +func (m *CryptoManagerKmip) RemoveKmipServer( + ctx *Context, req *types.RemoveKmipServer) soap.HasFault { + + var ( + validClusterID bool + validServerName bool + body methods.RemoveKmipServerBody + ) + + for i := range m.KmipServers { + c := &m.KmipServers[i] + + if req.ClusterId.Id == c.ClusterId.Id { + validClusterID = true + + x := -1 + for j := range c.Servers { + if req.ServerName == c.Servers[j].Name { + x = j + break + } + } + + if x >= 0 { + validServerName = true + c.Servers = slices.Delete(c.Servers, x, x+1) + } + } + + if validClusterID { + break + } + } + + if !validClusterID { + body.Fault_ = Fault("Invalid cluster ID", &types.RuntimeFault{}) + } else if !validServerName { + body.Fault_ = Fault("Invalid server name", &types.RuntimeFault{}) + } else { + body.Res = &types.RemoveKmipServerResponse{} + } + + return &body +} + +func (m *CryptoManagerKmip) UpdateKmipServer( + ctx *Context, req *types.UpdateKmipServer) soap.HasFault { + + var ( + validClusterID bool + validServerName bool + body methods.UpdateKmipServerBody + ) + + for i := range m.KmipServers { + c := &m.KmipServers[i] + + if req.Server.ClusterId.Id == c.ClusterId.Id { + validClusterID = true + for j := range c.Servers { + if req.Server.Info.Name == c.Servers[j].Name { + validServerName = true + c.Servers[j] = req.Server.Info + break + } + } + } + + if validClusterID { + break + } + } + + if !validClusterID { + body.Fault_ = Fault("Invalid cluster ID", &types.RuntimeFault{}) + } else if !validServerName { + body.Fault_ = Fault("Invalid server name", &types.RuntimeFault{}) + } else { + body.Res = &types.UpdateKmipServerResponse{} + } + + return &body +} + +func (m *CryptoManagerKmip) GenerateKey( + ctx *Context, req *types.GenerateKey) soap.HasFault { + + var ( + provider types.KmipClusterInfo + body methods.GenerateKeyBody + ) + + for i := range m.KmipServers { + c := m.KmipServers[i] + if req.KeyProvider == nil { + if c.UseAsDefault { + provider = c + } + } else if req.KeyProvider.Id == c.ClusterId.Id { + provider = c + } + if provider.ClusterId.Id != "" { + break + } + } + + if provider.ClusterId.Id == "" { + body.Fault_ = Fault("No default provider", &types.RuntimeFault{}) + } else if provider.ManagementType == nativeKeyProvider { + body.Fault_ = Fault( + "Cannot generate keys with native key provider", + &types.RuntimeFault{}) + } else { + newKey := uuid.NewString() + m.keyIDToProviderID[newKey] = provider.ClusterId.Id + + body.Res = &types.GenerateKeyResponse{ + Returnval: types.CryptoKeyResult{ + Success: true, + KeyId: types.CryptoKeyId{ + KeyId: newKey, + ProviderId: &types.KeyProviderId{ + Id: provider.ClusterId.Id, + }, + }, + }, + } + } + + return &body +} + +func (m *CryptoManagerKmip) ListKeys( + ctx *Context, req *types.ListKeys) soap.HasFault { + + body := methods.ListKeysBody{ + Res: &types.ListKeysResponse{}, + } + + if len(m.keyIDToProviderID) > 0 { + var ( + i int + limit = len(m.keyIDToProviderID) + ) + if req.Limit != nil { + if reqLimit := int(*req.Limit); reqLimit >= 0 && reqLimit < limit { + limit = reqLimit + } + } + for keyID, providerID := range m.keyIDToProviderID { + if i >= limit { + break + } + i++ + body.Res.Returnval = append(body.Res.Returnval, types.CryptoKeyId{ + KeyId: keyID, + ProviderId: &types.KeyProviderId{ + Id: providerID, + }, + }) + } + } + + return &body +} + +func getDefaultProvider( + ctx *Context, + vm *VirtualMachine, + generateKey bool) (string, string) { + + m := ctx.Map.CryptoManager() + if m == nil { + return "", "" + } + + var ( + providerID string + keyID string + ) + + ctx.WithLock(m, func() { + // Lookup the default provider ID via the VM's parent entities: + // host, host folder, cluster. + if host := vm.Runtime.Host; host != nil { + for i := range m.KmipServers { + kmipCluster := m.KmipServers[i] + for j := range kmipCluster.UseAsEntityDefault { + parent := host + for providerID == "" && parent != nil { + if kmipCluster.UseAsEntityDefault[j] == *parent { + providerID = kmipCluster.ClusterId.Id + break + } else { + // TODO (akutz): Support looking up the + // default entity via the host + // folder and cluster. + parent = nil + } + } + if providerID != "" { + break + } + } + if providerID != "" { + break + } + } + } + + // If the default provider ID has not been discovered, see if + // any of the providers are the global default. + if providerID == "" { + for i := range m.KmipServers { + if providerID == "" && m.KmipServers[i].UseAsDefault { + providerID = m.KmipServers[i].ClusterId.Id + break + } + } + } + }) + + if providerID != "" && generateKey { + keyID = generateKeyForProvider(ctx, providerID) + } + + return providerID, keyID +} + +func generateKeyForProvider(ctx *Context, providerID string) string { + m := ctx.Map.CryptoManager() + if m == nil { + return "" + } + var keyID string + ctx.WithLock(m, func() { + keyID = uuid.NewString() + m.keyIDToProviderID[keyID] = providerID + }) + return keyID +} diff --git a/vendor/github.com/vmware/govmomi/simulator/custom_fields_manager.go b/vendor/github.com/vmware/govmomi/simulator/custom_fields_manager.go new file mode 100644 index 0000000000..4aac583f8f --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/custom_fields_manager.go @@ -0,0 +1,221 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type CustomFieldsManager struct { + mo.CustomFieldsManager + + nextKey int32 +} + +// Iterates through all entities of passed field type; +// Removes found field from their custom field properties. +func entitiesFieldRemove(ctx *Context, field types.CustomFieldDef) { + entities := ctx.Map.All(field.ManagedObjectType) + for _, e := range entities { + entity := e.Entity() + ctx.WithLock(entity, func() { + aFields := entity.AvailableField + for i, aField := range aFields { + if aField.Key == field.Key { + entity.AvailableField = append(aFields[:i], aFields[i+1:]...) + break + } + } + + values := e.Entity().Value + for i, value := range values { + if value.(*types.CustomFieldStringValue).Key == field.Key { + entity.Value = append(values[:i], values[i+1:]...) + break + } + } + + cValues := e.Entity().CustomValue + for i, cValue := range cValues { + if cValue.(*types.CustomFieldStringValue).Key == field.Key { + entity.CustomValue = append(cValues[:i], cValues[i+1:]...) + break + } + } + }) + } +} + +// Iterates through all entities of passed field type; +// Renames found field in entity's AvailableField property. +func entitiesFieldRename(ctx *Context, field types.CustomFieldDef) { + entities := ctx.Map.All(field.ManagedObjectType) + for _, e := range entities { + entity := e.Entity() + ctx.WithLock(entity, func() { + aFields := entity.AvailableField + for i, aField := range aFields { + if aField.Key == field.Key { + aFields[i].Name = field.Name + break + } + } + }) + } +} + +func (c *CustomFieldsManager) findByNameType(name, moType string) (int, *types.CustomFieldDef) { + for i, field := range c.Field { + if (field.ManagedObjectType == "" || field.ManagedObjectType == moType || moType == "") && + field.Name == name { + return i, &c.Field[i] + } + } + + return -1, nil +} + +func (c *CustomFieldsManager) findByKey(key int32) (int, *types.CustomFieldDef) { + for i, field := range c.Field { + if field.Key == key { + return i, &c.Field[i] + } + } + + return -1, nil +} + +func (c *CustomFieldsManager) AddCustomFieldDef(ctx *Context, req *types.AddCustomFieldDef) soap.HasFault { + body := &methods.AddCustomFieldDefBody{} + + _, field := c.findByNameType(req.Name, req.MoType) + if field != nil { + body.Fault_ = Fault("", &types.DuplicateName{ + Name: req.Name, + Object: c.Reference(), + }) + return body + } + + def := types.CustomFieldDef{ + Key: c.nextKey, + Name: req.Name, + ManagedObjectType: req.MoType, + Type: req.MoType, + FieldDefPrivileges: req.FieldDefPolicy, + FieldInstancePrivileges: req.FieldPolicy, + } + + entities := ctx.Map.All(req.MoType) + for _, e := range entities { + entity := e.Entity() + ctx.WithLock(entity, func() { + entity.AvailableField = append(entity.AvailableField, def) + }) + } + + c.Field = append(c.Field, def) + c.nextKey++ + + body.Res = &types.AddCustomFieldDefResponse{ + Returnval: def, + } + return body +} + +func (c *CustomFieldsManager) RemoveCustomFieldDef(ctx *Context, req *types.RemoveCustomFieldDef) soap.HasFault { + body := &methods.RemoveCustomFieldDefBody{} + + i, field := c.findByKey(req.Key) + if field == nil { + body.Fault_ = Fault("", &types.NotFound{}) + return body + } + + entitiesFieldRemove(ctx, *field) + + c.Field = append(c.Field[:i], c.Field[i+1:]...) + + body.Res = &types.RemoveCustomFieldDefResponse{} + return body +} + +func (c *CustomFieldsManager) RenameCustomFieldDef(ctx *Context, req *types.RenameCustomFieldDef) soap.HasFault { + body := &methods.RenameCustomFieldDefBody{} + + _, field := c.findByKey(req.Key) + if field == nil { + body.Fault_ = Fault("", &types.NotFound{}) + return body + } + + field.Name = req.Name + + entitiesFieldRename(ctx, *field) + + body.Res = &types.RenameCustomFieldDefResponse{} + return body +} + +func (c *CustomFieldsManager) SetField(ctx *Context, req *types.SetField) soap.HasFault { + body := &methods.SetFieldBody{} + + _, field := c.findByKey(req.Key) + if field == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "key"}) + return body + } + + newValue := &types.CustomFieldStringValue{ + CustomFieldValue: types.CustomFieldValue{Key: req.Key}, + Value: req.Value, + } + + removeIndex := func(s []types.BaseCustomFieldValue, i int) []types.BaseCustomFieldValue { + new := make([]types.BaseCustomFieldValue, 0) + new = append(new, s[:i]...) + return append(new, s[i+1:]...) + } + + removeExistingValues := func(s []types.BaseCustomFieldValue) []types.BaseCustomFieldValue { + for i := 0; i < len(s); { + if s[i].GetCustomFieldValue().Key == newValue.GetCustomFieldValue().Key { + s = removeIndex(s, i) + } + i++ + } + return s + } + + entity := ctx.Map.Get(req.Entity).(mo.Entity).Entity() + + ctx.WithLock(entity, func() { + // Check if custom value and value are already set. If so, remove them. + entity.CustomValue = removeExistingValues(entity.CustomValue) + entity.Value = removeExistingValues(entity.Value) + + // Add the new value + entity.CustomValue = append(entity.CustomValue, newValue) + entity.Value = append(entity.Value, newValue) + }) + + body.Res = &types.SetFieldResponse{} + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/customization_spec_manager.go b/vendor/github.com/vmware/govmomi/simulator/customization_spec_manager.go new file mode 100644 index 0000000000..4ef7a51ee8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/customization_spec_manager.go @@ -0,0 +1,358 @@ +/* +Copyright (c) 2019-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "encoding/pem" + "fmt" + "sync/atomic" + "time" + + "github.com/vmware/govmomi/simulator/internal" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var DefaultCustomizationSpec = []types.CustomizationSpecItem{ + { + Info: types.CustomizationSpecInfo{ + Name: "vcsim-linux", + Description: "", + Type: "Linux", + ChangeVersion: "1569965707", + LastUpdateTime: types.NewTime(time.Now()), + }, + Spec: types.CustomizationSpec{ + Options: &types.CustomizationLinuxOptions{}, + Identity: &types.CustomizationLinuxPrep{ + CustomizationIdentitySettings: types.CustomizationIdentitySettings{}, + HostName: &types.CustomizationVirtualMachineName{}, + Domain: "eng.vmware.com", + TimeZone: "Pacific/Apia", + HwClockUTC: types.NewBool(true), + }, + GlobalIPSettings: types.CustomizationGlobalIPSettings{ + DnsSuffixList: nil, + DnsServerList: []string{"127.0.1.1"}, + }, + NicSettingMap: []types.CustomizationAdapterMapping{ + { + MacAddress: "", + Adapter: types.CustomizationIPSettings{ + Ip: &types.CustomizationDhcpIpGenerator{}, + SubnetMask: "", + Gateway: nil, + IpV6Spec: (*types.CustomizationIPSettingsIpV6AddressSpec)(nil), + DnsServerList: nil, + DnsDomain: "", + PrimaryWINS: "", + SecondaryWINS: "", + NetBIOS: "", + }, + }, + }, + EncryptionKey: nil, + }, + }, + { + Info: types.CustomizationSpecInfo{ + Name: "vcsim-linux-static", + Description: "", + Type: "Linux", + ChangeVersion: "1569969598", + LastUpdateTime: types.NewTime(time.Now()), + }, + Spec: types.CustomizationSpec{ + Options: &types.CustomizationLinuxOptions{}, + Identity: &types.CustomizationLinuxPrep{ + CustomizationIdentitySettings: types.CustomizationIdentitySettings{}, + HostName: &types.CustomizationPrefixName{ + CustomizationName: types.CustomizationName{}, + Base: "vcsim", + }, + Domain: "eng.vmware.com", + TimeZone: "Africa/Cairo", + HwClockUTC: types.NewBool(true), + }, + GlobalIPSettings: types.CustomizationGlobalIPSettings{ + DnsSuffixList: nil, + DnsServerList: []string{"127.0.1.1"}, + }, + NicSettingMap: []types.CustomizationAdapterMapping{ + { + MacAddress: "", + Adapter: types.CustomizationIPSettings{ + Ip: &types.CustomizationUnknownIpGenerator{}, + SubnetMask: "255.255.255.0", + Gateway: []string{"10.0.0.1"}, + IpV6Spec: (*types.CustomizationIPSettingsIpV6AddressSpec)(nil), + DnsServerList: nil, + DnsDomain: "", + PrimaryWINS: "", + SecondaryWINS: "", + NetBIOS: "", + }, + }, + }, + EncryptionKey: nil, + }, + }, + { + Info: types.CustomizationSpecInfo{ + Name: "vcsim-windows-static", + Description: "", + Type: "Windows", + ChangeVersion: "1569978029", + LastUpdateTime: types.NewTime(time.Now()), + }, + Spec: types.CustomizationSpec{ + Options: &types.CustomizationWinOptions{ + CustomizationOptions: types.CustomizationOptions{}, + ChangeSID: true, + DeleteAccounts: false, + Reboot: "", + }, + Identity: &types.CustomizationSysprep{ + CustomizationIdentitySettings: types.CustomizationIdentitySettings{}, + GuiUnattended: types.CustomizationGuiUnattended{ + Password: (*types.CustomizationPassword)(nil), + TimeZone: 2, + AutoLogon: false, + AutoLogonCount: 1, + }, + UserData: types.CustomizationUserData{ + FullName: "vcsim", + OrgName: "VMware", + ComputerName: &types.CustomizationVirtualMachineName{}, + ProductId: "", + }, + GuiRunOnce: (*types.CustomizationGuiRunOnce)(nil), + Identification: types.CustomizationIdentification{ + JoinWorkgroup: "WORKGROUP", + JoinDomain: "", + DomainAdmin: "", + DomainAdminPassword: (*types.CustomizationPassword)(nil), + }, + LicenseFilePrintData: &types.CustomizationLicenseFilePrintData{ + AutoMode: "perServer", + AutoUsers: 5, + }, + }, + GlobalIPSettings: types.CustomizationGlobalIPSettings{}, + NicSettingMap: []types.CustomizationAdapterMapping{ + { + MacAddress: "", + Adapter: types.CustomizationIPSettings{ + Ip: &types.CustomizationUnknownIpGenerator{}, + SubnetMask: "255.255.255.0", + Gateway: []string{"10.0.0.1"}, + IpV6Spec: (*types.CustomizationIPSettingsIpV6AddressSpec)(nil), + DnsServerList: nil, + DnsDomain: "", + PrimaryWINS: "", + SecondaryWINS: "", + NetBIOS: "", + }, + }, + }, + EncryptionKey: nil, + }, + }, + { + Info: types.CustomizationSpecInfo{ + Name: "vcsim-windows-domain", + Description: "", + Type: "Windows", + ChangeVersion: "1569970234", + LastUpdateTime: types.NewTime(time.Now()), + }, + Spec: types.CustomizationSpec{ + Options: &types.CustomizationWinOptions{ + CustomizationOptions: types.CustomizationOptions{}, + ChangeSID: true, + DeleteAccounts: false, + Reboot: "", + }, + Identity: &types.CustomizationSysprep{ + CustomizationIdentitySettings: types.CustomizationIdentitySettings{}, + GuiUnattended: types.CustomizationGuiUnattended{ + Password: &types.CustomizationPassword{ + Value: "3Gs...==", + PlainText: false, + }, + TimeZone: 15, + AutoLogon: false, + AutoLogonCount: 1, + }, + UserData: types.CustomizationUserData{ + FullName: "dougm", + OrgName: "VMware", + ComputerName: &types.CustomizationVirtualMachineName{}, + ProductId: "", + }, + GuiRunOnce: (*types.CustomizationGuiRunOnce)(nil), + Identification: types.CustomizationIdentification{ + JoinWorkgroup: "", + JoinDomain: "DOMAIN", + DomainAdmin: "vcsim", + DomainAdminPassword: &types.CustomizationPassword{ + Value: "H3g...==", + PlainText: false, + }, + }, + LicenseFilePrintData: &types.CustomizationLicenseFilePrintData{ + AutoMode: "perServer", + AutoUsers: 5, + }, + }, + GlobalIPSettings: types.CustomizationGlobalIPSettings{}, + NicSettingMap: []types.CustomizationAdapterMapping{ + { + MacAddress: "", + Adapter: types.CustomizationIPSettings{ + Ip: &types.CustomizationUnknownIpGenerator{}, + SubnetMask: "255.255.255.0", + Gateway: []string{"10.0.0.1"}, + IpV6Spec: (*types.CustomizationIPSettingsIpV6AddressSpec)(nil), + DnsServerList: nil, + DnsDomain: "", + PrimaryWINS: "", + SecondaryWINS: "", + NetBIOS: "", + }, + }, + }, + EncryptionKey: nil, + }, + }, +} + +type CustomizationSpecManager struct { + mo.CustomizationSpecManager + + items []types.CustomizationSpecItem +} + +func (m *CustomizationSpecManager) init(r *Registry) { + m.items = DefaultCustomizationSpec + + // Real VC is different DN, X509v3 extensions, etc. + // This is still useful for testing []byte of DER encoded cert over SOAP + if len(m.EncryptionKey) == 0 { + block, _ := pem.Decode(internal.LocalhostCert) + m.EncryptionKey = block.Bytes + } +} + +var customizeNameCounter uint64 + +func customizeName(vm *VirtualMachine, base types.BaseCustomizationName) string { + n := atomic.AddUint64(&customizeNameCounter, 1) + + switch name := base.(type) { + case *types.CustomizationPrefixName: + return fmt.Sprintf("%s-%d", name.Base, n) + case *types.CustomizationCustomName: + return fmt.Sprintf("%s-%d", name.Argument, n) + case *types.CustomizationFixedName: + return name.Name + case *types.CustomizationUnknownName: + return "" + case *types.CustomizationVirtualMachineName: + return fmt.Sprintf("%s-%d", vm.Name, n) + default: + return "" + } +} + +func (m *CustomizationSpecManager) DoesCustomizationSpecExist(ctx *Context, req *types.DoesCustomizationSpecExist) soap.HasFault { + exists := false + + for _, item := range m.items { + if item.Info.Name == req.Name { + exists = true + break + } + } + + return &methods.DoesCustomizationSpecExistBody{ + Res: &types.DoesCustomizationSpecExistResponse{ + Returnval: exists, + }, + } +} + +func (m *CustomizationSpecManager) GetCustomizationSpec(ctx *Context, req *types.GetCustomizationSpec) soap.HasFault { + body := new(methods.GetCustomizationSpecBody) + + for _, item := range m.items { + if item.Info.Name == req.Name { + body.Res = &types.GetCustomizationSpecResponse{ + Returnval: item, + } + return body + } + } + + body.Fault_ = Fault("", new(types.NotFound)) + + return body +} + +func (m *CustomizationSpecManager) CreateCustomizationSpec(ctx *Context, req *types.CreateCustomizationSpec) soap.HasFault { + body := new(methods.CreateCustomizationSpecBody) + + for _, item := range m.items { + if item.Info.Name == req.Item.Info.Name { + body.Fault_ = Fault("", &types.AlreadyExists{Name: req.Item.Info.Name}) + return body + } + } + + m.items = append(m.items, req.Item) + body.Res = new(types.CreateCustomizationSpecResponse) + + return body +} + +func (m *CustomizationSpecManager) OverwriteCustomizationSpec(ctx *Context, req *types.OverwriteCustomizationSpec) soap.HasFault { + body := new(methods.OverwriteCustomizationSpecBody) + + for i, item := range m.items { + if item.Info.Name == req.Item.Info.Name { + m.items[i] = req.Item + body.Res = new(types.OverwriteCustomizationSpecResponse) + return body + } + } + + body.Fault_ = Fault("", new(types.NotFound)) + + return body +} + +func (m *CustomizationSpecManager) Get() mo.Reference { + clone := *m + + for i := range clone.items { + clone.Info = append(clone.Info, clone.items[i].Info) + } + + return &clone +} diff --git a/vendor/github.com/vmware/govmomi/simulator/datacenter.go b/vendor/github.com/vmware/govmomi/simulator/datacenter.go new file mode 100644 index 0000000000..7680b602a7 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/datacenter.go @@ -0,0 +1,222 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "log" + "strings" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type Datacenter struct { + mo.Datacenter + + isESX bool +} + +// NewDatacenter creates a Datacenter and its child folders. +func NewDatacenter(ctx *Context, f *mo.Folder) *Datacenter { + dc := &Datacenter{ + isESX: f.Self == esx.RootFolder.Self, + } + + if dc.isESX { + dc.Datacenter = esx.Datacenter + } + + folderPutChild(ctx, f, dc) + + dc.createFolders(ctx) + + return dc +} + +func (dc *Datacenter) RenameTask(ctx *Context, r *types.Rename_Task) soap.HasFault { + return RenameTask(ctx, dc, r) +} + +// Create Datacenter Folders. +// Every Datacenter has 4 inventory Folders: Vm, Host, Datastore and Network. +// The ESX folder child types are limited to 1 type. +// The VC folders have additional child types, including nested folders. +func (dc *Datacenter) createFolders(ctx *Context) { + folders := []struct { + ref *types.ManagedObjectReference + name string + types []string + }{ + {&dc.VmFolder, "vm", []string{"VirtualMachine", "VirtualApp", "Folder"}}, + {&dc.HostFolder, "host", []string{"ComputeResource", "Folder"}}, + {&dc.DatastoreFolder, "datastore", []string{"Datastore", "StoragePod", "Folder"}}, + {&dc.NetworkFolder, "network", []string{"Network", "DistributedVirtualSwitch", "Folder"}}, + } + + for _, f := range folders { + folder := &Folder{} + folder.Name = f.name + + if dc.isESX { + folder.ChildType = f.types[:1] + folder.Self = *f.ref + ctx.Map.PutEntity(dc, folder) + } else { + folder.ChildType = f.types + e := ctx.Map.PutEntity(dc, folder) + + // propagate the generated morefs to Datacenter + ref := e.Reference() + f.ref.Type = ref.Type + f.ref.Value = ref.Value + } + } + + net := ctx.Map.Get(dc.NetworkFolder).(*Folder) + + for _, ref := range esx.Datacenter.Network { + // Add VM Network by default to each Datacenter + network := &mo.Network{} + network.Self = ref + network.Name = strings.Split(ref.Value, "-")[1] + network.Entity().Name = network.Name + if !dc.isESX { + network.Self.Value = "" // we want a different moid per-DC + } + + folderPutChild(ctx, &net.Folder, network) + } +} + +func (dc *Datacenter) defaultNetwork() []types.ManagedObjectReference { + return dc.Network[:1] // VM Network +} + +// folder returns the Datacenter folder that can contain the given object type +func (dc *Datacenter) folder(obj mo.Entity) *mo.Folder { + folders := []types.ManagedObjectReference{ + dc.VmFolder, + dc.HostFolder, + dc.DatastoreFolder, + dc.NetworkFolder, + } + otype := getManagedObject(obj).Type() + rtype := obj.Reference().Type + + for i := range folders { + folder, _ := asFolderMO(Map.Get(folders[i])) + for _, kind := range folder.ChildType { + if rtype == kind { + return folder + } + if f, ok := otype.FieldByName(kind); ok && f.Anonymous { + return folder + } + } + } + + log.Panicf("failed to find folder for type=%s", rtype) + return nil +} + +func datacenterEventArgument(obj mo.Entity) *types.DatacenterEventArgument { + dc, ok := obj.(*Datacenter) + if !ok { + dc = Map.getEntityDatacenter(obj) + } + return &types.DatacenterEventArgument{ + Datacenter: dc.Self, + EntityEventArgument: types.EntityEventArgument{Name: dc.Name}, + } +} + +func (dc *Datacenter) PowerOnMultiVMTask(ctx *Context, req *types.PowerOnMultiVM_Task) soap.HasFault { + task := CreateTask(dc, "powerOnMultiVM", func(_ *Task) (types.AnyType, types.BaseMethodFault) { + if dc.isESX { + return nil, new(types.NotImplemented) + } + + // Return per-VM tasks, structured as: + // thisTask.result - DC level task + // +- []Attempted + // +- subTask.result - VM level powerOn task result + // +- ... + res := types.ClusterPowerOnVmResult{} + res.Attempted = []types.ClusterAttemptedVmInfo{} + + for _, ref := range req.Vm { + vm, ok := ctx.Map.Get(ref).(*VirtualMachine) + if !ok { + continue + } + // This task creates multiple subtasks which violates the assumption + // of 1:1 Context:Task, which results in data races in objects + // like the Simulator.Event manager. This is the minimum context + // required for the PowerOnVMTask to complete. + taskCtx := &Context{ + Context: ctx.Context, + Session: ctx.Session, + Map: ctx.Map, + } + + // NOTE: Simulator does not actually perform any specific host-level placement + // (equivalent to vSphere DRS). + taskCtx.WithLock(vm, func() { + vmTaskBody := vm.PowerOnVMTask(taskCtx, &types.PowerOnVM_Task{}).(*methods.PowerOnVM_TaskBody) + res.Attempted = append(res.Attempted, types.ClusterAttemptedVmInfo{Vm: ref, Task: &vmTaskBody.Res.Returnval}) + }) + } + + return res, nil + }) + + return &methods.PowerOnMultiVM_TaskBody{ + Res: &types.PowerOnMultiVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (d *Datacenter) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + task := CreateTask(d, "destroy", func(t *Task) (types.AnyType, types.BaseMethodFault) { + folders := []types.ManagedObjectReference{ + d.VmFolder, + d.HostFolder, + } + + for _, ref := range folders { + f, _ := asFolderMO(ctx.Map.Get(ref)) + if len(f.ChildEntity) != 0 { + return nil, &types.ResourceInUse{} + } + } + + p, _ := asFolderMO(ctx.Map.Get(*d.Parent)) + folderRemoveChild(ctx, p, d.Self) + + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/dataset.go b/vendor/github.com/vmware/govmomi/simulator/dataset.go new file mode 100644 index 0000000000..0a1b0627ee --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/dataset.go @@ -0,0 +1,65 @@ +/* +Copyright (c) 2023-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vapi/vm/dataset" +) + +type DataSet struct { + *dataset.Info + ID string + Entries map[string]string +} + +func copyDataSetsForVmClone(src map[string]*DataSet) map[string]*DataSet { + copy := make(map[string]*DataSet, len(src)) + for k, v := range src { + if v.OmitFromSnapshotAndClone { + continue + } + copy[k] = copyDataSet(v) + } + return copy +} + +func copyDataSet(src *DataSet) *DataSet { + if src == nil { + return nil + } + copy := &DataSet{ + Info: &dataset.Info{ + Name: src.Name, + Description: src.Description, + Host: src.Host, + Guest: src.Guest, + Used: src.Used, + OmitFromSnapshotAndClone: src.OmitFromSnapshotAndClone, + }, + ID: src.ID, + Entries: copyEntries(src.Entries), + } + return copy +} + +func copyEntries(src map[string]string) map[string]string { + copy := make(map[string]string, len(src)) + for k, v := range src { + copy[k] = v + } + return copy +} diff --git a/vendor/github.com/vmware/govmomi/simulator/datastore.go b/vendor/github.com/vmware/govmomi/simulator/datastore.go new file mode 100644 index 0000000000..277674afef --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/datastore.go @@ -0,0 +1,117 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "net/url" + "os" + "path" + "strings" + "time" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type Datastore struct { + mo.Datastore +} + +func (ds *Datastore) eventArgument() *types.DatastoreEventArgument { + return &types.DatastoreEventArgument{ + Datastore: ds.Self, + EntityEventArgument: types.EntityEventArgument{Name: ds.Name}, + } +} + +func (ds *Datastore) model(m *Model) error { + info := ds.Info.GetDatastoreInfo() + u, _ := url.Parse(info.Url) + if u.Scheme == "ds" { + // rewrite saved vmfs path to a local temp dir + u.Path = path.Clean(u.Path) + parent := strings.ReplaceAll(path.Dir(u.Path), "/", "_") + name := strings.ReplaceAll(path.Base(u.Path), ":", "_") + + dir, err := m.createTempDir(parent, name) + if err != nil { + return err + } + + info.Url = dir + } + return nil +} + +func parseDatastorePath(dsPath string) (*object.DatastorePath, types.BaseMethodFault) { + var p object.DatastorePath + + if p.FromString(dsPath) { + return &p, nil + } + + return nil, &types.InvalidDatastorePath{DatastorePath: dsPath} +} + +func (ds *Datastore) RefreshDatastore(*types.RefreshDatastore) soap.HasFault { + r := &methods.RefreshDatastoreBody{} + + _, err := os.Stat(ds.Info.GetDatastoreInfo().Url) + if err != nil { + r.Fault_ = Fault(err.Error(), &types.HostConfigFault{}) + return r + } + + info := ds.Info.GetDatastoreInfo() + + info.Timestamp = types.NewTime(time.Now()) + + r.Res = &types.RefreshDatastoreResponse{} + return r +} + +func (ds *Datastore) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + task := CreateTask(ds, "destroy", func(*Task) (types.AnyType, types.BaseMethodFault) { + if len(ds.Vm) != 0 { + return nil, &types.ResourceInUse{ + Type: ds.Self.Type, + Name: ds.Name, + } + } + + for _, mount := range ds.Host { + host := ctx.Map.Get(mount.Key).(*HostSystem) + ctx.Map.RemoveReference(ctx, host, &host.Datastore, ds.Self) + parent := hostParent(&host.HostSystem) + ctx.Map.RemoveReference(ctx, parent, &parent.Datastore, ds.Self) + } + + p, _ := asFolderMO(ctx.Map.Get(*ds.Parent)) + folderRemoveChild(ctx, p, ds.Self) + + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/datastore_namespace_manager.go b/vendor/github.com/vmware/govmomi/simulator/datastore_namespace_manager.go new file mode 100644 index 0000000000..2c642896b3 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/datastore_namespace_manager.go @@ -0,0 +1,67 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + + "github.com/vmware/govmomi/internal" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type DatastoreNamespaceManager struct { + mo.DatastoreNamespaceManager +} + +func (m *DatastoreNamespaceManager) ConvertNamespacePathToUuidPath(ctx *Context, req *types.ConvertNamespacePathToUuidPath) soap.HasFault { + body := new(methods.ConvertNamespacePathToUuidPathBody) + + if req.Datacenter == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "datacenterRef"}) + return body + } + + dc := ctx.Map.Get(*req.Datacenter).(*Datacenter) + + var ds *Datastore + for _, ref := range dc.Datastore { + ds = ctx.Map.Get(ref).(*Datastore) + if strings.HasPrefix(req.NamespaceUrl, ds.Summary.Url) { + break + } + ds = nil + } + + if ds == nil { + body.Fault_ = Fault("", &types.InvalidDatastorePath{DatastorePath: req.NamespaceUrl}) + return body + } + + if !internal.IsDatastoreVSAN(ds.Datastore) { + body.Fault_ = Fault("", &types.InvalidDatastore{Datastore: &ds.Self}) + return body + } + + body.Res = &types.ConvertNamespacePathToUuidPathResponse{ + Returnval: req.NamespaceUrl, + } + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/doc.go b/vendor/github.com/vmware/govmomi/simulator/doc.go new file mode 100644 index 0000000000..61635c32c1 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/doc.go @@ -0,0 +1,22 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package simulator is a mock framework for the vSphere API. + +See also: https://github.com/vmware/govmomi/blob/main/vcsim/README.md +*/ +package simulator diff --git a/vendor/github.com/vmware/govmomi/simulator/dvs.go b/vendor/github.com/vmware/govmomi/simulator/dvs.go new file mode 100644 index 0000000000..45de0c3861 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/dvs.go @@ -0,0 +1,434 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "strconv" + "strings" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type DistributedVirtualSwitch struct { + mo.DistributedVirtualSwitch + + types.FetchDVPortsResponse +} + +func (s *DistributedVirtualSwitch) eventArgument() *types.DvsEventArgument { + return &types.DvsEventArgument{ + EntityEventArgument: types.EntityEventArgument{ + Name: s.Name, + }, + Dvs: s.Self, + } +} + +func (s *DistributedVirtualSwitch) event() types.DvsEvent { + return types.DvsEvent{ + Event: types.Event{ + Datacenter: datacenterEventArgument(s), + Dvs: s.eventArgument(), + }, + } +} + +func (s *DistributedVirtualSwitch) AddDVPortgroupTask(ctx *Context, c *types.AddDVPortgroup_Task) soap.HasFault { + task := CreateTask(s, "addDVPortgroup", func(t *Task) (types.AnyType, types.BaseMethodFault) { + f := ctx.Map.getEntityParent(s, "Folder").(*Folder) + + portgroups := s.Portgroup + portgroupNames := s.Summary.PortgroupName + + for _, spec := range c.Spec { + pg := &DistributedVirtualPortgroup{} + pg.Name = spec.Name + pg.Entity().Name = pg.Name + + // Standard AddDVPortgroupTask() doesn't allow duplicate names, but NSX 3.0 does create some DVPGs with the same name. + // Allow duplicate names using this prefix so we can reproduce and test this condition. + if strings.HasPrefix(pg.Name, "NSX-") || spec.BackingType == string(types.DistributedVirtualPortgroupBackingTypeNsx) { + if spec.LogicalSwitchUuid == "" { + spec.LogicalSwitchUuid = uuid.New().String() + } + if spec.SegmentId == "" { + spec.SegmentId = fmt.Sprintf("/infra/segments/vnet_%s", uuid.New().String()) + } + + } else { + if obj := ctx.Map.FindByName(pg.Name, f.ChildEntity); obj != nil { + return nil, &types.DuplicateName{ + Name: pg.Name, + Object: obj.Reference(), + } + } + } + + folderPutChild(ctx, &f.Folder, pg) + + pg.Key = pg.Self.Value + pg.Config = types.DVPortgroupConfigInfo{ + Key: pg.Key, + Name: pg.Name, + NumPorts: spec.NumPorts, + DistributedVirtualSwitch: &s.Self, + DefaultPortConfig: spec.DefaultPortConfig, + Description: spec.Description, + Type: spec.Type, + Policy: spec.Policy, + PortNameFormat: spec.PortNameFormat, + Scope: spec.Scope, + VendorSpecificConfig: spec.VendorSpecificConfig, + ConfigVersion: spec.ConfigVersion, + AutoExpand: spec.AutoExpand, + VmVnicNetworkResourcePoolKey: spec.VmVnicNetworkResourcePoolKey, + LogicalSwitchUuid: spec.LogicalSwitchUuid, + SegmentId: spec.SegmentId, + BackingType: spec.BackingType, + } + + if pg.Config.LogicalSwitchUuid != "" { + if pg.Config.BackingType == "" { + pg.Config.BackingType = "nsx" + } + } + + if pg.Config.DefaultPortConfig == nil { + pg.Config.DefaultPortConfig = &types.VMwareDVSPortSetting{ + Vlan: new(types.VmwareDistributedVirtualSwitchVlanIdSpec), + UplinkTeamingPolicy: &types.VmwareUplinkPortTeamingPolicy{ + Policy: &types.StringPolicy{ + Value: "loadbalance_srcid", + }, + ReversePolicy: &types.BoolPolicy{ + Value: types.NewBool(true), + }, + NotifySwitches: &types.BoolPolicy{ + Value: types.NewBool(true), + }, + RollingOrder: &types.BoolPolicy{ + Value: types.NewBool(true), + }, + }, + } + } + + if pg.Config.Policy == nil { + pg.Config.Policy = &types.VMwareDVSPortgroupPolicy{ + DVPortgroupPolicy: types.DVPortgroupPolicy{ + BlockOverrideAllowed: true, + ShapingOverrideAllowed: false, + VendorConfigOverrideAllowed: false, + LivePortMovingAllowed: false, + PortConfigResetAtDisconnect: true, + NetworkResourcePoolOverrideAllowed: types.NewBool(false), + TrafficFilterOverrideAllowed: types.NewBool(false), + }, + VlanOverrideAllowed: false, + UplinkTeamingOverrideAllowed: false, + SecurityPolicyOverrideAllowed: false, + IpfixOverrideAllowed: types.NewBool(false), + } + } + + for i := 0; i < int(spec.NumPorts); i++ { + pg.PortKeys = append(pg.PortKeys, strconv.Itoa(i)) + } + + portgroups = append(portgroups, pg.Self) + portgroupNames = append(portgroupNames, pg.Name) + + for _, h := range s.Summary.HostMember { + pg.Host = append(pg.Host, h) + + host := ctx.Map.Get(h).(*HostSystem) + ctx.Map.AppendReference(ctx, host, &host.Network, pg.Reference()) + + parent := ctx.Map.Get(*host.HostSystem.Parent) + computeNetworks := append(hostParent(&host.HostSystem).Network, pg.Reference()) + ctx.Update(parent, []types.PropertyChange{ + {Name: "network", Val: computeNetworks}, + }) + } + + ctx.postEvent(&types.DVPortgroupCreatedEvent{ + DVPortgroupEvent: pg.event(ctx), + }) + } + + ctx.Update(s, []types.PropertyChange{ + {Name: "portgroup", Val: portgroups}, + {Name: "summary.portgroupName", Val: portgroupNames}, + }) + + return nil, nil + }) + + return &methods.AddDVPortgroup_TaskBody{ + Res: &types.AddDVPortgroup_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (s *DistributedVirtualSwitch) ReconfigureDvsTask(ctx *Context, req *types.ReconfigureDvs_Task) soap.HasFault { + task := CreateTask(s, "reconfigureDvs", func(t *Task) (types.AnyType, types.BaseMethodFault) { + spec := req.Spec.GetDVSConfigSpec() + + members := s.Summary.HostMember + + for _, member := range spec.Host { + h := ctx.Map.Get(member.Host) + if h == nil { + return nil, &types.ManagedObjectNotFound{Obj: member.Host} + } + + host := h.(*HostSystem) + + switch types.ConfigSpecOperation(member.Operation) { + case types.ConfigSpecOperationAdd: + if FindReference(s.Summary.HostMember, member.Host) != nil { + return nil, &types.AlreadyExists{Name: host.Name} + } + + hostNetworks := append(host.Network, s.Portgroup...) + ctx.Update(host, []types.PropertyChange{ + {Name: "network", Val: hostNetworks}, + }) + members = append(members, member.Host) + parent := ctx.Map.Get(*host.HostSystem.Parent) + + var pgs []types.ManagedObjectReference + for _, ref := range s.Portgroup { + pg := ctx.Map.Get(ref).(*DistributedVirtualPortgroup) + pgs = append(pgs, ref) + + pgHosts := append(pg.Host, member.Host) + ctx.Update(pg, []types.PropertyChange{ + {Name: "host", Val: pgHosts}, + }) + + cr := hostParent(&host.HostSystem) + if FindReference(cr.Network, ref) == nil { + computeNetworks := append(cr.Network, ref) + ctx.Update(parent, []types.PropertyChange{ + {Name: "network", Val: computeNetworks}, + }) + } + } + + ctx.postEvent(&types.DvsHostJoinedEvent{ + DvsEvent: s.event(), + HostJoined: *host.eventArgument(), + }) + case types.ConfigSpecOperationRemove: + for _, ref := range host.Vm { + vm := ctx.Map.Get(ref).(*VirtualMachine) + if pg := FindReference(vm.Network, s.Portgroup...); pg != nil { + return nil, &types.ResourceInUse{ + Type: pg.Type, + Name: pg.Value, + } + } + } + + RemoveReference(&members, member.Host) + + ctx.postEvent(&types.DvsHostLeftEvent{ + DvsEvent: s.event(), + HostLeft: *host.eventArgument(), + }) + case types.ConfigSpecOperationEdit: + return nil, &types.NotSupported{} + } + } + + ctx.Update(s, []types.PropertyChange{ + {Name: "summary.hostMember", Val: members}, + }) + + ctx.postEvent(&types.DvsReconfiguredEvent{ + DvsEvent: s.event(), + ConfigSpec: spec, + }) + + return nil, nil + }) + + return &methods.ReconfigureDvs_TaskBody{ + Res: &types.ReconfigureDvs_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (s *DistributedVirtualSwitch) FetchDVPorts(req *types.FetchDVPorts) soap.HasFault { + body := &methods.FetchDVPortsBody{} + body.Res = &types.FetchDVPortsResponse{ + Returnval: s.dvPortgroups(req.Criteria), + } + return body +} + +func (s *DistributedVirtualSwitch) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + task := CreateTask(s, "destroy", func(t *Task) (types.AnyType, types.BaseMethodFault) { + // TODO: should return ResourceInUse fault if any VM is using a port on this switch + // and past that, remove refs from each host.Network, etc + f := ctx.Map.getEntityParent(s, "Folder").(*Folder) + folderRemoveChild(ctx, &f.Folder, s.Reference()) + ctx.postEvent(&types.DvsDestroyedEvent{DvsEvent: s.event()}) + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (s *DistributedVirtualSwitch) dvPortgroups(criteria *types.DistributedVirtualSwitchPortCriteria) []types.DistributedVirtualPort { + res := s.FetchDVPortsResponse.Returnval + if len(res) != 0 { + return res + } + + for _, ref := range s.Portgroup { + pg := Map.Get(ref).(*DistributedVirtualPortgroup) + + for _, key := range pg.PortKeys { + res = append(res, types.DistributedVirtualPort{ + DvsUuid: s.Uuid, + Key: key, + PortgroupKey: pg.Key, + Config: types.DVPortConfigInfo{ + Setting: pg.Config.DefaultPortConfig, + }, + }) + } + } + + // filter ports by criteria + res = s.filterDVPorts(res, criteria) + + return res +} + +func (s *DistributedVirtualSwitch) filterDVPorts( + ports []types.DistributedVirtualPort, + criteria *types.DistributedVirtualSwitchPortCriteria, +) []types.DistributedVirtualPort { + if criteria == nil { + return ports + } + + ports = s.filterDVPortsByPortgroupKey(ports, criteria) + ports = s.filterDVPortsByPortKey(ports, criteria) + ports = s.filterDVPortsByConnected(ports, criteria) + + return ports +} + +func (s *DistributedVirtualSwitch) filterDVPortsByPortgroupKey( + ports []types.DistributedVirtualPort, + criteria *types.DistributedVirtualSwitchPortCriteria, +) []types.DistributedVirtualPort { + if len(criteria.PortgroupKey) == 0 || criteria.Inside == nil { + return ports + } + + // inside portgroup keys + if *criteria.Inside { + filtered := []types.DistributedVirtualPort{} + + for _, p := range ports { + for _, pgk := range criteria.PortgroupKey { + if p.PortgroupKey == pgk { + filtered = append(filtered, p) + break + } + } + } + return filtered + } + + // outside portgroup keys + filtered := []types.DistributedVirtualPort{} + + for _, p := range ports { + found := false + for _, pgk := range criteria.PortgroupKey { + if p.PortgroupKey == pgk { + found = true + break + } + } + + if !found { + filtered = append(filtered, p) + } + } + return filtered +} + +func (s *DistributedVirtualSwitch) filterDVPortsByPortKey( + ports []types.DistributedVirtualPort, + criteria *types.DistributedVirtualSwitchPortCriteria, +) []types.DistributedVirtualPort { + if len(criteria.PortKey) == 0 { + return ports + } + + filtered := []types.DistributedVirtualPort{} + + for _, p := range ports { + for _, pk := range criteria.PortKey { + if p.Key == pk { + filtered = append(filtered, p) + break + } + } + } + + return filtered +} + +func (s *DistributedVirtualSwitch) filterDVPortsByConnected( + ports []types.DistributedVirtualPort, + criteria *types.DistributedVirtualSwitchPortCriteria, +) []types.DistributedVirtualPort { + if criteria.Connected == nil { + return ports + } + + filtered := []types.DistributedVirtualPort{} + + for _, p := range ports { + connected := p.Connectee != nil + if connected == *criteria.Connected { + filtered = append(filtered, p) + } + } + + return filtered +} diff --git a/vendor/github.com/vmware/govmomi/simulator/dvs_manager.go b/vendor/github.com/vmware/govmomi/simulator/dvs_manager.go new file mode 100644 index 0000000000..8643027c10 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/dvs_manager.go @@ -0,0 +1,51 @@ +/* + Copyright (c) 2020 VMware, Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type DistributedVirtualSwitchManager struct { + mo.DistributedVirtualSwitchManager +} + +func (m *DistributedVirtualSwitchManager) DVSManagerLookupDvPortGroup(ctx *Context, req *types.DVSManagerLookupDvPortGroup) soap.HasFault { + body := &methods.DVSManagerLookupDvPortGroupBody{} + + for _, obj := range ctx.Map.All("DistributedVirtualSwitch") { + dvs := obj.(*DistributedVirtualSwitch) + if dvs.Uuid == req.SwitchUuid { + for _, ref := range dvs.Portgroup { + pg := ctx.Map.Get(ref).(*DistributedVirtualPortgroup) + if pg.Key == req.PortgroupKey { + body.Res = &types.DVSManagerLookupDvPortGroupResponse{ + Returnval: &ref, + } + return body + } + } + } + } + + body.Fault_ = Fault("", new(types.NotFound)) + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/entity.go b/vendor/github.com/vmware/govmomi/simulator/entity.go new file mode 100644 index 0000000000..403bbb47e7 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/entity.go @@ -0,0 +1,47 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +func RenameTask(ctx *Context, e mo.Entity, r *types.Rename_Task, dup ...bool) soap.HasFault { + task := CreateTask(e, "rename", func(t *Task) (types.AnyType, types.BaseMethodFault) { + obj := ctx.Map.Get(r.This).(mo.Entity).Entity() + + canDup := len(dup) == 1 && dup[0] + if parent, ok := asFolderMO(ctx.Map.Get(*obj.Parent)); ok && !canDup { + if ctx.Map.FindByName(r.NewName, parent.ChildEntity) != nil { + return nil, &types.InvalidArgument{InvalidProperty: "name"} + } + } + + ctx.Update(e, []types.PropertyChange{{Name: "name", Val: r.NewName}}) + + return nil, nil + }) + + return &methods.Rename_TaskBody{ + Res: &types.Rename_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/environment_browser.go b/vendor/github.com/vmware/govmomi/simulator/environment_browser.go new file mode 100644 index 0000000000..008fedbbe3 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/environment_browser.go @@ -0,0 +1,341 @@ +/* +Copyright (c) 2019-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type EnvironmentBrowser struct { + mo.EnvironmentBrowser + + QueryConfigTargetResponse types.QueryConfigTargetResponse + QueryConfigOptionResponse types.QueryConfigOptionResponse + QueryConfigOptionDescriptorResponse types.QueryConfigOptionDescriptorResponse + QueryTargetCapabilitiesResponse types.QueryTargetCapabilitiesResponse +} + +func newEnvironmentBrowser( + ctx *Context, + hostRefs ...types.ManagedObjectReference) *types.ManagedObjectReference { + + env := new(EnvironmentBrowser) + env.initDescriptorReturnVal(ctx, hostRefs...) + Map.Put(env) + return &env.Self +} + +func (b *EnvironmentBrowser) addHost( + ctx *Context, hostRef types.ManagedObjectReference) { + + // Get a set of unique hosts. + hostSet := map[types.ManagedObjectReference]struct{}{ + hostRef: {}, + } + for i := range b.QueryConfigOptionDescriptorResponse.Returnval { + cod := b.QueryConfigOptionDescriptorResponse.Returnval[i] + for j := range cod.Host { + if _, ok := hostSet[cod.Host[j]]; !ok { + hostSet[cod.Host[j]] = struct{}{} + } + } + } + + // Get a list of unique hosts. + var hostRefs []types.ManagedObjectReference + for ref := range hostSet { + hostRefs = append(hostRefs, ref) + } + + // Clear the descriptor's return val. + b.QueryConfigOptionDescriptorResponse.Returnval = nil + + b.initDescriptorReturnVal(ctx, hostRefs...) +} + +func (b *EnvironmentBrowser) initDescriptorReturnVal( + ctx *Context, hostRefs ...types.ManagedObjectReference) { + + // Get the max supported hardware version for this list of hosts. + var maxHardwareVersion types.HardwareVersion + maxHardwareVersionForHost := map[types.ManagedObjectReference]types.HardwareVersion{} + for j := range hostRefs { + ref := hostRefs[j] + ctx.WithLock(ref, func() { + host := ctx.Map.Get(ref).(*HostSystem) + hostVersion := types.MustParseESXiVersion(host.Config.Product.Version) + hostHardwareVersion := hostVersion.HardwareVersion() + maxHardwareVersionForHost[ref] = hostHardwareVersion + if !maxHardwareVersion.IsValid() { + maxHardwareVersion = hostHardwareVersion + return + } + if hostHardwareVersion > maxHardwareVersion { + maxHardwareVersion = hostHardwareVersion + } + }) + } + + if !maxHardwareVersion.IsValid() { + return + } + + hardwareVersions := types.GetHardwareVersions() + for i := range hardwareVersions { + hv := hardwareVersions[i] + dco := hv == maxHardwareVersion + cod := types.VirtualMachineConfigOptionDescriptor{ + Key: hv.String(), + Description: hv.String(), + DefaultConfigOption: types.NewBool(dco), + CreateSupported: types.NewBool(true), + RunSupported: types.NewBool(true), + UpgradeSupported: types.NewBool(true), + } + for hostRef, hostVer := range maxHardwareVersionForHost { + if hostVer >= hv { + cod.Host = append(cod.Host, hostRef) + } + } + + b.QueryConfigOptionDescriptorResponse.Returnval = append( + b.QueryConfigOptionDescriptorResponse.Returnval, cod) + + if dco { + break + } + } +} + +func (b *EnvironmentBrowser) hosts(ctx *Context) []types.ManagedObjectReference { + ctx.Map.m.Lock() + defer ctx.Map.m.Unlock() + for _, obj := range ctx.Map.objects { + switch e := obj.(type) { + case *mo.ComputeResource: + if b.Self == *e.EnvironmentBrowser { + return e.Host + } + case *ClusterComputeResource: + if b.Self == *e.EnvironmentBrowser { + return e.Host + } + } + } + return nil +} + +func (b *EnvironmentBrowser) QueryConfigOption(req *types.QueryConfigOption) soap.HasFault { + body := new(methods.QueryConfigOptionBody) + + opt := b.QueryConfigOptionResponse.Returnval + if opt == nil { + opt = &types.VirtualMachineConfigOption{ + Version: esx.HardwareVersion, + DefaultDevice: esx.VirtualDevice, + } + } + + body.Res = &types.QueryConfigOptionResponse{ + Returnval: opt, + } + + return body +} + +func guestFamily(id string) string { + // TODO: We could capture the entire GuestOsDescriptor list from EnvironmentBrowser, + // but it is a ton of data.. this should be good enough for now. + switch { + case strings.HasPrefix(id, "win"): + return string(types.VirtualMachineGuestOsFamilyWindowsGuest) + case strings.HasPrefix(id, "darwin"): + return string(types.VirtualMachineGuestOsFamilyDarwinGuestFamily) + default: + return string(types.VirtualMachineGuestOsFamilyLinuxGuest) + } +} + +func (b *EnvironmentBrowser) QueryConfigOptionEx(req *types.QueryConfigOptionEx) soap.HasFault { + body := new(methods.QueryConfigOptionExBody) + + opt := b.QueryConfigOptionResponse.Returnval + if opt == nil { + opt = &types.VirtualMachineConfigOption{ + Version: esx.HardwareVersion, + DefaultDevice: esx.VirtualDevice, + } + } + + if req.Spec != nil { + // From the SDK QueryConfigOptionEx doc: + // "If guestId is nonempty, the guestOSDescriptor array of the config option is filtered to match against the guest IDs in the spec. + // If there is no match, the whole list is returned." + for _, id := range req.Spec.GuestId { + for _, gid := range GuestID { + if string(gid) == id { + opt.GuestOSDescriptor = []types.GuestOsDescriptor{{ + Id: id, + Family: guestFamily(id), + }} + + break + } + } + } + } + + if len(opt.GuestOSDescriptor) == 0 { + for i := range GuestID { + id := string(GuestID[i]) + opt.GuestOSDescriptor = append(opt.GuestOSDescriptor, types.GuestOsDescriptor{ + Id: id, + Family: guestFamily(id), + }) + } + } + + body.Res = &types.QueryConfigOptionExResponse{ + Returnval: opt, + } + + return body +} + +func (b *EnvironmentBrowser) QueryConfigOptionDescriptor(ctx *Context, req *types.QueryConfigOptionDescriptor) soap.HasFault { + body := &methods.QueryConfigOptionDescriptorBody{ + Res: &types.QueryConfigOptionDescriptorResponse{ + Returnval: b.QueryConfigOptionDescriptorResponse.Returnval, + }, + } + + return body +} + +func (b *EnvironmentBrowser) QueryConfigTarget(ctx *Context, req *types.QueryConfigTarget) soap.HasFault { + body := &methods.QueryConfigTargetBody{ + Res: &types.QueryConfigTargetResponse{ + Returnval: b.QueryConfigTargetResponse.Returnval, + }, + } + + if body.Res.Returnval != nil { + return body + } + + target := &types.ConfigTarget{ + SmcPresent: types.NewBool(false), + } + body.Res.Returnval = target + + var hosts []types.ManagedObjectReference + if req.Host == nil { + hosts = b.hosts(ctx) + } else { + hosts = append(hosts, *req.Host) + } + + seen := make(map[types.ManagedObjectReference]bool) + + for i := range hosts { + host := ctx.Map.Get(hosts[i]).(*HostSystem) + target.NumCpus += int32(host.Summary.Hardware.NumCpuPkgs) + target.NumCpuCores += int32(host.Summary.Hardware.NumCpuCores) + target.NumNumaNodes++ + + for _, ref := range host.Datastore { + if seen[ref] { + continue + } + seen[ref] = true + + ds := ctx.Map.Get(ref).(*Datastore) + target.Datastore = append(target.Datastore, types.VirtualMachineDatastoreInfo{ + VirtualMachineTargetInfo: types.VirtualMachineTargetInfo{ + Name: ds.Name, + }, + Datastore: ds.Summary, + Capability: ds.Capability, + Mode: string(types.HostMountModeReadWrite), + VStorageSupport: string(types.FileSystemMountInfoVStorageSupportStatusVStorageUnsupported), + }) + } + + for _, ref := range host.Network { + if seen[ref] { + continue + } + seen[ref] = true + + switch n := ctx.Map.Get(ref).(type) { + case *mo.Network: + target.Network = append(target.Network, types.VirtualMachineNetworkInfo{ + VirtualMachineTargetInfo: types.VirtualMachineTargetInfo{ + Name: n.Name, + }, + Network: n.Summary.GetNetworkSummary(), + }) + case *DistributedVirtualPortgroup: + dvs := ctx.Map.Get(*n.Config.DistributedVirtualSwitch).(*DistributedVirtualSwitch) + target.DistributedVirtualPortgroup = append(target.DistributedVirtualPortgroup, types.DistributedVirtualPortgroupInfo{ + SwitchName: dvs.Name, + SwitchUuid: dvs.Uuid, + PortgroupName: n.Name, + PortgroupKey: n.Key, + PortgroupType: n.Config.Type, + UplinkPortgroup: false, + Portgroup: n.Self, + NetworkReservationSupported: types.NewBool(false), + }) + case *DistributedVirtualSwitch: + target.DistributedVirtualSwitch = append(target.DistributedVirtualSwitch, types.DistributedVirtualSwitchInfo{ + SwitchName: n.Name, + SwitchUuid: n.Uuid, + DistributedVirtualSwitch: n.Self, + NetworkReservationSupported: types.NewBool(false), + }) + } + } + } + + return body +} + +func (b *EnvironmentBrowser) QueryTargetCapabilities(ctx *Context, req *types.QueryTargetCapabilities) soap.HasFault { + body := &methods.QueryTargetCapabilitiesBody{ + Res: &types.QueryTargetCapabilitiesResponse{ + Returnval: b.QueryTargetCapabilitiesResponse.Returnval, + }, + } + + if body.Res.Returnval != nil { + return body + } + + body.Res.Returnval = &types.HostCapability{ + VmotionSupported: true, + MaintenanceModeSupported: true, + } + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/authorization_manager.go b/vendor/github.com/vmware/govmomi/simulator/esx/authorization_manager.go new file mode 100644 index 0000000000..6f375e77d2 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/authorization_manager.go @@ -0,0 +1,105 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// RoleList is the default template for the AuthorizationManager roleList property. +// Capture method: +// govc object.collect -s -dump AuthorizationManager:ha-authmgr roleList +var RoleList = []types.AuthorizationRole{ + { + RoleId: -8, + System: true, + Name: "NoTrustedAdmin", + Info: &types.Description{ + Label: "No Trusted Infrastructure administrator", + Summary: "Full access without Trusted Infrastructure privileges", + }, + Privilege: []string{"Alarm.Acknowledge", "Alarm.Create", "Alarm.Delete", "Alarm.DisableActions", "Alarm.Edit", "Alarm.SetStatus", "Alarm.ToggleEnableOnEntity", "Authorization.ModifyPermissions", "Authorization.ModifyPrivileges", "Authorization.ModifyRoles", "Authorization.ModifyVTContainerMappings", "Authorization.ModifyVTContainers", "Authorization.ReassignRolePermissions", "AutoDeploy.Host.AssociateMachine", "AutoDeploy.Profile.Create", "AutoDeploy.Profile.Edit", "AutoDeploy.Rule.Create", "AutoDeploy.Rule.Delete", "AutoDeploy.Rule.Edit", "AutoDeploy.RuleSet.Activate", "AutoDeploy.RuleSet.Edit", "Certificate.Manage", "CertificateAuthority.Administer", "CertificateAuthority.Manage", "CertificateManagement.Administer", "CertificateManagement.Manage", "CertificateManagementSubscriptions.Create", "CertificateManagementSubscriptions.Delete", "CertificateManagementSubscriptions.Update", "Cns.Searchable", "ComputePolicy.Manage", "ContentLibrary.AddCertToTrustStore", "ContentLibrary.AddLibraryItem", "ContentLibrary.AddSubscription", "ContentLibrary.CheckInTemplate", "ContentLibrary.CheckOutTemplate", "ContentLibrary.CreateLocalLibrary", "ContentLibrary.CreateSubscribedLibrary", "ContentLibrary.DeleteCertFromTrustStore", "ContentLibrary.DeleteLibraryItem", "ContentLibrary.DeleteLocalLibrary", "ContentLibrary.DeleteSubscribedLibrary", "ContentLibrary.DeleteSubscription", "ContentLibrary.DownloadSession", "ContentLibrary.EvictLibraryItem", "ContentLibrary.EvictSubscribedLibrary", "ContentLibrary.GetConfiguration", "ContentLibrary.ImportStorage", "ContentLibrary.ManageClusterRegistryResource", "ContentLibrary.ManageRegistry", "ContentLibrary.ManageRegistryProject", "ContentLibrary.MigrateLibrary", "ContentLibrary.ProbeSubscription", "ContentLibrary.PublishLibrary", "ContentLibrary.PublishLibraryItem", "ContentLibrary.ReadStorage", "ContentLibrary.SyncLibrary", "ContentLibrary.SyncLibraryItem", "ContentLibrary.TypeIntrospection", "ContentLibrary.UpdateConfiguration", "ContentLibrary.UpdateLibrary", "ContentLibrary.UpdateLibraryItem", "ContentLibrary.UpdateLocalLibrary", "ContentLibrary.UpdateSession", "ContentLibrary.UpdateSubscribedLibrary", "ContentLibrary.UpdateSubscription", "Cryptographer.Access", "Cryptographer.AddDisk", "Cryptographer.Clone", "Cryptographer.Decrypt", "Cryptographer.Encrypt", "Cryptographer.EncryptNew", "Cryptographer.ManageEncryptionPolicy", "Cryptographer.ManageKeyServers", "Cryptographer.ManageKeys", "Cryptographer.Migrate", "Cryptographer.ReadKeyServersInfo", "Cryptographer.Recrypt", "Cryptographer.RegisterHost", "Cryptographer.RegisterVM", "DVPortgroup.Create", "DVPortgroup.Delete", "DVPortgroup.Modify", "DVPortgroup.PolicyOp", "DVPortgroup.ScopeOp", "DVSwitch.Create", "DVSwitch.Delete", "DVSwitch.HostOp", "DVSwitch.Modify", "DVSwitch.Move", "DVSwitch.PolicyOp", "DVSwitch.PortConfig", "DVSwitch.PortSetting", "DVSwitch.ResourceManagement", "DVSwitch.Vspan", "Datacenter.Create", "Datacenter.Delete", "Datacenter.IpPoolConfig", "Datacenter.IpPoolQueryAllocations", "Datacenter.IpPoolReleaseIp", "Datacenter.Move", "Datacenter.Reconfigure", "Datacenter.Rename", "Datacenter.UpdateCarbonInfo", "Datastore.AllocateSpace", "Datastore.Browse", "Datastore.Config", "Datastore.ConfigIOManagement", "Datastore.Delete", "Datastore.DeleteFile", "Datastore.FileManagement", "Datastore.Move", "Datastore.Rename", "Datastore.UpdateVirtualMachineFiles", "Datastore.UpdateVirtualMachineMetadata", "DirectPathProfileManager.Manage", "DrProxy.Host.Configure", "DrProxy.Host.ManageService", "DrProxy.Host.View", "DrProxy.License.Update", "DrProxy.License.View", "DrProxy.Progress.Control", "DrProxy.Vm.Configure", "EAM.Config", "EAM.Modify", "EAM.View", "Extension.Register", "Extension.Unregister", "Extension.Update", "ExternalStatsProvider.Register", "ExternalStatsProvider.Unregister", "ExternalStatsProvider.Update", "Folder.Create", "Folder.Delete", "Folder.ExternalFolderManagement", "Folder.Move", "Folder.Rename", "FoundationLoadBalancers.Manage", "Global.CancelTask", "Global.CapacityPlanning", "Global.Diagnostics", "Global.DisableMethods", "Global.EnableMethods", "Global.GlobalTag", "Global.Health", "Global.Licenses", "Global.LogEvent", "Global.ManageCustomFields", "Global.Proxy", "Global.ScriptAction", "Global.ServiceManagers", "Global.SetCustomField", "Global.Settings", "Global.SystemTag", "Global.VCServer", "GuestDataPublisher.GetData", "HLM.Create", "HLM.Manage", "HealthUpdateProvider.Register", "HealthUpdateProvider.Unregister", "HealthUpdateProvider.Update", "Host.Cim.CimInteraction", "Host.Config.AdvancedConfig", "Host.Config.AuthenticationStore", "Host.Config.AutoStart", "Host.Config.Connection", "Host.Config.DateTime", "Host.Config.Firmware", "Host.Config.GuestStore", "Host.Config.HyperThreading", "Host.Config.Image", "Host.Config.Maintenance", "Host.Config.Memory", "Host.Config.NetService", "Host.Config.Network", "Host.Config.Nvdimm", "Host.Config.Patch", "Host.Config.PciPassthru", "Host.Config.Power", "Host.Config.ProductLocker", "Host.Config.Quarantine", "Host.Config.Resources", "Host.Config.Settings", "Host.Config.Snmp", "Host.Config.Storage", "Host.Config.SystemFirewallRuleSet", "Host.Config.SystemManagement", "Host.Entropy.Read", "Host.Entropy.Write", "Host.Hbr.HbrDaemonManagement", "Host.Hbr.HbrManagement", "Host.Inventory.AddHostToCluster", "Host.Inventory.AddStandaloneHost", "Host.Inventory.CreateCluster", "Host.Inventory.DeleteCluster", "Host.Inventory.EditCluster", "Host.Inventory.ManageClusterLifecyle", "Host.Inventory.MoveCluster", "Host.Inventory.MoveHost", "Host.Inventory.RemoveHostFromCluster", "Host.Inventory.RenameCluster", "Host.Local.CreateVM", "Host.Local.DeleteVM", "Host.Local.InstallAgent", "Host.Local.ManageUserGroups", "Host.Local.ReconfigVM", "Host.Sgx.Register", "Host.Stats.Query", "Infraprofile.Read", "Infraprofile.Write", "IntercomNamespace.Read", "IntercomNamespace.Write", "InventoryService.Tagging.AttachTag", "InventoryService.Tagging.CreateCategory", "InventoryService.Tagging.CreateTag", "InventoryService.Tagging.DeleteCategory", "InventoryService.Tagging.DeleteTag", "InventoryService.Tagging.EditCategory", "InventoryService.Tagging.EditTag", "InventoryService.Tagging.ModifyUsedByForCategory", "InventoryService.Tagging.ModifyUsedByForTag", "InventoryService.Tagging.ObjectAttachable", "Namespaces.Backup", "Namespaces.Configure", "Namespaces.ListAccess", "Namespaces.Manage", "Namespaces.ManageCapabilities", "Namespaces.ManageDisks", "Namespaces.SelfServiceManage", "Namespaces.Upgrade", "Network.Assign", "Network.Config", "Network.Delete", "Network.Move", "Nsx.Manage", "Nsx.ModifyAll", "Nsx.Read", "Observability.Admin", "Observability.StatsProvider.Manage", "OvfManager.OvfConsumerAccess", "PartnerRestDaemon.Read", "PartnerRestDaemon.Write", "Performance.ModifyIntervals", "Plugin.Management", "Profile.Clear", "Profile.Create", "Profile.Delete", "Profile.Edit", "Profile.Export", "Profile.View", "ReplicationService.Administer", "Resource.ApplyRecommendation", "Resource.AssignVAppToPool", "Resource.AssignVMToPool", "Resource.ColdMigrate", "Resource.CreatePool", "Resource.DeletePool", "Resource.EditPool", "Resource.HotMigrate", "Resource.MovePool", "Resource.QueryVMotion", "Resource.RenamePool", "ScheduledTask.Create", "ScheduledTask.Delete", "ScheduledTask.Edit", "ScheduledTask.Run", "ServiceAccount.Administer", "ServiceAccount.ManageAccount", "ServiceAccount.ManagePassword", "Sessions.CollectPrivilegeChecks", "Sessions.GlobalMessage", "Sessions.ImpersonateUser", "Sessions.TerminateSession", "Sessions.ValidateSession", "SettingsStore.Manage", "StoragePod.Config", "StorageProfile.Apply", "StorageProfile.Update", "StorageProfile.View", "StorageViews.ConfigureService", "StorageViews.View", "SupervisorServices.Install", "SupervisorServices.Manage", "System.Anonymous", "System.Read", "System.View", "Task.Create", "Task.Update", "Task.Update.Task.Update", "TenantManager.Query", "TenantManager.Update", "TokenService.PersistableTokenExchange", "TransferService.Manage", "TransferService.Monitor", "Trust.Administer", "Trust.Manage", "VApp.ApplicationConfig", "VApp.AssignResourcePool", "VApp.AssignVApp", "VApp.AssignVM", "VApp.Clone", "VApp.Create", "VApp.Delete", "VApp.Export", "VApp.ExtractOvfEnvironment", "VApp.Import", "VApp.InstanceConfig", "VApp.ManagedByConfig", "VApp.Move", "VApp.PowerOff", "VApp.PowerOn", "VApp.PullFromUrls", "VApp.Rename", "VApp.ResourceConfig", "VApp.Suspend", "VApp.Unregister", "VcIdentityProviders.Create", "VcIdentityProviders.Manage", "VcIdentityProviders.Read", "VcIntegrity.Baseline.com.vmware.vcIntegrity.AssignBaselines", "VcIntegrity.Baseline.com.vmware.vcIntegrity.ManageBaselines", "VcIntegrity.ClusterConfiguration.Export", "VcIntegrity.ClusterConfiguration.Modify", "VcIntegrity.ClusterConfiguration.Remediate", "VcIntegrity.ClusterConfiguration.View", "VcIntegrity.FileUpload.com.vmware.vcIntegrity.ImportFile", "VcIntegrity.General.com.vmware.vcIntegrity.Configure", "VcIntegrity.HardwareCompatibility.Read", "VcIntegrity.HardwareCompatibility.Write", "VcIntegrity.Updates.com.vmware.vcIntegrity.Remediate", "VcIntegrity.Updates.com.vmware.vcIntegrity.Scan", "VcIntegrity.Updates.com.vmware.vcIntegrity.Stage", "VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus", "VcIntegrity.lifecycleDepots.Delete", "VcIntegrity.lifecycleGeneral.Read", "VcIntegrity.lifecycleGeneral.Write", "VcIntegrity.lifecycleHealth.Read", "VcIntegrity.lifecycleHealth.Write", "VcIntegrity.lifecycleSettings.Read", "VcIntegrity.lifecycleSettings.Write", "VcIntegrity.lifecycleSoftwareRemediation.Read", "VcIntegrity.lifecycleSoftwareRemediation.Write", "VcIntegrity.lifecycleSoftwareSpecification.Read", "VcIntegrity.lifecycleSoftwareSpecification.Write", "VcIntegrity.systemVM.Read", "VcIntegrity.systemVM.Write", "VcLifecycle.Upgrade", "VcLifecycle.View", "VirtualMachine.Config.AddExistingDisk", "VirtualMachine.Config.AddNewDisk", "VirtualMachine.Config.AddRemoveDevice", "VirtualMachine.Config.AdvancedConfig", "VirtualMachine.Config.Annotation", "VirtualMachine.Config.CPUCount", "VirtualMachine.Config.ChangeTracking", "VirtualMachine.Config.DiskExtend", "VirtualMachine.Config.DiskLease", "VirtualMachine.Config.EditDevice", "VirtualMachine.Config.HostUSBDevice", "VirtualMachine.Config.ManagedBy", "VirtualMachine.Config.Memory", "VirtualMachine.Config.MksControl", "VirtualMachine.Config.QueryFTCompatibility", "VirtualMachine.Config.QueryUnownedFiles", "VirtualMachine.Config.RawDevice", "VirtualMachine.Config.ReloadFromPath", "VirtualMachine.Config.RemoveDisk", "VirtualMachine.Config.Rename", "VirtualMachine.Config.ResetGuestInfo", "VirtualMachine.Config.Resource", "VirtualMachine.Config.Settings", "VirtualMachine.Config.SwapPlacement", "VirtualMachine.Config.ToggleForkParent", "VirtualMachine.Config.UpgradeVirtualHardware", "VirtualMachine.DataSets.DataSetCreate", "VirtualMachine.DataSets.DataSetDelete", "VirtualMachine.DataSets.DataSetEntryDelete", "VirtualMachine.DataSets.DataSetEntryGet", "VirtualMachine.DataSets.DataSetEntryList", "VirtualMachine.DataSets.DataSetEntrySet", "VirtualMachine.DataSets.DataSetGet", "VirtualMachine.DataSets.DataSetList", "VirtualMachine.DataSets.DataSetUpdate", "VirtualMachine.DataSets.Export", "VirtualMachine.GuestOperations.Execute", "VirtualMachine.GuestOperations.Modify", "VirtualMachine.GuestOperations.ModifyAliases", "VirtualMachine.GuestOperations.Query", "VirtualMachine.GuestOperations.QueryAliases", "VirtualMachine.Hbr.ConfigureReplication", "VirtualMachine.Hbr.MonitorReplication", "VirtualMachine.Hbr.ReplicaManagement", "VirtualMachine.Interact.AnswerQuestion", "VirtualMachine.Interact.Backup", "VirtualMachine.Interact.ConsoleInteract", "VirtualMachine.Interact.CreateScreenshot", "VirtualMachine.Interact.CreateSecondary", "VirtualMachine.Interact.DefragmentAllDisks", "VirtualMachine.Interact.DeviceConnection", "VirtualMachine.Interact.DisableSecondary", "VirtualMachine.Interact.DnD", "VirtualMachine.Interact.EnableSecondary", "VirtualMachine.Interact.GuestControl", "VirtualMachine.Interact.MakePrimary", "VirtualMachine.Interact.Pause", "VirtualMachine.Interact.PowerOff", "VirtualMachine.Interact.PowerOn", "VirtualMachine.Interact.PutUsbScanCodes", "VirtualMachine.Interact.Record", "VirtualMachine.Interact.Replay", "VirtualMachine.Interact.Reset", "VirtualMachine.Interact.SESparseMaintenance", "VirtualMachine.Interact.SetCDMedia", "VirtualMachine.Interact.SetFloppyMedia", "VirtualMachine.Interact.Suspend", "VirtualMachine.Interact.SuspendToMemory", "VirtualMachine.Interact.TerminateFaultTolerantVM", "VirtualMachine.Interact.ToolsInstall", "VirtualMachine.Interact.TurnOffFaultTolerance", "VirtualMachine.Inventory.Create", "VirtualMachine.Inventory.CreateFromExisting", "VirtualMachine.Inventory.Delete", "VirtualMachine.Inventory.Move", "VirtualMachine.Inventory.Register", "VirtualMachine.Inventory.Unregister", "VirtualMachine.Namespace.Event", "VirtualMachine.Namespace.EventNotify", "VirtualMachine.Namespace.Management", "VirtualMachine.Namespace.ModifyContent", "VirtualMachine.Namespace.Query", "VirtualMachine.Namespace.ReadContent", "VirtualMachine.Provisioning.Clone", "VirtualMachine.Provisioning.CloneTemplate", "VirtualMachine.Provisioning.CreateTemplateFromVM", "VirtualMachine.Provisioning.Customize", "VirtualMachine.Provisioning.DeployTemplate", "VirtualMachine.Provisioning.DiskRandomAccess", "VirtualMachine.Provisioning.DiskRandomRead", "VirtualMachine.Provisioning.FileRandomAccess", "VirtualMachine.Provisioning.GetVmFiles", "VirtualMachine.Provisioning.MarkAsTemplate", "VirtualMachine.Provisioning.MarkAsVM", "VirtualMachine.Provisioning.ModifyCustSpecs", "VirtualMachine.Provisioning.PromoteDisks", "VirtualMachine.Provisioning.PutVmFiles", "VirtualMachine.Provisioning.ReadCustSpecs", "VirtualMachine.State.CreateSnapshot", "VirtualMachine.State.RemoveSnapshot", "VirtualMachine.State.RenameSnapshot", "VirtualMachine.State.RevertToSnapshot", "VirtualMachineClasses.Manage", "VmCam.Administer", "VmResourceProfiles.Manage", "Vsan.Cluster.ShallowRekey", "Vsan.Xvc.UpdateClientInfo", "Zone.Manage", "Zone.ObjectAttachable", "vSANStats.Access", "vService.CreateDependency", "vService.DestroyDependency", "vService.ReconfigureDependency", "vService.UpdateDependency", "vSphereClient.UtilizeVerificationCode", "vSphereDataProtection.Protection", "vSphereDataProtection.Recovery", "vStats.CollectAny", "vStats.QueryAny", "vStats.Settings"}, + }, + { + RoleId: -7, + System: true, + Name: "TrustedAdmin", + Info: &types.Description{ + Label: "Trusted Infrastructure administrator", + Summary: "Setup and monitoring of Trusted Infrastructure", + }, + Privilege: []string{"Host.Tpm.Read", "Host.Tpm.Unseal", "System.Anonymous", "System.Read", "System.View", "TrustedAdmin.ConfigureHostCertificates", "TrustedAdmin.ConfigureHostMetadata", "TrustedAdmin.ConfigureTokenConversionPolicy", "TrustedAdmin.ManageAttestingSSO", "TrustedAdmin.ManageKMSTrust", "TrustedAdmin.ManageTrustedHosts", "TrustedAdmin.ReadAttestingSSO", "TrustedAdmin.ReadKMSTrust", "TrustedAdmin.ReadStsInfo", "TrustedAdmin.ReadTrustedHosts", "TrustedAdmin.RetrieveHostMetadata", "TrustedAdmin.RetrieveTPMHostCertificates"}, + }, + { + RoleId: -6, + System: true, + Name: "NoCryptoAdmin", + Info: &types.Description{ + Label: "No cryptography administrator", + Summary: "Full access without Cryptographic operations and Trusted Infrastructure privileges", + }, + Privilege: []string{"Alarm.Acknowledge", "Alarm.Create", "Alarm.Delete", "Alarm.DisableActions", "Alarm.Edit", "Alarm.SetStatus", "Alarm.ToggleEnableOnEntity", "Authorization.ModifyPermissions", "Authorization.ModifyPrivileges", "Authorization.ModifyRoles", "Authorization.ModifyVTContainerMappings", "Authorization.ModifyVTContainers", "Authorization.ReassignRolePermissions", "AutoDeploy.Host.AssociateMachine", "AutoDeploy.Profile.Create", "AutoDeploy.Profile.Edit", "AutoDeploy.Rule.Create", "AutoDeploy.Rule.Delete", "AutoDeploy.Rule.Edit", "AutoDeploy.RuleSet.Activate", "AutoDeploy.RuleSet.Edit", "Certificate.Manage", "CertificateAuthority.Administer", "CertificateAuthority.Manage", "CertificateManagement.Administer", "CertificateManagement.Manage", "CertificateManagementSubscriptions.Create", "CertificateManagementSubscriptions.Delete", "CertificateManagementSubscriptions.Update", "Cns.Searchable", "ComputePolicy.Manage", "ContentLibrary.AddCertToTrustStore", "ContentLibrary.AddLibraryItem", "ContentLibrary.AddSubscription", "ContentLibrary.CheckInTemplate", "ContentLibrary.CheckOutTemplate", "ContentLibrary.CreateLocalLibrary", "ContentLibrary.CreateSubscribedLibrary", "ContentLibrary.DeleteCertFromTrustStore", "ContentLibrary.DeleteLibraryItem", "ContentLibrary.DeleteLocalLibrary", "ContentLibrary.DeleteSubscribedLibrary", "ContentLibrary.DeleteSubscription", "ContentLibrary.DownloadSession", "ContentLibrary.EvictLibraryItem", "ContentLibrary.EvictSubscribedLibrary", "ContentLibrary.GetConfiguration", "ContentLibrary.ImportStorage", "ContentLibrary.ManageClusterRegistryResource", "ContentLibrary.ManageRegistry", "ContentLibrary.ManageRegistryProject", "ContentLibrary.MigrateLibrary", "ContentLibrary.ProbeSubscription", "ContentLibrary.PublishLibrary", "ContentLibrary.PublishLibraryItem", "ContentLibrary.ReadStorage", "ContentLibrary.SyncLibrary", "ContentLibrary.SyncLibraryItem", "ContentLibrary.TypeIntrospection", "ContentLibrary.UpdateConfiguration", "ContentLibrary.UpdateLibrary", "ContentLibrary.UpdateLibraryItem", "ContentLibrary.UpdateLocalLibrary", "ContentLibrary.UpdateSession", "ContentLibrary.UpdateSubscribedLibrary", "ContentLibrary.UpdateSubscription", "DVPortgroup.Create", "DVPortgroup.Delete", "DVPortgroup.Modify", "DVPortgroup.PolicyOp", "DVPortgroup.ScopeOp", "DVSwitch.Create", "DVSwitch.Delete", "DVSwitch.HostOp", "DVSwitch.Modify", "DVSwitch.Move", "DVSwitch.PolicyOp", "DVSwitch.PortConfig", "DVSwitch.PortSetting", "DVSwitch.ResourceManagement", "DVSwitch.Vspan", "Datacenter.Create", "Datacenter.Delete", "Datacenter.IpPoolConfig", "Datacenter.IpPoolQueryAllocations", "Datacenter.IpPoolReleaseIp", "Datacenter.Move", "Datacenter.Reconfigure", "Datacenter.Rename", "Datacenter.UpdateCarbonInfo", "Datastore.AllocateSpace", "Datastore.Browse", "Datastore.Config", "Datastore.ConfigIOManagement", "Datastore.Delete", "Datastore.DeleteFile", "Datastore.FileManagement", "Datastore.Move", "Datastore.Rename", "Datastore.UpdateVirtualMachineFiles", "Datastore.UpdateVirtualMachineMetadata", "DirectPathProfileManager.Manage", "DrProxy.Host.Configure", "DrProxy.Host.ManageService", "DrProxy.Host.View", "DrProxy.License.Update", "DrProxy.License.View", "DrProxy.Progress.Control", "DrProxy.Vm.Configure", "EAM.Config", "EAM.Modify", "EAM.View", "Extension.Register", "Extension.Unregister", "Extension.Update", "ExternalStatsProvider.Register", "ExternalStatsProvider.Unregister", "ExternalStatsProvider.Update", "Folder.Create", "Folder.Delete", "Folder.ExternalFolderManagement", "Folder.Move", "Folder.Rename", "FoundationLoadBalancers.Manage", "Global.CancelTask", "Global.CapacityPlanning", "Global.DisableMethods", "Global.EnableMethods", "Global.GlobalTag", "Global.Health", "Global.Licenses", "Global.LogEvent", "Global.ManageCustomFields", "Global.Proxy", "Global.ScriptAction", "Global.ServiceManagers", "Global.SetCustomField", "Global.Settings", "Global.SystemTag", "Global.VCServer", "GuestDataPublisher.GetData", "HLM.Create", "HLM.Manage", "HealthUpdateProvider.Register", "HealthUpdateProvider.Unregister", "HealthUpdateProvider.Update", "Host.Cim.CimInteraction", "Host.Config.AdvancedConfig", "Host.Config.AuthenticationStore", "Host.Config.AutoStart", "Host.Config.Connection", "Host.Config.DateTime", "Host.Config.Firmware", "Host.Config.GuestStore", "Host.Config.HyperThreading", "Host.Config.Image", "Host.Config.Maintenance", "Host.Config.Memory", "Host.Config.NetService", "Host.Config.Network", "Host.Config.Nvdimm", "Host.Config.Patch", "Host.Config.PciPassthru", "Host.Config.Power", "Host.Config.ProductLocker", "Host.Config.Quarantine", "Host.Config.Resources", "Host.Config.Settings", "Host.Config.Snmp", "Host.Config.Storage", "Host.Config.SystemFirewallRuleSet", "Host.Config.SystemManagement", "Host.Entropy.Read", "Host.Entropy.Write", "Host.Hbr.HbrDaemonManagement", "Host.Hbr.HbrManagement", "Host.Inventory.CreateCluster", "Host.Inventory.DeleteCluster", "Host.Inventory.EditCluster", "Host.Inventory.ManageClusterLifecyle", "Host.Inventory.MoveCluster", "Host.Inventory.MoveHost", "Host.Inventory.RemoveHostFromCluster", "Host.Inventory.RenameCluster", "Host.Local.CreateVM", "Host.Local.DeleteVM", "Host.Local.InstallAgent", "Host.Local.ReconfigVM", "Host.Sgx.Register", "Host.Stats.Query", "Infraprofile.Read", "Infraprofile.Write", "IntercomNamespace.Read", "IntercomNamespace.Write", "InventoryService.Tagging.AttachTag", "InventoryService.Tagging.CreateCategory", "InventoryService.Tagging.CreateTag", "InventoryService.Tagging.DeleteCategory", "InventoryService.Tagging.DeleteTag", "InventoryService.Tagging.EditCategory", "InventoryService.Tagging.EditTag", "InventoryService.Tagging.ModifyUsedByForCategory", "InventoryService.Tagging.ModifyUsedByForTag", "InventoryService.Tagging.ObjectAttachable", "Namespaces.Backup", "Namespaces.Configure", "Namespaces.ListAccess", "Namespaces.Manage", "Namespaces.ManageCapabilities", "Namespaces.ManageDisks", "Namespaces.SelfServiceManage", "Namespaces.Upgrade", "Network.Assign", "Network.Config", "Network.Delete", "Network.Move", "Nsx.Manage", "Nsx.ModifyAll", "Nsx.Read", "Observability.Admin", "Observability.StatsProvider.Manage", "OvfManager.OvfConsumerAccess", "PartnerRestDaemon.Read", "PartnerRestDaemon.Write", "Performance.ModifyIntervals", "Plugin.Management", "Profile.Clear", "Profile.Create", "Profile.Delete", "Profile.Edit", "Profile.Export", "Profile.View", "ReplicationService.Administer", "Resource.ApplyRecommendation", "Resource.AssignVAppToPool", "Resource.AssignVMToPool", "Resource.ColdMigrate", "Resource.CreatePool", "Resource.DeletePool", "Resource.EditPool", "Resource.HotMigrate", "Resource.MovePool", "Resource.QueryVMotion", "Resource.RenamePool", "ScheduledTask.Create", "ScheduledTask.Delete", "ScheduledTask.Edit", "ScheduledTask.Run", "ServiceAccount.Administer", "ServiceAccount.ManageAccount", "ServiceAccount.ManagePassword", "Sessions.CollectPrivilegeChecks", "Sessions.GlobalMessage", "Sessions.ImpersonateUser", "Sessions.TerminateSession", "Sessions.ValidateSession", "SettingsStore.Manage", "StoragePod.Config", "StorageProfile.Apply", "StorageProfile.Update", "StorageProfile.View", "StorageViews.ConfigureService", "StorageViews.View", "SupervisorServices.Install", "SupervisorServices.Manage", "System.Anonymous", "System.Read", "System.View", "Task.Create", "Task.Update", "Task.Update.Task.Update", "TenantManager.Query", "TenantManager.Update", "TokenService.PersistableTokenExchange", "TransferService.Manage", "TransferService.Monitor", "Trust.Administer", "Trust.Manage", "VApp.ApplicationConfig", "VApp.AssignResourcePool", "VApp.AssignVApp", "VApp.AssignVM", "VApp.Clone", "VApp.Create", "VApp.Delete", "VApp.Export", "VApp.ExtractOvfEnvironment", "VApp.Import", "VApp.InstanceConfig", "VApp.ManagedByConfig", "VApp.Move", "VApp.PowerOff", "VApp.PowerOn", "VApp.PullFromUrls", "VApp.Rename", "VApp.ResourceConfig", "VApp.Suspend", "VApp.Unregister", "VcIdentityProviders.Create", "VcIdentityProviders.Manage", "VcIdentityProviders.Read", "VcIntegrity.Baseline.com.vmware.vcIntegrity.AssignBaselines", "VcIntegrity.Baseline.com.vmware.vcIntegrity.ManageBaselines", "VcIntegrity.ClusterConfiguration.Export", "VcIntegrity.ClusterConfiguration.Modify", "VcIntegrity.ClusterConfiguration.Remediate", "VcIntegrity.ClusterConfiguration.View", "VcIntegrity.FileUpload.com.vmware.vcIntegrity.ImportFile", "VcIntegrity.General.com.vmware.vcIntegrity.Configure", "VcIntegrity.HardwareCompatibility.Read", "VcIntegrity.HardwareCompatibility.Write", "VcIntegrity.Updates.com.vmware.vcIntegrity.Remediate", "VcIntegrity.Updates.com.vmware.vcIntegrity.Scan", "VcIntegrity.Updates.com.vmware.vcIntegrity.Stage", "VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus", "VcIntegrity.lifecycleDepots.Delete", "VcIntegrity.lifecycleGeneral.Read", "VcIntegrity.lifecycleGeneral.Write", "VcIntegrity.lifecycleHealth.Read", "VcIntegrity.lifecycleHealth.Write", "VcIntegrity.lifecycleSettings.Read", "VcIntegrity.lifecycleSettings.Write", "VcIntegrity.lifecycleSoftwareRemediation.Read", "VcIntegrity.lifecycleSoftwareRemediation.Write", "VcIntegrity.lifecycleSoftwareSpecification.Read", "VcIntegrity.lifecycleSoftwareSpecification.Write", "VcIntegrity.systemVM.Read", "VcIntegrity.systemVM.Write", "VcLifecycle.Upgrade", "VcLifecycle.View", "VirtualMachine.Config.AddExistingDisk", "VirtualMachine.Config.AddNewDisk", "VirtualMachine.Config.AddRemoveDevice", "VirtualMachine.Config.AdvancedConfig", "VirtualMachine.Config.Annotation", "VirtualMachine.Config.CPUCount", "VirtualMachine.Config.ChangeTracking", "VirtualMachine.Config.DiskExtend", "VirtualMachine.Config.DiskLease", "VirtualMachine.Config.EditDevice", "VirtualMachine.Config.HostUSBDevice", "VirtualMachine.Config.ManagedBy", "VirtualMachine.Config.Memory", "VirtualMachine.Config.MksControl", "VirtualMachine.Config.QueryFTCompatibility", "VirtualMachine.Config.QueryUnownedFiles", "VirtualMachine.Config.RawDevice", "VirtualMachine.Config.ReloadFromPath", "VirtualMachine.Config.RemoveDisk", "VirtualMachine.Config.Rename", "VirtualMachine.Config.ResetGuestInfo", "VirtualMachine.Config.Resource", "VirtualMachine.Config.Settings", "VirtualMachine.Config.SwapPlacement", "VirtualMachine.Config.ToggleForkParent", "VirtualMachine.Config.UpgradeVirtualHardware", "VirtualMachine.DataSets.DataSetCreate", "VirtualMachine.DataSets.DataSetDelete", "VirtualMachine.DataSets.DataSetEntryDelete", "VirtualMachine.DataSets.DataSetEntryGet", "VirtualMachine.DataSets.DataSetEntryList", "VirtualMachine.DataSets.DataSetEntrySet", "VirtualMachine.DataSets.DataSetGet", "VirtualMachine.DataSets.DataSetList", "VirtualMachine.DataSets.DataSetUpdate", "VirtualMachine.DataSets.Export", "VirtualMachine.GuestOperations.Execute", "VirtualMachine.GuestOperations.Modify", "VirtualMachine.GuestOperations.ModifyAliases", "VirtualMachine.GuestOperations.Query", "VirtualMachine.GuestOperations.QueryAliases", "VirtualMachine.Hbr.ConfigureReplication", "VirtualMachine.Hbr.MonitorReplication", "VirtualMachine.Hbr.ReplicaManagement", "VirtualMachine.Interact.AnswerQuestion", "VirtualMachine.Interact.Backup", "VirtualMachine.Interact.ConsoleInteract", "VirtualMachine.Interact.CreateScreenshot", "VirtualMachine.Interact.CreateSecondary", "VirtualMachine.Interact.DefragmentAllDisks", "VirtualMachine.Interact.DeviceConnection", "VirtualMachine.Interact.DisableSecondary", "VirtualMachine.Interact.DnD", "VirtualMachine.Interact.EnableSecondary", "VirtualMachine.Interact.MakePrimary", "VirtualMachine.Interact.Pause", "VirtualMachine.Interact.PowerOff", "VirtualMachine.Interact.PowerOn", "VirtualMachine.Interact.PutUsbScanCodes", "VirtualMachine.Interact.Record", "VirtualMachine.Interact.Replay", "VirtualMachine.Interact.Reset", "VirtualMachine.Interact.SESparseMaintenance", "VirtualMachine.Interact.SetCDMedia", "VirtualMachine.Interact.SetFloppyMedia", "VirtualMachine.Interact.Suspend", "VirtualMachine.Interact.SuspendToMemory", "VirtualMachine.Interact.TerminateFaultTolerantVM", "VirtualMachine.Interact.ToolsInstall", "VirtualMachine.Interact.TurnOffFaultTolerance", "VirtualMachine.Inventory.Create", "VirtualMachine.Inventory.CreateFromExisting", "VirtualMachine.Inventory.Delete", "VirtualMachine.Inventory.Move", "VirtualMachine.Inventory.Register", "VirtualMachine.Inventory.Unregister", "VirtualMachine.Namespace.Event", "VirtualMachine.Namespace.EventNotify", "VirtualMachine.Namespace.Management", "VirtualMachine.Namespace.ModifyContent", "VirtualMachine.Namespace.Query", "VirtualMachine.Namespace.ReadContent", "VirtualMachine.Provisioning.Clone", "VirtualMachine.Provisioning.CloneTemplate", "VirtualMachine.Provisioning.CreateTemplateFromVM", "VirtualMachine.Provisioning.Customize", "VirtualMachine.Provisioning.DeployTemplate", "VirtualMachine.Provisioning.DiskRandomAccess", "VirtualMachine.Provisioning.DiskRandomRead", "VirtualMachine.Provisioning.FileRandomAccess", "VirtualMachine.Provisioning.GetVmFiles", "VirtualMachine.Provisioning.MarkAsTemplate", "VirtualMachine.Provisioning.MarkAsVM", "VirtualMachine.Provisioning.ModifyCustSpecs", "VirtualMachine.Provisioning.PromoteDisks", "VirtualMachine.Provisioning.PutVmFiles", "VirtualMachine.Provisioning.ReadCustSpecs", "VirtualMachine.State.CreateSnapshot", "VirtualMachine.State.RemoveSnapshot", "VirtualMachine.State.RenameSnapshot", "VirtualMachine.State.RevertToSnapshot", "VirtualMachineClasses.Manage", "VmCam.Administer", "VmResourceProfiles.Manage", "Vsan.Cluster.ShallowRekey", "Vsan.Xvc.UpdateClientInfo", "Zone.Manage", "Zone.ObjectAttachable", "vSANStats.Access", "vService.CreateDependency", "vService.DestroyDependency", "vService.ReconfigureDependency", "vService.UpdateDependency", "vSphereClient.UtilizeVerificationCode", "vSphereDataProtection.Protection", "vSphereDataProtection.Recovery", "vStats.CollectAny", "vStats.QueryAny", "vStats.Settings"}, + }, + { + RoleId: -5, + System: true, + Name: "NoAccess", + Info: &types.Description{ + Label: "No access", + Summary: "Used for restricting granted access", + }, + Privilege: nil, + }, + { + RoleId: -4, + System: true, + Name: "Anonymous", + Info: &types.Description{ + Label: "Anonymous", + Summary: "Not logged-in user (cannot be granted)", + }, + Privilege: []string{"System.Anonymous"}, + }, + { + RoleId: -3, + System: true, + Name: "View", + Info: &types.Description{ + Label: "View", + Summary: "Visibility access (cannot be granted)", + }, + Privilege: []string{"System.Anonymous", "System.View"}, + }, + { + RoleId: -2, + System: true, + Name: "ReadOnly", + Info: &types.Description{ + Label: "Read-only", + Summary: "See details of objects, but not make changes", + }, + Privilege: []string{"System.Anonymous", "System.Read", "System.View"}, + }, + { + RoleId: -1, + System: true, + Name: "Admin", + Info: &types.Description{ + Label: "Administrator", + Summary: "Full access rights", + }, + Privilege: []string{"Alarm.Acknowledge", "Alarm.Create", "Alarm.Delete", "Alarm.DisableActions", "Alarm.Edit", "Alarm.SetStatus", "Alarm.ToggleEnableOnEntity", "Authorization.ModifyPermissions", "Authorization.ModifyPrivileges", "Authorization.ModifyRoles", "Authorization.ModifyVTContainerMappings", "Authorization.ModifyVTContainers", "Authorization.ReassignRolePermissions", "AutoDeploy.Host.AssociateMachine", "AutoDeploy.Profile.Create", "AutoDeploy.Profile.Edit", "AutoDeploy.Rule.Create", "AutoDeploy.Rule.Delete", "AutoDeploy.Rule.Edit", "AutoDeploy.RuleSet.Activate", "AutoDeploy.RuleSet.Edit", "Certificate.Manage", "CertificateAuthority.Administer", "CertificateAuthority.Manage", "CertificateManagement.Administer", "CertificateManagement.Manage", "CertificateManagementSubscriptions.Create", "CertificateManagementSubscriptions.Delete", "CertificateManagementSubscriptions.Update", "Cns.Searchable", "ComputePolicy.Manage", "ContentLibrary.AddCertToTrustStore", "ContentLibrary.AddLibraryItem", "ContentLibrary.AddSubscription", "ContentLibrary.CheckInTemplate", "ContentLibrary.CheckOutTemplate", "ContentLibrary.CreateLocalLibrary", "ContentLibrary.CreateSubscribedLibrary", "ContentLibrary.DeleteCertFromTrustStore", "ContentLibrary.DeleteLibraryItem", "ContentLibrary.DeleteLocalLibrary", "ContentLibrary.DeleteSubscribedLibrary", "ContentLibrary.DeleteSubscription", "ContentLibrary.DownloadSession", "ContentLibrary.EvictLibraryItem", "ContentLibrary.EvictSubscribedLibrary", "ContentLibrary.GetConfiguration", "ContentLibrary.ImportStorage", "ContentLibrary.ManageClusterRegistryResource", "ContentLibrary.ManageRegistry", "ContentLibrary.ManageRegistryProject", "ContentLibrary.MigrateLibrary", "ContentLibrary.ProbeSubscription", "ContentLibrary.PublishLibrary", "ContentLibrary.PublishLibraryItem", "ContentLibrary.ReadStorage", "ContentLibrary.SyncLibrary", "ContentLibrary.SyncLibraryItem", "ContentLibrary.TypeIntrospection", "ContentLibrary.UpdateConfiguration", "ContentLibrary.UpdateLibrary", "ContentLibrary.UpdateLibraryItem", "ContentLibrary.UpdateLocalLibrary", "ContentLibrary.UpdateSession", "ContentLibrary.UpdateSubscribedLibrary", "ContentLibrary.UpdateSubscription", "Cryptographer.Access", "Cryptographer.AddDisk", "Cryptographer.Clone", "Cryptographer.Decrypt", "Cryptographer.Encrypt", "Cryptographer.EncryptNew", "Cryptographer.ManageEncryptionPolicy", "Cryptographer.ManageKeyServers", "Cryptographer.ManageKeys", "Cryptographer.Migrate", "Cryptographer.ReadKeyServersInfo", "Cryptographer.Recrypt", "Cryptographer.RegisterHost", "Cryptographer.RegisterVM", "DVPortgroup.Create", "DVPortgroup.Delete", "DVPortgroup.Modify", "DVPortgroup.PolicyOp", "DVPortgroup.ScopeOp", "DVSwitch.Create", "DVSwitch.Delete", "DVSwitch.HostOp", "DVSwitch.Modify", "DVSwitch.Move", "DVSwitch.PolicyOp", "DVSwitch.PortConfig", "DVSwitch.PortSetting", "DVSwitch.ResourceManagement", "DVSwitch.Vspan", "Datacenter.Create", "Datacenter.Delete", "Datacenter.IpPoolConfig", "Datacenter.IpPoolQueryAllocations", "Datacenter.IpPoolReleaseIp", "Datacenter.Move", "Datacenter.Reconfigure", "Datacenter.Rename", "Datacenter.UpdateCarbonInfo", "Datastore.AllocateSpace", "Datastore.Browse", "Datastore.Config", "Datastore.ConfigIOManagement", "Datastore.Delete", "Datastore.DeleteFile", "Datastore.FileManagement", "Datastore.Move", "Datastore.Rename", "Datastore.UpdateVirtualMachineFiles", "Datastore.UpdateVirtualMachineMetadata", "DirectPathProfileManager.Manage", "DrProxy.Host.Configure", "DrProxy.Host.ManageService", "DrProxy.Host.View", "DrProxy.License.Update", "DrProxy.License.View", "DrProxy.Progress.Control", "DrProxy.Vm.Configure", "EAM.Config", "EAM.Modify", "EAM.View", "Extension.Register", "Extension.Unregister", "Extension.Update", "ExternalStatsProvider.Register", "ExternalStatsProvider.Unregister", "ExternalStatsProvider.Update", "Folder.Create", "Folder.Delete", "Folder.ExternalFolderManagement", "Folder.Move", "Folder.Rename", "FoundationLoadBalancers.Manage", "Global.CancelTask", "Global.CapacityPlanning", "Global.Diagnostics", "Global.DisableMethods", "Global.EnableMethods", "Global.GlobalTag", "Global.Health", "Global.Licenses", "Global.LogEvent", "Global.ManageCustomFields", "Global.Proxy", "Global.ScriptAction", "Global.ServiceManagers", "Global.SetCustomField", "Global.Settings", "Global.SystemTag", "Global.VCServer", "GuestDataPublisher.GetData", "HLM.Create", "HLM.Manage", "HealthUpdateProvider.Register", "HealthUpdateProvider.Unregister", "HealthUpdateProvider.Update", "Host.Cim.CimInteraction", "Host.Config.AdvancedConfig", "Host.Config.AuthenticationStore", "Host.Config.AutoStart", "Host.Config.Connection", "Host.Config.DateTime", "Host.Config.Firmware", "Host.Config.GuestStore", "Host.Config.HyperThreading", "Host.Config.Image", "Host.Config.Maintenance", "Host.Config.Memory", "Host.Config.NetService", "Host.Config.Network", "Host.Config.Nvdimm", "Host.Config.Patch", "Host.Config.PciPassthru", "Host.Config.Power", "Host.Config.ProductLocker", "Host.Config.Quarantine", "Host.Config.Resources", "Host.Config.Settings", "Host.Config.Snmp", "Host.Config.Storage", "Host.Config.SystemFirewallRuleSet", "Host.Config.SystemManagement", "Host.Entropy.Read", "Host.Entropy.Write", "Host.Hbr.HbrDaemonManagement", "Host.Hbr.HbrManagement", "Host.Inventory.AddHostToCluster", "Host.Inventory.AddStandaloneHost", "Host.Inventory.CreateCluster", "Host.Inventory.DeleteCluster", "Host.Inventory.EditCluster", "Host.Inventory.ManageClusterLifecyle", "Host.Inventory.MoveCluster", "Host.Inventory.MoveHost", "Host.Inventory.RemoveHostFromCluster", "Host.Inventory.RenameCluster", "Host.Local.CreateVM", "Host.Local.DeleteVM", "Host.Local.InstallAgent", "Host.Local.ManageUserGroups", "Host.Local.ReconfigVM", "Host.Sgx.Register", "Host.Stats.Query", "Host.Tpm.Read", "Host.Tpm.Unseal", "Infraprofile.Read", "Infraprofile.Write", "IntercomNamespace.Read", "IntercomNamespace.Write", "InventoryService.Tagging.AttachTag", "InventoryService.Tagging.CreateCategory", "InventoryService.Tagging.CreateTag", "InventoryService.Tagging.DeleteCategory", "InventoryService.Tagging.DeleteTag", "InventoryService.Tagging.EditCategory", "InventoryService.Tagging.EditTag", "InventoryService.Tagging.ModifyUsedByForCategory", "InventoryService.Tagging.ModifyUsedByForTag", "InventoryService.Tagging.ObjectAttachable", "Namespaces.Backup", "Namespaces.Configure", "Namespaces.ListAccess", "Namespaces.Manage", "Namespaces.ManageCapabilities", "Namespaces.ManageDisks", "Namespaces.SelfServiceManage", "Namespaces.Upgrade", "Network.Assign", "Network.Config", "Network.Delete", "Network.Move", "Nsx.Manage", "Nsx.ModifyAll", "Nsx.Read", "Observability.Admin", "Observability.StatsProvider.Manage", "OvfManager.OvfConsumerAccess", "PartnerRestDaemon.Read", "PartnerRestDaemon.Write", "Performance.ModifyIntervals", "Plugin.Management", "Profile.Clear", "Profile.Create", "Profile.Delete", "Profile.Edit", "Profile.Export", "Profile.View", "ReplicationService.Administer", "Resource.ApplyRecommendation", "Resource.AssignVAppToPool", "Resource.AssignVMToPool", "Resource.ColdMigrate", "Resource.CreatePool", "Resource.DeletePool", "Resource.EditPool", "Resource.HotMigrate", "Resource.MovePool", "Resource.QueryVMotion", "Resource.RenamePool", "ScheduledTask.Create", "ScheduledTask.Delete", "ScheduledTask.Edit", "ScheduledTask.Run", "ServiceAccount.Administer", "ServiceAccount.ManageAccount", "ServiceAccount.ManagePassword", "Sessions.CollectPrivilegeChecks", "Sessions.GlobalMessage", "Sessions.ImpersonateUser", "Sessions.TerminateSession", "Sessions.ValidateSession", "SettingsStore.Manage", "StoragePod.Config", "StorageProfile.Apply", "StorageProfile.Update", "StorageProfile.View", "StorageViews.ConfigureService", "StorageViews.View", "SupervisorServices.Install", "SupervisorServices.Manage", "System.Anonymous", "System.Read", "System.View", "Task.Create", "Task.Update", "Task.Update.Task.Update", "TenantManager.Query", "TenantManager.Update", "TokenService.PersistableTokenExchange", "TransferService.Manage", "TransferService.Monitor", "Trust.Administer", "Trust.Manage", "TrustedAdmin.ConfigureHostCertificates", "TrustedAdmin.ConfigureHostMetadata", "TrustedAdmin.ConfigureTokenConversionPolicy", "TrustedAdmin.ManageAttestingSSO", "TrustedAdmin.ManageKMSTrust", "TrustedAdmin.ManageTrustedHosts", "TrustedAdmin.ReadAttestingSSO", "TrustedAdmin.ReadKMSTrust", "TrustedAdmin.ReadStsInfo", "TrustedAdmin.ReadTrustedHosts", "TrustedAdmin.RetrieveHostMetadata", "TrustedAdmin.RetrieveTPMHostCertificates", "VApp.ApplicationConfig", "VApp.AssignResourcePool", "VApp.AssignVApp", "VApp.AssignVM", "VApp.Clone", "VApp.Create", "VApp.Delete", "VApp.Export", "VApp.ExtractOvfEnvironment", "VApp.Import", "VApp.InstanceConfig", "VApp.ManagedByConfig", "VApp.Move", "VApp.PowerOff", "VApp.PowerOn", "VApp.PullFromUrls", "VApp.Rename", "VApp.ResourceConfig", "VApp.Suspend", "VApp.Unregister", "VcIdentityProviders.Create", "VcIdentityProviders.Manage", "VcIdentityProviders.Read", "VcIntegrity.Baseline.com.vmware.vcIntegrity.AssignBaselines", "VcIntegrity.Baseline.com.vmware.vcIntegrity.ManageBaselines", "VcIntegrity.ClusterConfiguration.Export", "VcIntegrity.ClusterConfiguration.Modify", "VcIntegrity.ClusterConfiguration.Remediate", "VcIntegrity.ClusterConfiguration.View", "VcIntegrity.FileUpload.com.vmware.vcIntegrity.ImportFile", "VcIntegrity.General.com.vmware.vcIntegrity.Configure", "VcIntegrity.HardwareCompatibility.Read", "VcIntegrity.HardwareCompatibility.Write", "VcIntegrity.Updates.com.vmware.vcIntegrity.Remediate", "VcIntegrity.Updates.com.vmware.vcIntegrity.Scan", "VcIntegrity.Updates.com.vmware.vcIntegrity.Stage", "VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus", "VcIntegrity.lifecycleDepots.Delete", "VcIntegrity.lifecycleGeneral.Read", "VcIntegrity.lifecycleGeneral.Write", "VcIntegrity.lifecycleHealth.Read", "VcIntegrity.lifecycleHealth.Write", "VcIntegrity.lifecycleSettings.Read", "VcIntegrity.lifecycleSettings.Write", "VcIntegrity.lifecycleSoftwareRemediation.Read", "VcIntegrity.lifecycleSoftwareRemediation.Write", "VcIntegrity.lifecycleSoftwareSpecification.Read", "VcIntegrity.lifecycleSoftwareSpecification.Write", "VcIntegrity.systemVM.Read", "VcIntegrity.systemVM.Write", "VcLifecycle.Upgrade", "VcLifecycle.View", "VirtualMachine.Config.AddExistingDisk", "VirtualMachine.Config.AddNewDisk", "VirtualMachine.Config.AddRemoveDevice", "VirtualMachine.Config.AdvancedConfig", "VirtualMachine.Config.Annotation", "VirtualMachine.Config.CPUCount", "VirtualMachine.Config.ChangeTracking", "VirtualMachine.Config.DiskExtend", "VirtualMachine.Config.DiskLease", "VirtualMachine.Config.EditDevice", "VirtualMachine.Config.HostUSBDevice", "VirtualMachine.Config.ManagedBy", "VirtualMachine.Config.Memory", "VirtualMachine.Config.MksControl", "VirtualMachine.Config.QueryFTCompatibility", "VirtualMachine.Config.QueryUnownedFiles", "VirtualMachine.Config.RawDevice", "VirtualMachine.Config.ReloadFromPath", "VirtualMachine.Config.RemoveDisk", "VirtualMachine.Config.Rename", "VirtualMachine.Config.ResetGuestInfo", "VirtualMachine.Config.Resource", "VirtualMachine.Config.Settings", "VirtualMachine.Config.SwapPlacement", "VirtualMachine.Config.ToggleForkParent", "VirtualMachine.Config.UpgradeVirtualHardware", "VirtualMachine.DataSets.DataSetCreate", "VirtualMachine.DataSets.DataSetDelete", "VirtualMachine.DataSets.DataSetEntryDelete", "VirtualMachine.DataSets.DataSetEntryGet", "VirtualMachine.DataSets.DataSetEntryList", "VirtualMachine.DataSets.DataSetEntrySet", "VirtualMachine.DataSets.DataSetGet", "VirtualMachine.DataSets.DataSetList", "VirtualMachine.DataSets.DataSetUpdate", "VirtualMachine.DataSets.Export", "VirtualMachine.GuestOperations.Execute", "VirtualMachine.GuestOperations.Modify", "VirtualMachine.GuestOperations.ModifyAliases", "VirtualMachine.GuestOperations.Query", "VirtualMachine.GuestOperations.QueryAliases", "VirtualMachine.Hbr.ConfigureReplication", "VirtualMachine.Hbr.MonitorReplication", "VirtualMachine.Hbr.ReplicaManagement", "VirtualMachine.Interact.AnswerQuestion", "VirtualMachine.Interact.Backup", "VirtualMachine.Interact.ConsoleInteract", "VirtualMachine.Interact.CreateScreenshot", "VirtualMachine.Interact.CreateSecondary", "VirtualMachine.Interact.DefragmentAllDisks", "VirtualMachine.Interact.DeviceConnection", "VirtualMachine.Interact.DisableSecondary", "VirtualMachine.Interact.DnD", "VirtualMachine.Interact.EnableSecondary", "VirtualMachine.Interact.GuestControl", "VirtualMachine.Interact.MakePrimary", "VirtualMachine.Interact.Pause", "VirtualMachine.Interact.PowerOff", "VirtualMachine.Interact.PowerOn", "VirtualMachine.Interact.PutUsbScanCodes", "VirtualMachine.Interact.Record", "VirtualMachine.Interact.Replay", "VirtualMachine.Interact.Reset", "VirtualMachine.Interact.SESparseMaintenance", "VirtualMachine.Interact.SetCDMedia", "VirtualMachine.Interact.SetFloppyMedia", "VirtualMachine.Interact.Suspend", "VirtualMachine.Interact.SuspendToMemory", "VirtualMachine.Interact.TerminateFaultTolerantVM", "VirtualMachine.Interact.ToolsInstall", "VirtualMachine.Interact.TurnOffFaultTolerance", "VirtualMachine.Inventory.Create", "VirtualMachine.Inventory.CreateFromExisting", "VirtualMachine.Inventory.Delete", "VirtualMachine.Inventory.Move", "VirtualMachine.Inventory.Register", "VirtualMachine.Inventory.Unregister", "VirtualMachine.Namespace.Event", "VirtualMachine.Namespace.EventNotify", "VirtualMachine.Namespace.Management", "VirtualMachine.Namespace.ModifyContent", "VirtualMachine.Namespace.Query", "VirtualMachine.Namespace.ReadContent", "VirtualMachine.Provisioning.Clone", "VirtualMachine.Provisioning.CloneTemplate", "VirtualMachine.Provisioning.CreateTemplateFromVM", "VirtualMachine.Provisioning.Customize", "VirtualMachine.Provisioning.DeployTemplate", "VirtualMachine.Provisioning.DiskRandomAccess", "VirtualMachine.Provisioning.DiskRandomRead", "VirtualMachine.Provisioning.FileRandomAccess", "VirtualMachine.Provisioning.GetVmFiles", "VirtualMachine.Provisioning.MarkAsTemplate", "VirtualMachine.Provisioning.MarkAsVM", "VirtualMachine.Provisioning.ModifyCustSpecs", "VirtualMachine.Provisioning.PromoteDisks", "VirtualMachine.Provisioning.PutVmFiles", "VirtualMachine.Provisioning.ReadCustSpecs", "VirtualMachine.State.CreateSnapshot", "VirtualMachine.State.RemoveSnapshot", "VirtualMachine.State.RenameSnapshot", "VirtualMachine.State.RevertToSnapshot", "VirtualMachineClasses.Manage", "VmCam.Administer", "VmResourceProfiles.Manage", "Vsan.Cluster.ShallowRekey", "Vsan.Xvc.UpdateClientInfo", "Zone.Manage", "Zone.ObjectAttachable", "vSANStats.Access", "vService.CreateDependency", "vService.DestroyDependency", "vService.ReconfigureDependency", "vService.UpdateDependency", "vSphereClient.UtilizeVerificationCode", "vSphereDataProtection.Protection", "vSphereDataProtection.Recovery", "vStats.CollectAny", "vStats.QueryAny", "vStats.Settings"}, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/datacenter.go b/vendor/github.com/vmware/govmomi/simulator/esx/datacenter.go new file mode 100644 index 0000000000..374cd9518c --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/datacenter.go @@ -0,0 +1,60 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +// Datacenter is the default template for Datacenter properties. +// Capture method: +// govc datacenter.info -dump +var Datacenter = mo.Datacenter{ + ManagedEntity: mo.ManagedEntity{ + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "Datacenter", Value: "ha-datacenter"}, + Value: nil, + AvailableField: nil, + }, + Parent: (*types.ManagedObjectReference)(nil), + CustomValue: nil, + OverallStatus: "", + ConfigStatus: "", + ConfigIssue: nil, + EffectiveRole: nil, + Permission: nil, + Name: "ha-datacenter", + DisabledMethod: nil, + RecentTask: nil, + DeclaredAlarmState: nil, + TriggeredAlarmState: nil, + AlarmActionsEnabled: (*bool)(nil), + Tag: nil, + }, + VmFolder: types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-vm"}, + HostFolder: types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-host"}, + DatastoreFolder: types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-datastore"}, + NetworkFolder: types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-network"}, + Datastore: []types.ManagedObjectReference{ + {Type: "Datastore", Value: "57089c25-85e3ccd4-17b6-000c29d0beb3"}, + }, + Network: []types.ManagedObjectReference{ + {Type: "Network", Value: "HaNetwork-VM Network"}, + }, + Configuration: types.DatacenterConfigInfo{}, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/doc.go b/vendor/github.com/vmware/govmomi/simulator/esx/doc.go new file mode 100644 index 0000000000..50b6202fa6 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/doc.go @@ -0,0 +1,20 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package esx contains SOAP responses from an ESX server, captured using `govc ... -dump`. +*/ +package esx diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/event_manager.go b/vendor/github.com/vmware/govmomi/simulator/esx/event_manager.go new file mode 100644 index 0000000000..17c54cafce --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/event_manager.go @@ -0,0 +1,308 @@ +/* +Copyright (c) 2018-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// EventInfo is the default template for the EventManager description.eventInfo property. +// Capture method: +// govc object.collect -s -dump EventManager:ha-eventmgr description.eventInfo +// The captured list has been manually pruned and FullFormat fields changed to use Go's template variable syntax. +var EventInfo = []types.EventDescriptionEventDetail{ + { + Key: "UserLoginSessionEvent", + Description: "User login", + Category: "info", + FullFormat: "User {{.UserName}}@{{.IpAddress}} logged in as {{.UserAgent}}", + }, + { + Key: "UserLogoutSessionEvent", + Description: "User logout", + Category: "info", + FullFormat: "User {{.UserName}}@{{.IpAddress}} logged out (login time: {{.LoginTime}}, number of API invocations: {{.CallCount}}, user agent: {{.UserAgent}})", + }, + { + Key: "DatacenterCreatedEvent", + Description: "Datacenter created", + Category: "info", + FullFormat: "Created datacenter {{.Datacenter.Name}} in folder {{.Parent.Name}}", + }, + { + Key: "DatastoreFileMovedEvent", + Description: "File or directory moved to datastore", + Category: "info", + FullFormat: "Move of file or directory {{.SourceFile}} from {{.SourceDatastore.Name}} to {{.Datastore.Name}} as {{.TargetFile}}", + }, + { + Key: "DatastoreFileCopiedEvent", + Description: "File or directory copied to datastore", + Category: "info", + FullFormat: "Copy of file or directory {{.SourceFile}} from {{.SourceDatastore.Name}} to {{.Datastore.Name}} as {{.TargetFile}}", + }, + { + Key: "DatastoreFileDeletedEvent", + Description: "File or directory deleted", + Category: "info", + FullFormat: "Deletion of file or directory {{.TargetFile}} from {{.Datastore.Name}} was initiated", + }, + { + Key: "EnteringMaintenanceModeEvent", + Description: "Entering maintenance mode", + Category: "info", + FullFormat: "Host {{.Host.Name}} in {{.Datacenter.Name}} has started to enter maintenance mode", + }, + { + Key: "EnteredMaintenanceModeEvent", + Description: "Entered maintenance mode", + Category: "info", + FullFormat: "Host {{.Host.Name}} in {{.Datacenter.Name}} has entered maintenance mode", + }, + { + Key: "ExitMaintenanceModeEvent", + Description: "Exit maintenance mode", + Category: "info", + FullFormat: "Host {{.Host.Name}} in {{.Datacenter.Name}} has exited maintenance mode", + }, + { + Key: "HostRemovedEvent", + Description: "Host removed", + FullFormat: "Removed host {{.Host.Name}} in {{.Datacenter.Name}}", + Category: "info", + }, + { + Key: "VmSuspendedEvent", + Description: "VM suspended", + Category: "info", + FullFormat: "{{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}} is suspended", + }, + { + Key: "VmMigratedEvent", + Description: "VM migrated", + Category: "info", + FullFormat: "Migration of virtual machine {{.Vm.Name}} from {{.SourceHost.Name}}, {{.SourceDatastore.Name}} to {{.Host.Name}}, {{.Ds.Name}} completed", + }, + { + Key: "VmBeingMigratedEvent", + Description: "VM migrating", + Category: "info", + FullFormat: "Relocating {{.Vm.Name}} from {{.Host.Name}, {{.Ds.Name}} in {{.Datacenter.Name}} to {{.DestHost.Name}, {{.DestDatastore.Name}} in {{.DestDatacenter.Name}}", + }, + { + Key: "VmMacAssignedEvent", + Description: "VM MAC assigned", + Category: "info", + FullFormat: "New MAC address ({{.Mac}}) assigned to adapter {{.Adapter}} for {{.Vm.Name}}", + }, + { + Key: "VmRegisteredEvent", + Description: "VM registered", + Category: "info", + FullFormat: "Registered {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmReconfiguredEvent", + Description: "VM reconfigured", + Category: "info", + FullFormat: "Reconfigured {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmGuestRebootEvent", + Description: "Guest reboot", + Category: "info", + FullFormat: "Guest OS reboot for {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmBeingClonedEvent", + Description: "VM being cloned", + Category: "info", + FullFormat: "Cloning {{.Vm.Name}} on host {{.Host.Name}} in {{.Datacenter.Name}} to {{.DestName}} on host {{.DestHost.Name}}", + }, + { + Key: "VmClonedEvent", + Description: "VM cloned", + Category: "info", + FullFormat: "Clone of {{.SourceVm.Name}} completed", + }, + { + Key: "VmBeingDeployedEvent", + Description: "Deploying VM", + Category: "info", + FullFormat: "Deploying {{.Vm.Name}} on host {{.Host.Name}} in {{.Datacenter.Name}} from template {{.SrcTemplate.Name}}", + }, + { + Key: "VmDeployedEvent", + Description: "VM deployed", + Category: "info", + FullFormat: "Template {{.SrcTemplate.Name}} deployed on host {{.Host.Name}}", + }, + { + Key: "VmInstanceUuidAssignedEvent", + Description: "Assign a new instance UUID", + Category: "info", + FullFormat: "Assign a new instance UUID ({{.InstanceUuid}}) to {{.Vm.Name}}", + }, + { + Key: "VmPoweredOnEvent", + Description: "VM powered on", + Category: "info", + FullFormat: "{{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}} is powered on", + }, + { + Key: "VmStartingEvent", + Description: "VM starting", + Category: "info", + FullFormat: "{{.Vm.Name}} on host {{.Host.Name}} in {{.Datacenter.Name}} is starting", + }, + { + Key: "VmStoppingEvent", + Description: "VM stopping", + Category: "info", + FullFormat: "{{.Vm.Name}} on host {{.Host.Name}} in {{.Datacenter.Name}} is stopping", + }, + { + Key: "VmSuspendingEvent", + Description: "VM being suspended", + Category: "info", + FullFormat: "{{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}} is being suspended", + }, + { + Key: "VmResumingEvent", + Description: "VM resuming", + Category: "info", + FullFormat: "{{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}} is resumed", + }, + { + Key: "VmBeingCreatedEvent", + Description: "Creating VM", + Category: "info", + FullFormat: "Creating {{.Vm.Name}} on host {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmCreatedEvent", + Description: "VM created", + Category: "info", + FullFormat: "Created virtual machine {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmRemovedEvent", + Description: "VM removed", + Category: "info", + FullFormat: "Removed {{.Vm.Name}} on {{.Host.Name}} from {{.Datacenter.Name}}", + }, + { + Key: "VmResettingEvent", + Description: "VM resetting", + Category: "info", + FullFormat: "{{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}} is reset", + }, + { + Key: "VmGuestShutdownEvent", + Description: "Guest OS shut down", + Category: "info", + FullFormat: "Guest OS shut down for {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmUuidAssignedEvent", + Description: "VM UUID assigned", + Category: "info", + FullFormat: "Assigned new BIOS UUID ({{.Uuid}}) to {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "VmPoweredOffEvent", + Description: "VM powered off", + Category: "info", + FullFormat: "{{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}} is powered off", + }, + { + Key: "VmRelocatedEvent", + Description: "VM relocated", + Category: "info", + FullFormat: "Completed the relocation of the virtual machine", + }, + { + Key: "CustomizationFailed", + Description: "An error occurred during customization", + Category: "info", + FullFormat: "An error occurred during customization on VM {{.Vm.Name}}", + }, + { + Key: "CustomizationStartedEvent", + Description: "Started customization", + Category: "info", + FullFormat: "Started customization of VM {{.Vm.Name}}", + }, + { + Key: "CustomizationSucceeded", + Description: "Customization succeeded", + Category: "info", + FullFormat: "Customization of VM {{.Vm.Name}} succeeded", + }, + { + Key: "DrsVmMigratedEvent", + Description: "DRS VM migrated", + Category: "info", + FullFormat: "DRS migrated {{.Vm.Name}} from {{.SourceHost.Name}} to {{.Host.Name}} in cluster {{.ComputeResource.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "DrsVmPoweredOnEvent", + Description: "DRS VM powered on", + Category: "info", + FullFormat: "DRS powered On {{.Vm.Name}} on {{.Host.Name}} in {{.Datacenter.Name}}", + }, + { + Key: "DvsCreatedEvent", + Description: "vSphere Distributed Switch created", + Category: "info", + FullFormat: "A vSphere Distributed Switch {{.Dvs.Name}} was created in {{.Datacenter.Name}}.", + }, + { + Key: "DvsDestroyedEvent", + Description: "vSphere Distributed Switch deleted", + Category: "info", + FullFormat: "vSphere Distributed Switch {{.Dvs.Name}} in {{.Datacenter.Name}} was deleted.", + }, + { + Key: "DvsReconfiguredEvent", + Description: "vSphere Distributed Switch reconfigured", + Category: "info", + FullFormat: "The vSphere Distributed Switch {{.Dvs.Name}} in {{.Datacenter.Name}} was reconfigured.", + }, + { + Key: "DvsHostJoinedEvent", + Description: "Host joined the vSphere Distributed Switch", + Category: "info", + FullFormat: "The host {{.HostJoined.Name}} joined the vSphere Distributed Switch {{.Dvs.Name}} in {{.Datacenter.Name}}.", + }, + { + Key: "DvsHostLeftEvent", + Description: "Host left vSphere Distributed Switch", + Category: "info", + FullFormat: "The host {{.HostLeft.Name}} left the vSphere Distributed Switch {{.Dvs.Name}} in {{.Datacenter.Name}}.", + }, + { + Key: "DVPortgroupCreatedEvent", + Description: "dvPort group created", + Category: "info", + FullFormat: "dvPort group {{.Net.Name}} in {{.Datacenter.Name}} was added to switch {{.Dvs.Name}}.", + }, + { + Key: "DVPortgroupDestroyedEvent", + Description: "dvPort group deleted", + Category: "info", + FullFormat: "dvPort group {{.Net.Name}} in {{.Datacenter.Name}} was deleted.", + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_capability.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_capability.go new file mode 100644 index 0000000000..d407cb6d66 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_capability.go @@ -0,0 +1,24 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// HostCapability captured via `govc object.collect -dump $host capability` +var HostCapability = &types.HostCapability{ + MaxSupportedVmMemory: 25149440, // 25TB since 7.0U1 +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_config_filesystemvolume.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_config_filesystemvolume.go new file mode 100644 index 0000000000..01c62d0a48 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_config_filesystemvolume.go @@ -0,0 +1,144 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "github.com/vmware/govmomi/units" + "github.com/vmware/govmomi/vim25/types" +) + +// HostConfigInfo is the default template for the HostSystem config property. +// Capture method: +// govc object.collect -s -dump HostSystem:ha-host config.fileSystemVolume +// - slightly modified for uuids and DiskName +var HostFileSystemVolumeInfo = types.HostFileSystemVolumeInfo{ + VolumeTypeList: []string{"VMFS", "NFS", "NFS41", "vsan", "VVOL", "VFFS", "OTHER", "PMEM"}, + MountInfo: []types.HostFileSystemMountInfo{ + { + MountInfo: types.HostMountInfo{ + Path: "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000003", + AccessMode: "readWrite", + Mounted: types.NewBool(true), + Accessible: types.NewBool(true), + InaccessibleReason: "", + MountFailedReason: "", + }, + Volume: &types.HostVmfsVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "VMFS", + Name: "datastore1", + Capacity: 3.5 * units.TB, + }, + BlockSizeMb: 1, + BlockSize: units.KB, + UnmapGranularity: units.KB, + UnmapPriority: "low", + UnmapBandwidthSpec: (*types.VmfsUnmapBandwidthSpec)(nil), + MaxBlocks: 61 * units.MB, + MajorVersion: 6, + Version: "6.82", + Uuid: "deadbeef-01234567-89ab-cdef00000003", + Extent: []types.HostScsiDiskPartition{ + { + DiskName: "____simulated_volumes_____", + Partition: 8, + }, + }, + VmfsUpgradable: false, + ForceMountedInfo: (*types.HostForceMountedInfo)(nil), + Ssd: types.NewBool(true), + Local: types.NewBool(true), + ScsiDiskType: "", + }, + VStorageSupport: "vStorageUnsupported", + }, + { + MountInfo: types.HostMountInfo{ + Path: "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000002", + AccessMode: "readWrite", + Mounted: types.NewBool(true), + Accessible: types.NewBool(true), + InaccessibleReason: "", + MountFailedReason: "", + }, + Volume: &types.HostVmfsVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "OTHER", + Name: "OSDATA-deadbeef-01234567-89ab-cdef00000002", + Capacity: 128 * units.GB, + }, + BlockSizeMb: 1, + BlockSize: units.KB, + UnmapGranularity: 0, + UnmapPriority: "", + UnmapBandwidthSpec: (*types.VmfsUnmapBandwidthSpec)(nil), + MaxBlocks: 256 * units.KB, + MajorVersion: 1, + Version: "1.00", + Uuid: "deadbeef-01234567-89ab-cdef00000002", + Extent: []types.HostScsiDiskPartition{ + { + DiskName: "____simulated_volumes_____", + Partition: 7, + }, + }, + VmfsUpgradable: false, + ForceMountedInfo: (*types.HostForceMountedInfo)(nil), + Ssd: types.NewBool(true), + Local: types.NewBool(true), + ScsiDiskType: "", + }, + VStorageSupport: "vStorageUnsupported", + }, + { + MountInfo: types.HostMountInfo{ + Path: "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000001", + AccessMode: "readOnly", + Mounted: types.NewBool(true), + Accessible: types.NewBool(true), + InaccessibleReason: "", + MountFailedReason: "", + }, + Volume: &types.HostVfatVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "OTHER", + Name: "BOOTBANK1", + Capacity: 4 * units.GB, + }, + }, + VStorageSupport: "", + }, + { + MountInfo: types.HostMountInfo{ + Path: "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000000", + AccessMode: "readOnly", + Mounted: types.NewBool(true), + Accessible: types.NewBool(true), + InaccessibleReason: "", + MountFailedReason: "", + }, + Volume: &types.HostVfatVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Type: "OTHER", + Name: "BOOTBANK2", + Capacity: 4 * units.GB, + }, + }, + VStorageSupport: "", + }, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_config_info.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_config_info.go new file mode 100644 index 0000000000..ced5a5046b --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_config_info.go @@ -0,0 +1,1119 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "github.com/vmware/govmomi/simulator/internal" + "github.com/vmware/govmomi/vim25/types" +) + +// HostConfigInfo is the default template for the HostSystem config property. +// Capture method: +// govc object.collect -s -dump HostSystem:ha-host config +var HostConfigInfo = types.HostConfigInfo{ + Host: types.ManagedObjectReference{Type: "HostSystem", Value: "ha-host"}, + Product: types.AboutInfo{ + Name: "VMware ESXi", + FullName: "VMware ESXi 8.0.2 build-21997540", + Vendor: "VMware, Inc.", + Version: "8.0.2", + Build: "21997540", + LocaleVersion: "INTL", + LocaleBuild: "000", + OsType: "vmnix-x86", + ProductLineId: "embeddedEsx", + ApiType: "HostAgent", + ApiVersion: "8.0.2.0", + InstanceUuid: "", + LicenseProductName: "VMware ESX Server", + LicenseProductVersion: "8.0.2", + }, + DeploymentInfo: &types.HostDeploymentInfo{ + BootedFromStatelessCache: types.NewBool(false), + }, + HyperThread: &types.HostHyperThreadScheduleInfo{ + Available: false, + Active: false, + Config: true, + }, + ConsoleReservation: (*types.ServiceConsoleReservationInfo)(nil), + VirtualMachineReservation: (*types.VirtualMachineMemoryReservationInfo)(nil), + StorageDevice: &HostStorageDeviceInfo, + FileSystemVolume: &HostFileSystemVolumeInfo, + SystemFile: nil, + Network: &types.HostNetworkInfo{ + Vswitch: []types.HostVirtualSwitch{ + { + Name: "vSwitch0", + Key: "key-vim.host.VirtualSwitch-vSwitch0", + NumPorts: 1536, + NumPortsAvailable: 1530, + Mtu: 1500, + Portgroup: []string{"key-vim.host.PortGroup-VM Network", "key-vim.host.PortGroup-Management Network"}, + Pnic: []string{"key-vim.host.PhysicalNic-vmnic0"}, + Spec: types.HostVirtualSwitchSpec{ + NumPorts: 128, + Bridge: &types.HostVirtualSwitchBondBridge{ + HostVirtualSwitchBridge: types.HostVirtualSwitchBridge{}, + NicDevice: []string{"vmnic0"}, + Beacon: &types.HostVirtualSwitchBeaconConfig{ + Interval: 1, + }, + LinkDiscoveryProtocolConfig: &types.LinkDiscoveryProtocolConfig{ + Protocol: "cdp", + Operation: "listen", + }, + }, + Policy: &types.HostNetworkPolicy{ + Security: &types.HostNetworkSecurityPolicy{ + AllowPromiscuous: types.NewBool(false), + MacChanges: types.NewBool(true), + ForgedTransmits: types.NewBool(true), + }, + NicTeaming: &types.HostNicTeamingPolicy{ + Policy: "loadbalance_srcid", + ReversePolicy: types.NewBool(true), + NotifySwitches: types.NewBool(true), + RollingOrder: types.NewBool(false), + FailureCriteria: &types.HostNicFailureCriteria{ + CheckSpeed: "minimum", + Speed: 10, + CheckDuplex: types.NewBool(false), + FullDuplex: types.NewBool(false), + CheckErrorPercent: types.NewBool(false), + Percentage: 0, + CheckBeacon: types.NewBool(false), + }, + NicOrder: &types.HostNicOrderPolicy{ + ActiveNic: []string{"vmnic0"}, + StandbyNic: nil, + }, + }, + OffloadPolicy: &types.HostNetOffloadCapabilities{ + CsumOffload: types.NewBool(true), + TcpSegmentation: types.NewBool(true), + ZeroCopyXmit: types.NewBool(true), + }, + ShapingPolicy: &types.HostNetworkTrafficShapingPolicy{ + Enabled: types.NewBool(false), + AverageBandwidth: 0, + PeakBandwidth: 0, + BurstSize: 0, + }, + }, + Mtu: 0, + }, + }, + }, + ProxySwitch: nil, + Portgroup: []types.HostPortGroup{ + { + Key: "key-vim.host.PortGroup-VM Network", + Port: nil, + Vswitch: "key-vim.host.VirtualSwitch-vSwitch0", + ComputedPolicy: types.HostNetworkPolicy{ + Security: &types.HostNetworkSecurityPolicy{ + AllowPromiscuous: types.NewBool(false), + MacChanges: types.NewBool(true), + ForgedTransmits: types.NewBool(true), + }, + NicTeaming: &types.HostNicTeamingPolicy{ + Policy: "loadbalance_srcid", + ReversePolicy: types.NewBool(true), + NotifySwitches: types.NewBool(true), + RollingOrder: types.NewBool(false), + FailureCriteria: &types.HostNicFailureCriteria{ + CheckSpeed: "minimum", + Speed: 10, + CheckDuplex: types.NewBool(false), + FullDuplex: types.NewBool(false), + CheckErrorPercent: types.NewBool(false), + Percentage: 0, + CheckBeacon: types.NewBool(false), + }, + NicOrder: &types.HostNicOrderPolicy{ + ActiveNic: []string{"vmnic0"}, + StandbyNic: nil, + }, + }, + OffloadPolicy: &types.HostNetOffloadCapabilities{ + CsumOffload: types.NewBool(true), + TcpSegmentation: types.NewBool(true), + ZeroCopyXmit: types.NewBool(true), + }, + ShapingPolicy: &types.HostNetworkTrafficShapingPolicy{ + Enabled: types.NewBool(false), + AverageBandwidth: 0, + PeakBandwidth: 0, + BurstSize: 0, + }, + }, + Spec: types.HostPortGroupSpec{ + Name: "VM Network", + VlanId: 0, + VswitchName: "vSwitch0", + Policy: types.HostNetworkPolicy{ + Security: &types.HostNetworkSecurityPolicy{}, + NicTeaming: &types.HostNicTeamingPolicy{ + Policy: "", + ReversePolicy: (*bool)(nil), + NotifySwitches: (*bool)(nil), + RollingOrder: (*bool)(nil), + FailureCriteria: &types.HostNicFailureCriteria{}, + NicOrder: (*types.HostNicOrderPolicy)(nil), + }, + OffloadPolicy: &types.HostNetOffloadCapabilities{}, + ShapingPolicy: &types.HostNetworkTrafficShapingPolicy{}, + }, + }, + }, + { + Key: "key-vim.host.PortGroup-Management Network", + Port: []types.HostPortGroupPort{ + { + Key: "key-vim.host.PortGroup.Port-33554436", + Mac: []string{"00:0c:29:81:d8:a0"}, + Type: "host", + }, + }, + Vswitch: "key-vim.host.VirtualSwitch-vSwitch0", + ComputedPolicy: types.HostNetworkPolicy{ + Security: &types.HostNetworkSecurityPolicy{ + AllowPromiscuous: types.NewBool(false), + MacChanges: types.NewBool(true), + ForgedTransmits: types.NewBool(true), + }, + NicTeaming: &types.HostNicTeamingPolicy{ + Policy: "loadbalance_srcid", + ReversePolicy: types.NewBool(true), + NotifySwitches: types.NewBool(true), + RollingOrder: types.NewBool(false), + FailureCriteria: &types.HostNicFailureCriteria{ + CheckSpeed: "minimum", + Speed: 10, + CheckDuplex: types.NewBool(false), + FullDuplex: types.NewBool(false), + CheckErrorPercent: types.NewBool(false), + Percentage: 0, + CheckBeacon: types.NewBool(false), + }, + NicOrder: &types.HostNicOrderPolicy{ + ActiveNic: []string{"vmnic0"}, + StandbyNic: nil, + }, + }, + OffloadPolicy: &types.HostNetOffloadCapabilities{ + CsumOffload: types.NewBool(true), + TcpSegmentation: types.NewBool(true), + ZeroCopyXmit: types.NewBool(true), + }, + ShapingPolicy: &types.HostNetworkTrafficShapingPolicy{ + Enabled: types.NewBool(false), + AverageBandwidth: 0, + PeakBandwidth: 0, + BurstSize: 0, + }, + }, + Spec: types.HostPortGroupSpec{ + Name: "Management Network", + VlanId: 0, + VswitchName: "vSwitch0", + Policy: types.HostNetworkPolicy{ + Security: &types.HostNetworkSecurityPolicy{}, + NicTeaming: &types.HostNicTeamingPolicy{ + Policy: "loadbalance_srcid", + ReversePolicy: (*bool)(nil), + NotifySwitches: types.NewBool(true), + RollingOrder: types.NewBool(false), + FailureCriteria: &types.HostNicFailureCriteria{ + CheckSpeed: "", + Speed: 0, + CheckDuplex: (*bool)(nil), + FullDuplex: (*bool)(nil), + CheckErrorPercent: (*bool)(nil), + Percentage: 0, + CheckBeacon: types.NewBool(false), + }, + NicOrder: &types.HostNicOrderPolicy{ + ActiveNic: []string{"vmnic0"}, + StandbyNic: nil, + }, + }, + OffloadPolicy: &types.HostNetOffloadCapabilities{}, + ShapingPolicy: &types.HostNetworkTrafficShapingPolicy{}, + }, + }, + }, + }, + Pnic: []types.PhysicalNic{ + { + Key: "key-vim.host.PhysicalNic-vmnic0", + Device: "vmnic0", + Pci: "0000:0b:00.0", + Driver: "nvmxnet3", + LinkSpeed: &types.PhysicalNicLinkInfo{ + SpeedMb: 10000, + Duplex: true, + }, + ValidLinkSpecification: []types.PhysicalNicLinkInfo{ + { + SpeedMb: 10000, + Duplex: true, + }, + }, + Spec: types.PhysicalNicSpec{ + Ip: &types.HostIpConfig{}, + LinkSpeed: &types.PhysicalNicLinkInfo{ + SpeedMb: 10000, + Duplex: true, + }, + }, + WakeOnLanSupported: false, + Mac: "00:0c:29:81:d8:a0", + FcoeConfiguration: &types.FcoeConfig{ + PriorityClass: 3, + SourceMac: "00:0c:29:81:d8:a0", + VlanRange: []types.FcoeConfigVlanRange{ + {}, + }, + Capabilities: types.FcoeConfigFcoeCapabilities{ + PriorityClass: false, + SourceMacAddress: false, + VlanRange: true, + }, + FcoeActive: false, + }, + VmDirectPathGen2Supported: types.NewBool(false), + VmDirectPathGen2SupportedMode: "", + ResourcePoolSchedulerAllowed: types.NewBool(true), + ResourcePoolSchedulerDisallowedReason: nil, + AutoNegotiateSupported: types.NewBool(false), + }, + { + Key: "key-vim.host.PhysicalNic-vmnic1", + Device: "vmnic1", + Pci: "0000:13:00.0", + Driver: "nvmxnet3", + LinkSpeed: &types.PhysicalNicLinkInfo{ + SpeedMb: 10000, + Duplex: true, + }, + ValidLinkSpecification: []types.PhysicalNicLinkInfo{ + { + SpeedMb: 10000, + Duplex: true, + }, + }, + Spec: types.PhysicalNicSpec{ + Ip: &types.HostIpConfig{}, + LinkSpeed: &types.PhysicalNicLinkInfo{ + SpeedMb: 10000, + Duplex: true, + }, + }, + WakeOnLanSupported: false, + Mac: "00:0c:29:81:d8:aa", + FcoeConfiguration: &types.FcoeConfig{ + PriorityClass: 3, + SourceMac: "00:0c:29:81:d8:aa", + VlanRange: []types.FcoeConfigVlanRange{ + {}, + }, + Capabilities: types.FcoeConfigFcoeCapabilities{ + PriorityClass: false, + SourceMacAddress: false, + VlanRange: true, + }, + FcoeActive: false, + }, + VmDirectPathGen2Supported: types.NewBool(false), + VmDirectPathGen2SupportedMode: "", + ResourcePoolSchedulerAllowed: types.NewBool(true), + ResourcePoolSchedulerDisallowedReason: nil, + AutoNegotiateSupported: types.NewBool(false), + }, + }, + Vnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "key-vim.host.PortGroup.Port-33554436", + }, + }, + ConsoleVnic: nil, + DnsConfig: &types.HostDnsConfig{ + Dhcp: true, + VirtualNicDevice: "vmk0", + HostName: "localhost", + DomainName: "localdomain", + Address: []string{"8.8.8.8"}, + SearchDomain: []string{"localdomain"}, + }, + IpRouteConfig: &types.HostIpRouteConfig{ + DefaultGateway: "127.0.0.1", + GatewayDevice: "", + IpV6DefaultGateway: "", + IpV6GatewayDevice: "", + }, + ConsoleIpRouteConfig: nil, + RouteTableInfo: &types.HostIpRouteTableInfo{ + IpRoute: []types.HostIpRouteEntry{ + { + Network: "0.0.0.0", + PrefixLength: 0, + Gateway: "127.0.0.1", + DeviceName: "vmk0", + }, + { + Network: "127.0.0.0", + PrefixLength: 8, + Gateway: "0.0.0.0", + DeviceName: "vmk0", + }, + }, + Ipv6Route: nil, + }, + Dhcp: nil, + Nat: nil, + IpV6Enabled: types.NewBool(false), + AtBootIpV6Enabled: types.NewBool(false), + NetStackInstance: []types.HostNetStackInstance{ + { + Key: "vSphereProvisioning", + Name: "", + DnsConfig: &types.HostDnsConfig{}, + IpRouteConfig: &types.HostIpRouteConfig{}, + RequestedMaxNumberOfConnections: 11000, + CongestionControlAlgorithm: "newreno", + IpV6Enabled: types.NewBool(true), + RouteTableConfig: (*types.HostIpRouteTableConfig)(nil), + }, + { + Key: "vmotion", + Name: "", + DnsConfig: &types.HostDnsConfig{}, + IpRouteConfig: &types.HostIpRouteConfig{}, + RequestedMaxNumberOfConnections: 11000, + CongestionControlAlgorithm: "newreno", + IpV6Enabled: types.NewBool(true), + RouteTableConfig: (*types.HostIpRouteTableConfig)(nil), + }, + { + Key: "defaultTcpipStack", + Name: "defaultTcpipStack", + DnsConfig: &types.HostDnsConfig{ + Dhcp: true, + VirtualNicDevice: "vmk0", + HostName: "localhost", + DomainName: "localdomain", + Address: []string{"8.8.8.8"}, + SearchDomain: []string{"localdomain"}, + }, + IpRouteConfig: &types.HostIpRouteConfig{ + DefaultGateway: "127.0.0.1", + GatewayDevice: "", + IpV6DefaultGateway: "", + IpV6GatewayDevice: "", + }, + RequestedMaxNumberOfConnections: 11000, + CongestionControlAlgorithm: "newreno", + IpV6Enabled: types.NewBool(true), + RouteTableConfig: &types.HostIpRouteTableConfig{ + IpRoute: []types.HostIpRouteOp{ + { + ChangeOperation: "ignore", + Route: types.HostIpRouteEntry{ + Network: "0.0.0.0", + PrefixLength: 0, + Gateway: "127.0.0.1", + DeviceName: "vmk0", + }, + }, + { + ChangeOperation: "ignore", + Route: types.HostIpRouteEntry{ + Network: "127.0.0.0", + PrefixLength: 8, + Gateway: "0.0.0.0", + DeviceName: "vmk0", + }, + }, + }, + Ipv6Route: nil, + }, + }, + }, + OpaqueSwitch: nil, + OpaqueNetwork: nil, + }, + Vmotion: &types.HostVMotionInfo{ + NetConfig: &types.HostVMotionNetConfig{ + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "VMotionConfig.vmotion.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: "", + }, + IpConfig: (*types.HostIpConfig)(nil), + }, + VirtualNicManagerInfo: &types.HostVirtualNicManagerInfo{ + NetConfig: []types.VirtualNicManagerNetConfig{ + { + NicType: "faultToleranceLogging", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "faultToleranceLogging.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + { + NicType: "management", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk1", + Key: "management.key-vim.host.VirtualNic-vmk1", + Portgroup: "", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "192.168.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:00", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + { + Device: "vmk0", + Key: "management.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: []string{"management.key-vim.host.VirtualNic-vmk0"}, + }, + { + NicType: "vSphereProvisioning", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "vSphereProvisioning.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + { + NicType: "vSphereReplication", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "vSphereReplication.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + { + NicType: "vSphereReplicationNFC", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "vSphereReplicationNFC.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + { + NicType: "vmotion", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "vmotion.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + { + NicType: "vsan", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "vsan.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + { + NicType: "vsanWitness", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "vsanWitness.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil), + }, + Mac: "00:0c:29:81:d8:a0", + DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil), + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + OpaqueNetwork: (*types.HostVirtualNicOpaqueNetworkSpec)(nil), + ExternalId: "", + PinnedPnic: "", + IpRouteSpec: (*types.HostVirtualNicIpRouteSpec)(nil), + }, + Port: "", + }, + }, + SelectedVnic: nil, + }, + }, + }, + Capabilities: &types.HostNetCapabilities{ + CanSetPhysicalNicLinkSpeed: true, + SupportsNicTeaming: true, + NicTeamingPolicy: []string{"loadbalance_ip", "loadbalance_srcmac", "loadbalance_srcid", "failover_explicit"}, + SupportsVlan: true, + UsesServiceConsoleNic: false, + SupportsNetworkHints: true, + MaxPortGroupsPerVswitch: 0, + VswitchConfigSupported: true, + VnicConfigSupported: true, + IpRouteConfigSupported: true, + DnsConfigSupported: true, + DhcpOnVnicSupported: true, + IpV6Supported: types.NewBool(true), + }, + DatastoreCapabilities: &types.HostDatastoreSystemCapabilities{ + NfsMountCreationRequired: true, + NfsMountCreationSupported: true, + LocalDatastoreSupported: false, + VmfsExtentExpansionSupported: types.NewBool(true), + }, + OffloadCapabilities: &types.HostNetOffloadCapabilities{ + CsumOffload: types.NewBool(true), + TcpSegmentation: types.NewBool(true), + ZeroCopyXmit: types.NewBool(true), + }, + Service: &types.HostServiceInfo{ + Service: []types.HostService{ + { + Key: "DCUI", + Label: "Direct Console UI", + Required: false, + Uninstallable: false, + Running: true, + Ruleset: nil, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "TSM", + Label: "ESXi Shell", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: nil, + Policy: "off", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "TSM-SSH", + Label: "SSH", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: nil, + Policy: "off", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "lbtd", + Label: "Load-Based Teaming Daemon", + Required: false, + Uninstallable: false, + Running: true, + Ruleset: nil, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "lwsmd", + Label: "Active Directory Service", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: nil, + Policy: "off", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "ntpd", + Label: "NTP Daemon", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: []string{"ntpClient"}, + Policy: "off", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "pcscd", + Label: "PC/SC Smart Card Daemon", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: nil, + Policy: "off", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "sfcbd-watchdog", + Label: "CIM Server", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: []string{"CIMHttpServer", "CIMHttpsServer"}, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "snmpd", + Label: "SNMP Server", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: []string{"snmp"}, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "vmsyslogd", + Label: "Syslog Server", + Required: true, + Uninstallable: false, + Running: true, + Ruleset: nil, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "vpxa", + Label: "VMware vCenter Agent", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: []string{"vpxHeartbeats"}, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-base", + Description: "This VIB contains all of the base functionality of vSphere ESXi.", + }, + }, + { + Key: "xorg", + Label: "X.Org Server", + Required: false, + Uninstallable: false, + Running: false, + Ruleset: nil, + Policy: "on", + SourcePackage: &types.HostServiceSourcePackage{ + SourcePackageName: "esx-xserver", + Description: "This VIB contains X Server used for virtual machine 3D hardware acceleration.", + }, + }, + }, + }, + Firewall: &HostFirewallInfo, + AutoStart: &types.HostAutoStartManagerConfig{ + Defaults: &types.AutoStartDefaults{ + Enabled: (*bool)(nil), + StartDelay: 120, + StopDelay: 120, + WaitForHeartbeat: types.NewBool(false), + StopAction: "PowerOff", + }, + PowerInfo: nil, + }, + ActiveDiagnosticPartition: &types.HostDiagnosticPartition{ + StorageType: "directAttached", + DiagnosticType: "singleHost", + Slots: -15, + Id: types.HostScsiDiskPartition{ + DiskName: "mpx.vmhba0:C0:T0:L0", + Partition: 9, + }, + }, + Option: nil, + OptionDef: nil, + Flags: &types.HostFlagInfo{}, + AdminDisabled: (*bool)(nil), + LockdownMode: "lockdownDisabled", + Ipmi: (*types.HostIpmiInfo)(nil), + SslThumbprintInfo: (*types.HostSslThumbprintInfo)(nil), + SslThumbprintData: nil, + Certificate: internal.LocalhostCert, + PciPassthruInfo: nil, + AuthenticationManagerInfo: &types.HostAuthenticationManagerInfo{ + AuthConfig: []types.BaseHostAuthenticationStoreInfo{ + &types.HostLocalAuthenticationInfo{ + HostAuthenticationStoreInfo: types.HostAuthenticationStoreInfo{ + Enabled: true, + }, + }, + &types.HostActiveDirectoryInfo{ + HostDirectoryStoreInfo: types.HostDirectoryStoreInfo{}, + JoinedDomain: "", + TrustedDomain: nil, + DomainMembershipStatus: "", + SmartCardAuthenticationEnabled: types.NewBool(false), + }, + }, + }, + FeatureVersion: nil, + PowerSystemCapability: &types.PowerSystemCapability{ + AvailablePolicy: []types.HostPowerPolicy{ + { + Key: 1, + Name: "PowerPolicy.static.name", + ShortName: "static", + Description: "PowerPolicy.static.description", + }, + { + Key: 2, + Name: "PowerPolicy.dynamic.name", + ShortName: "dynamic", + Description: "PowerPolicy.dynamic.description", + }, + { + Key: 3, + Name: "PowerPolicy.low.name", + ShortName: "low", + Description: "PowerPolicy.low.description", + }, + { + Key: 4, + Name: "PowerPolicy.custom.name", + ShortName: "custom", + Description: "PowerPolicy.custom.description", + }, + }, + }, + PowerSystemInfo: &types.PowerSystemInfo{ + CurrentPolicy: types.HostPowerPolicy{ + Key: 2, + Name: "PowerPolicy.dynamic.name", + ShortName: "dynamic", + Description: "PowerPolicy.dynamic.description", + }, + }, + CacheConfigurationInfo: []types.HostCacheConfigurationInfo{ + { + Key: types.ManagedObjectReference{Type: "Datastore", Value: "5980f676-21a5db76-9eef-000c2981d8a0"}, + SwapSize: 0, + }, + }, + WakeOnLanCapable: types.NewBool(false), + FeatureCapability: nil, + MaskedFeatureCapability: nil, + VFlashConfigInfo: nil, + VsanHostConfig: &types.VsanHostConfigInfo{ + Enabled: types.NewBool(false), + HostSystem: &types.ManagedObjectReference{Type: "HostSystem", Value: "ha-host"}, + ClusterInfo: &types.VsanHostConfigInfoClusterInfo{}, + StorageInfo: &types.VsanHostConfigInfoStorageInfo{ + AutoClaimStorage: types.NewBool(false), + DiskMapping: nil, + DiskMapInfo: nil, + ChecksumEnabled: (*bool)(nil), + }, + NetworkInfo: &types.VsanHostConfigInfoNetworkInfo{}, + FaultDomainInfo: &types.VsanHostFaultDomainInfo{}, + }, + DomainList: nil, + ScriptCheckSum: nil, + HostConfigCheckSum: nil, + GraphicsInfo: nil, + SharedPassthruGpuTypes: nil, + GraphicsConfig: &types.HostGraphicsConfig{ + HostDefaultGraphicsType: "shared", + SharedPassthruAssignmentPolicy: "performance", + DeviceType: nil, + }, + IoFilterInfo: []types.HostIoFilterInfo{ + { + IoFilterInfo: types.IoFilterInfo{ + Id: "VMW_spm_1.0.0", + Name: "spm", + Vendor: "VMW", + Version: "1.0.230", + Type: "datastoreIoControl", + Summary: "VMware Storage I/O Control", + ReleaseDate: "2016-07-21", + }, + Available: true, + }, + { + IoFilterInfo: types.IoFilterInfo{ + Id: "VMW_vmwarevmcrypt_1.0.0", + Name: "vmwarevmcrypt", + Vendor: "VMW", + Version: "1.0.0", + Type: "encryption", + Summary: "VMcrypt IO Filter", + ReleaseDate: "2016-07-21", + }, + Available: true, + }, + }, + SriovDevicePool: nil, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_firewall_system.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_firewall_system.go new file mode 100644 index 0000000000..46c5dea7e2 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_firewall_system.go @@ -0,0 +1,1425 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// HostFirewallInfo is the default template for the HostSystem config.firewall property. +// Capture method: +// govc object.collect -s -dump HostSystem:ha-host config.firewall +var HostFirewallInfo = types.HostFirewallInfo{ + DynamicData: types.DynamicData{}, + DefaultPolicy: types.HostFirewallDefaultPolicy{ + DynamicData: types.DynamicData{}, + IncomingBlocked: types.NewBool(true), + OutgoingBlocked: types.NewBool(true), + }, + Ruleset: []types.HostFirewallRuleset{ + { + DynamicData: types.DynamicData{}, + Key: "CIMHttpServer", + Label: "CIM Server", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 5988, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "sfcbd-watchdog", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "CIMHttpsServer", + Label: "CIM Secure Server", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 5989, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "sfcbd-watchdog", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "CIMSLP", + Label: "CIM SLP", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 427, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 427, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 427, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 427, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "DHCPv6", + Label: "DHCPv6", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 547, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 546, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 547, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 546, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "DVFilter", + Label: "DVFilter", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 2222, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "DVSSync", + Label: "DVSSync", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 8302, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8301, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8301, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8302, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "HBR", + Label: "HBR", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 31031, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 44046, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "NFC", + Label: "NFC", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 902, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 902, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "WOL", + Label: "WOL", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 9, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "activeDirectoryAll", + Label: "Active Directory All", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 88, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 88, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 123, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 137, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 139, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 389, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 389, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 445, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 464, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 464, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 3268, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 7476, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 2020, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "cmmds", + Label: "Virtual SAN Clustering Service", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 12345, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 23451, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 12345, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 23451, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 12321, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 12321, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "dhcp", + Label: "DHCP Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 68, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 68, + EndPort: 0, + Direction: "outbound", + PortType: "src", + Protocol: "udp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "dns", + Label: "DNS Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 53, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 53, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 53, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "esxupdate", + Label: "esxupdate", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 443, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "faultTolerance", + Label: "Fault Tolerance", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 80, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8300, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8300, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "ftpClient", + Label: "FTP Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 21, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 20, + EndPort: 0, + Direction: "inbound", + PortType: "src", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "gdbserver", + Label: "gdbserver", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 1000, + EndPort: 9999, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 50000, + EndPort: 50999, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "httpClient", + Label: "httpClient", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 80, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 443, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "iSCSI", + Label: "Software iSCSI Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 3260, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "iofiltervp", + Label: "iofiltervp", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 9080, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "ipfam", + Label: "NSX Distributed Logical Router Service", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 6999, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 6999, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "nfs41Client", + Label: "nfs41Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 0, + EndPort: 65535, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "nfsClient", + Label: "NFS Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 0, + EndPort: 65535, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "ntpClient", + Label: "NTP Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 123, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "ntpd", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "pvrdma", + Label: "pvrdma", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 28250, + EndPort: 28761, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 28250, + EndPort: 28761, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "rabbitmqproxy", + Label: "rabbitmqproxy", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 5671, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "rdt", + Label: "Virtual SAN Transport", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 2233, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 2233, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "remoteSerialPort", + Label: "VM serial port connected over network", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 0, + EndPort: 65535, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 23, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 1024, + EndPort: 65535, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "snmp", + Label: "SNMP Server", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 161, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "snmpd", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "sshClient", + Label: "SSH Client", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 22, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "sshServer", + Label: "SSH Server", + Required: true, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 22, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "syslog", + Label: "syslog", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 514, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 514, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 1514, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "updateManager", + Label: "vCenter Update Manager", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 80, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 9000, + EndPort: 9100, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vMotion", + Label: "vMotion", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 8000, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8000, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vSPC", + Label: "VM serial port connected to vSPC", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 0, + EndPort: 65535, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vSphereClient", + Label: "vSphere Web Client", + Required: true, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 902, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 443, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vpxHeartbeats", + Label: "VMware vCenter Agent", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 902, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "vpxa", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vsanEncryption", + Label: "vsanEncryption", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 0, + EndPort: 65535, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vsanhealth-multicasttest", + Label: "vsanhealth-multicasttest", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 5001, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "udp", + }, + { + DynamicData: types.DynamicData{}, + Port: 5001, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "udp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vsanvp", + Label: "vsanvp", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 8080, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + { + DynamicData: types.DynamicData{}, + Port: 8080, + EndPort: 0, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "vvold", + Label: "vvold", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 0, + EndPort: 65535, + Direction: "outbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: false, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + { + DynamicData: types.DynamicData{}, + Key: "webAccess", + Label: "vSphere Web Access", + Required: false, + Rule: []types.HostFirewallRule{ + { + DynamicData: types.DynamicData{}, + Port: 80, + EndPort: 0, + Direction: "inbound", + PortType: "dst", + Protocol: "tcp", + }, + }, + Service: "", + Enabled: true, + AllowedHosts: &types.HostFirewallRulesetIpList{ + DynamicData: types.DynamicData{}, + IpAddress: nil, + IpNetwork: nil, + AllIp: true, + }, + }, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_hardware_info.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_hardware_info.go new file mode 100644 index 0000000000..a30303fa78 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_hardware_info.go @@ -0,0 +1,865 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "time" + + "github.com/vmware/govmomi/vim25/types" +) + +// HostHardwareInfo is the default template for the HostSystem hardware property. +// Capture method: +// +// govc object.collect -s -dump HostSystem:ha-host hardware +var HostHardwareInfo = &types.HostHardwareInfo{ + SystemInfo: types.HostSystemInfo{ + Vendor: "VMware, Inc.", + Model: "VMware Virtual Platform", + Uuid: "e88d4d56-9f1e-3ea1-71fa-13a8e1a7fd70", + OtherIdentifyingInfo: []types.HostSystemIdentificationInfo{ + { + IdentifierValue: " No Asset Tag", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + Label: "Asset Tag", + Summary: "Asset tag of the system", + }, + Key: "AssetTag", + }, + }, + { + IdentifierValue: "[MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + Label: "OEM specific string", + Summary: "OEM specific string", + }, + Key: "OemSpecificString", + }, + }, + { + IdentifierValue: "Welcome to the Virtual Machine", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + Label: "OEM specific string", + Summary: "OEM specific string", + }, + Key: "OemSpecificString", + }, + }, + { + IdentifierValue: "VMware-56 4d 8d e8 1e 9f a1 3e-71 fa 13 a8 e1 a7 fd 70", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + Label: "Service tag", + Summary: "Service tag of the system", + }, + Key: "ServiceTag", + }, + }, + }, + }, + CpuPowerManagementInfo: &types.HostCpuPowerManagementInfo{ + CurrentPolicy: "Balanced", + HardwareSupport: "", + }, + CpuInfo: types.HostCpuInfo{ + NumCpuPackages: 2, + NumCpuCores: 2, + NumCpuThreads: 2, + Hz: 3591345000, + }, + CpuPkg: []types.HostCpuPackage{ + { + Index: 0, + Vendor: "intel", + Hz: 3591345000, + BusHz: 115849838, + Description: "Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz", + ThreadId: []int16{0}, + CpuFeature: []types.HostCpuIdInfo{ + { + Level: 0, + Vendor: "", + Eax: "0000:0000:0000:0000:0000:0000:0000:1101", + Ebx: "0111:0101:0110:1110:0110:0101:0100:0111", + Ecx: "0110:1100:0110:0101:0111:0100:0110:1110", + Edx: "0100:1001:0110:0101:0110:1110:0110:1001", + }, + { + Level: 1, + Vendor: "", + Eax: "0000:0000:0000:0010:0000:0110:1101:0111", + Ebx: "0000:0000:0000:0001:0000:1000:0000:0000", + Ecx: "1001:0111:1011:1010:0010:0010:0010:1011", + Edx: "0000:1111:1010:1011:1111:1011:1111:1111", + }, + { + Level: -2147483648, + Vendor: "", + Eax: "1000:0000:0000:0000:0000:0000:0000:1000", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0000", + Edx: "0000:0000:0000:0000:0000:0000:0000:0000", + }, + { + Level: -2147483647, + Vendor: "", + Eax: "0000:0000:0000:0000:0000:0000:0000:0000", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0001", + Edx: "0010:1000:0001:0000:0000:1000:0000:0000", + }, + { + Level: -2147483640, + Vendor: "", + Eax: "0000:0000:0000:0000:0011:0000:0010:1010", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0000", + Edx: "0000:0000:0000:0000:0000:0000:0000:0000", + }, + }, + }, + { + Index: 1, + Vendor: "intel", + Hz: 3591345000, + BusHz: 115849838, + Description: "Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz", + ThreadId: []int16{1}, + CpuFeature: []types.HostCpuIdInfo{ + { + Level: 0, + Vendor: "", + Eax: "0000:0000:0000:0000:0000:0000:0000:1101", + Ebx: "0111:0101:0110:1110:0110:0101:0100:0111", + Ecx: "0110:1100:0110:0101:0111:0100:0110:1110", + Edx: "0100:1001:0110:0101:0110:1110:0110:1001", + }, + { + Level: 1, + Vendor: "", + Eax: "0000:0000:0000:0010:0000:0110:1101:0111", + Ebx: "0000:0010:0000:0001:0000:1000:0000:0000", + Ecx: "1001:0111:1011:1010:0010:0010:0010:1011", + Edx: "0000:1111:1010:1011:1111:1011:1111:1111", + }, + { + Level: -2147483648, + Vendor: "", + Eax: "1000:0000:0000:0000:0000:0000:0000:1000", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0000", + Edx: "0000:0000:0000:0000:0000:0000:0000:0000", + }, + { + Level: -2147483647, + Vendor: "", + Eax: "0000:0000:0000:0000:0000:0000:0000:0000", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0001", + Edx: "0010:1000:0001:0000:0000:1000:0000:0000", + }, + { + Level: -2147483640, + Vendor: "", + Eax: "0000:0000:0000:0000:0011:0000:0010:1010", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0000", + Edx: "0000:0000:0000:0000:0000:0000:0000:0000", + }, + }, + }, + }, + MemorySize: 4294430720, + NumaInfo: &types.HostNumaInfo{ + Type: "NUMA", + NumNodes: 1, + NumaNode: []types.HostNumaNode{ + { + TypeId: 0x0, + CpuID: []int16{1, 0}, + MemoryRangeBegin: 4294967296, + MemoryRangeLength: 1073741824, + }, + }, + }, + SmcPresent: types.NewBool(false), + PciDevice: []types.HostPciDevice{ + { + Id: "0000:00:00.0", + ClassId: 1536, + Bus: 0x0, + Slot: 0x0, + Function: 0x0, + VendorId: -32634, + SubVendorId: 5549, + VendorName: "Intel Corporation", + DeviceId: 29072, + SubDeviceId: 6518, + ParentBridge: "", + DeviceName: "Virtual Machine Chipset", + }, + { + Id: "0000:00:01.0", + ClassId: 1540, + Bus: 0x0, + Slot: 0x1, + Function: 0x0, + VendorId: -32634, + SubVendorId: 0, + VendorName: "Intel Corporation", + DeviceId: 29073, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "440BX/ZX/DX - 82443BX/ZX/DX AGP bridge", + }, + { + Id: "0000:00:07.0", + ClassId: 1537, + Bus: 0x0, + Slot: 0x7, + Function: 0x0, + VendorId: -32634, + SubVendorId: 5549, + VendorName: "Intel Corporation", + DeviceId: 28944, + SubDeviceId: 6518, + ParentBridge: "", + DeviceName: "Virtual Machine Chipset", + }, + { + Id: "0000:00:07.1", + ClassId: 257, + Bus: 0x0, + Slot: 0x7, + Function: 0x1, + VendorId: -32634, + SubVendorId: 5549, + VendorName: "Intel Corporation", + DeviceId: 28945, + SubDeviceId: 6518, + ParentBridge: "", + DeviceName: "PIIX4 for 430TX/440BX/MX IDE Controller", + }, + { + Id: "0000:00:07.3", + ClassId: 1664, + Bus: 0x0, + Slot: 0x7, + Function: 0x3, + VendorId: -32634, + SubVendorId: 5549, + VendorName: "Intel Corporation", + DeviceId: 28947, + SubDeviceId: 6518, + ParentBridge: "", + DeviceName: "Virtual Machine Chipset", + }, + { + Id: "0000:00:07.7", + ClassId: 2176, + Bus: 0x0, + Slot: 0x7, + Function: 0x7, + VendorId: 5549, + SubVendorId: 5549, + VendorName: "VMware", + DeviceId: 1856, + SubDeviceId: 1856, + ParentBridge: "", + DeviceName: "Virtual Machine Communication Interface", + }, + { + Id: "0000:00:0f.0", + ClassId: 768, + Bus: 0x0, + Slot: 0xf, + Function: 0x0, + VendorId: 5549, + SubVendorId: 5549, + VendorName: "VMware", + DeviceId: 1029, + SubDeviceId: 1029, + ParentBridge: "", + DeviceName: "SVGA II Adapter", + }, + { + Id: "0000:00:11.0", + ClassId: 1540, + Bus: 0x0, + Slot: 0x11, + Function: 0x0, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1936, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI bridge", + }, + { + Id: "0000:00:15.0", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x0, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.1", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x1, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.2", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x2, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.3", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x3, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.4", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x4, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.5", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x5, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.6", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x6, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:15.7", + ClassId: 1540, + Bus: 0x0, + Slot: 0x15, + Function: 0x7, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.0", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x0, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.1", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x1, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.2", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x2, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.3", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x3, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.4", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x4, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.5", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x5, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.6", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x6, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:16.7", + ClassId: 1540, + Bus: 0x0, + Slot: 0x16, + Function: 0x7, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.0", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x0, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.1", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x1, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.2", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x2, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.3", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x3, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.4", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x4, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.5", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x5, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.6", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x6, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:17.7", + ClassId: 1540, + Bus: 0x0, + Slot: 0x17, + Function: 0x7, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.0", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x0, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.1", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x1, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.2", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x2, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.3", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x3, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.4", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x4, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.5", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x5, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.6", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x6, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:00:18.7", + ClassId: 1540, + Bus: 0x0, + Slot: 0x18, + Function: 0x7, + VendorId: 5549, + SubVendorId: 0, + VendorName: "VMware", + DeviceId: 1952, + SubDeviceId: 0, + ParentBridge: "", + DeviceName: "PCI Express Root Port", + }, + { + Id: "0000:03:00.0", + ClassId: 263, + Bus: 0x3, + Slot: 0x0, + Function: 0x0, + VendorId: 5549, + SubVendorId: 5549, + VendorName: "VMware", + DeviceId: 1984, + SubDeviceId: 1984, + ParentBridge: "0000:00:15.0", + DeviceName: "PVSCSI SCSI Controller", + }, + { + Id: "0000:0b:00.0", + ClassId: 512, + Bus: 0xb, + Slot: 0x0, + Function: 0x0, + VendorId: 5549, + SubVendorId: 5549, + VendorName: "VMware Inc.", + DeviceId: 1968, + SubDeviceId: 1968, + ParentBridge: "0000:00:16.0", + DeviceName: "vmxnet3 Virtual Ethernet Controller", + }, + { + Id: "0000:13:00.0", + ClassId: 512, + Bus: 0x13, + Slot: 0x0, + Function: 0x0, + VendorId: 5549, + SubVendorId: 5549, + VendorName: "VMware Inc.", + DeviceId: 1968, + SubDeviceId: 1968, + ParentBridge: "0000:00:17.0", + DeviceName: "vmxnet3 Virtual Ethernet Controller", + }, + }, + CpuFeature: []types.HostCpuIdInfo{ + { + Level: 0, + Vendor: "", + Eax: "0000:0000:0000:0000:0000:0000:0000:1101", + Ebx: "0111:0101:0110:1110:0110:0101:0100:0111", + Ecx: "0110:1100:0110:0101:0111:0100:0110:1110", + Edx: "0100:1001:0110:0101:0110:1110:0110:1001", + }, + { + Level: 1, + Vendor: "", + Eax: "0000:0000:0000:0010:0000:0110:1101:0111", + Ebx: "0000:0000:0000:0001:0000:1000:0000:0000", + Ecx: "1001:0111:1011:1010:0010:0010:0010:1011", + Edx: "0000:1111:1010:1011:1111:1011:1111:1111", + }, + { + Level: -2147483648, + Vendor: "", + Eax: "1000:0000:0000:0000:0000:0000:0000:1000", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0000", + Edx: "0000:0000:0000:0000:0000:0000:0000:0000", + }, + { + Level: -2147483647, + Vendor: "", + Eax: "0000:0000:0000:0000:0000:0000:0000:0000", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0001", + Edx: "0010:1000:0001:0000:0000:1000:0000:0000", + }, + { + Level: -2147483640, + Vendor: "", + Eax: "0000:0000:0000:0000:0011:0000:0010:1010", + Ebx: "0000:0000:0000:0000:0000:0000:0000:0000", + Ecx: "0000:0000:0000:0000:0000:0000:0000:0000", + Edx: "0000:0000:0000:0000:0000:0000:0000:0000", + }, + }, + BiosInfo: &types.HostBIOSInfo{ + BiosVersion: "6.00", + ReleaseDate: nil, + Vendor: "", + MajorRelease: 0, + MinorRelease: 0, + FirmwareMajorRelease: 0, + FirmwareMinorRelease: 0, + }, + ReliableMemoryInfo: &types.HostReliableMemoryInfo{}, +} + +func init() { + date, _ := time.Parse("2006-01-02", "2015-07-02") + + HostHardwareInfo.BiosInfo.ReleaseDate = &date +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_storage_device_info.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_storage_device_info.go new file mode 100644 index 0000000000..43d1f2ecd4 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_storage_device_info.go @@ -0,0 +1,347 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// HostStorageDeviceInfo is the default template for the HostSystem config.storageDevice property. +// Capture method: +// +// govc object.collect -s -dump HostSystem:ha-host config.storageDevice +var HostStorageDeviceInfo = types.HostStorageDeviceInfo{ + HostBusAdapter: []types.BaseHostHostBusAdapter{ + &types.HostParallelScsiHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.ParallelScsiHba-vmhba0", + Device: "vmhba0", + Bus: 3, + Status: "unknown", + Model: "PVSCSI SCSI Controller", + Driver: "pvscsi", + Pci: "0000:03:00.0", + }, + }, + &types.HostBlockHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.BlockHba-vmhba1", + Device: "vmhba1", + Bus: 0, + Status: "unknown", + Model: "PIIX4 for 430TX/440BX/MX IDE Controller", + Driver: "vmkata", + Pci: "0000:00:07.1", + }, + }, + &types.HostBlockHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.BlockHba-vmhba64", + Device: "vmhba64", + Bus: 0, + Status: "unknown", + Model: "PIIX4 for 430TX/440BX/MX IDE Controller", + Driver: "vmkata", + Pci: "0000:00:07.1", + }, + }, + }, + ScsiLun: []types.BaseScsiLun{ + &types.ScsiLun{ + HostDevice: types.HostDevice{ + DeviceName: "/vmfs/devices/cdrom/mpx.vmhba1:C0:T0:L0", + DeviceType: "cdrom", + }, + Key: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", + Uuid: "0005000000766d686261313a303a30", + Descriptor: []types.ScsiLunDescriptor{ + { + Quality: "lowQuality", + Id: "mpx.vmhba1:C0:T0:L0", + }, + { + Quality: "lowQuality", + Id: "vml.0005000000766d686261313a303a30", + }, + { + Quality: "lowQuality", + Id: "0005000000766d686261313a303a30", + }, + }, + CanonicalName: "mpx.vmhba1:C0:T0:L0", + DisplayName: "Local NECVMWar CD-ROM (mpx.vmhba1:C0:T0:L0)", + LunType: "cdrom", + Vendor: "NECVMWar", + Model: "VMware IDE CDR00", + Revision: "1.00", + ScsiLevel: 5, + SerialNumber: "unavailable", + DurableName: (*types.ScsiLunDurableName)(nil), + AlternateName: []types.ScsiLunDurableName{ + { + Namespace: "GENERIC_VPD", + NamespaceId: 0x5, + Data: []uint8{0x0, 0x0, 0x0, 0x4, 0x0, 0xb0, 0xb1, 0xb2}, + }, + { + Namespace: "GENERIC_VPD", + NamespaceId: 0x5, + Data: []uint8{0x0, 0xb2, 0x0, 0x4, 0x1, 0x60, 0x0, 0x0}, + }, + }, + StandardInquiry: []uint8{0x0, 0x0, 0x6, 0x2, 0x1f, 0x0, 0x0, 0x72}, + QueueDepth: 0, + OperationalState: []string{"ok"}, + Capabilities: &types.ScsiLunCapabilities{}, + VStorageSupport: "vStorageUnsupported", + ProtocolEndpoint: types.NewBool(false), + }, + &types.HostScsiDisk{ + ScsiLun: types.ScsiLun{ + HostDevice: types.HostDevice{ + DeviceName: "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0", + DeviceType: "disk", + }, + Key: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", + Uuid: "0000000000766d686261303a303a30", + Descriptor: []types.ScsiLunDescriptor{ + { + Quality: "lowQuality", + Id: "mpx.vmhba0:C0:T0:L0", + }, + { + Quality: "lowQuality", + Id: "vml.0000000000766d686261303a303a30", + }, + { + Quality: "lowQuality", + Id: "0000000000766d686261303a303a30", + }, + }, + CanonicalName: "mpx.vmhba0:C0:T0:L0", + DisplayName: "Local VMware, Disk (mpx.vmhba0:C0:T0:L0)", + LunType: "disk", + Vendor: "VMware, ", + Model: "VMware Virtual S", + Revision: "1.0 ", + ScsiLevel: 2, + SerialNumber: "unavailable", + DurableName: (*types.ScsiLunDurableName)(nil), + AlternateName: []types.ScsiLunDurableName{ + { + Namespace: "GENERIC_VPD", + NamespaceId: 0x5, + Data: []uint8{0x0, 0x0, 0x0, 0x4, 0x0, 0xb0, 0xb1, 0xb2}, + }, + { + Namespace: "GENERIC_VPD", + NamespaceId: 0x5, + Data: []uint8{0x0, 0xb2, 0x0, 0x4, 0x1, 0x60, 0x0, 0x0}, + }, + }, + StandardInquiry: []uint8{0x0, 0x0, 0x6, 0x2, 0x1f, 0x0, 0x0, 0x72}, + QueueDepth: 1024, + OperationalState: []string{"ok"}, + Capabilities: &types.ScsiLunCapabilities{}, + VStorageSupport: "vStorageUnsupported", + ProtocolEndpoint: types.NewBool(false), + }, + Capacity: types.HostDiskDimensionsLba{ + BlockSize: 512, + Block: 67108864, + }, + DevicePath: "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0", + Ssd: types.NewBool(true), + LocalDisk: types.NewBool(true), + PhysicalLocation: nil, + EmulatedDIXDIFEnabled: types.NewBool(false), + VsanDiskInfo: (*types.VsanHostVsanDiskInfo)(nil), + ScsiDiskType: "native512", + }, + }, + ScsiTopology: &types.HostScsiTopology{ + Adapter: []types.HostScsiTopologyInterface{ + { + Key: "key-vim.host.ScsiTopology.Interface-vmhba0", + Adapter: "key-vim.host.ParallelScsiHba-vmhba0", + Target: []types.HostScsiTopologyTarget{ + { + Key: "key-vim.host.ScsiTopology.Target-vmhba0:0:0", + Target: 0, + Lun: []types.HostScsiTopologyLun{ + { + Key: "key-vim.host.ScsiTopology.Lun-0000000000766d686261303a303a30", + Lun: 0, + ScsiLun: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", + }, + }, + Transport: &types.HostParallelScsiTargetTransport{}, + }, + }, + }, + { + Key: "key-vim.host.ScsiTopology.Interface-vmhba1", + Adapter: "key-vim.host.BlockHba-vmhba1", + Target: []types.HostScsiTopologyTarget{ + { + Key: "key-vim.host.ScsiTopology.Target-vmhba1:0:0", + Target: 0, + Lun: []types.HostScsiTopologyLun{ + { + Key: "key-vim.host.ScsiTopology.Lun-0005000000766d686261313a303a30", + Lun: 0, + ScsiLun: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", + }, + }, + Transport: &types.HostBlockAdapterTargetTransport{}, + }, + }, + }, + { + Key: "key-vim.host.ScsiTopology.Interface-vmhba64", + Adapter: "key-vim.host.BlockHba-vmhba64", + Target: nil, + }, + }, + }, + MultipathInfo: &types.HostMultipathInfo{ + Lun: []types.HostMultipathInfoLogicalUnit{ + { + Key: "key-vim.host.MultipathInfo.LogicalUnit-0005000000766d686261313a303a30", + Id: "0005000000766d686261313a303a30", + Lun: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", + Path: []types.HostMultipathInfoPath{ + { + Key: "key-vim.host.MultipathInfo.Path-vmhba1:C0:T0:L0", + Name: "vmhba1:C0:T0:L0", + PathState: "active", + State: "active", + IsWorkingPath: types.NewBool(true), + Adapter: "key-vim.host.BlockHba-vmhba1", + Lun: "key-vim.host.MultipathInfo.LogicalUnit-0005000000766d686261313a303a30", + Transport: &types.HostBlockAdapterTargetTransport{}, + }, + }, + Policy: &types.HostMultipathInfoFixedLogicalUnitPolicy{ + HostMultipathInfoLogicalUnitPolicy: types.HostMultipathInfoLogicalUnitPolicy{ + Policy: "VMW_PSP_FIXED", + }, + Prefer: "vmhba1:C0:T0:L0", + }, + StorageArrayTypePolicy: &types.HostMultipathInfoLogicalUnitStorageArrayTypePolicy{ + Policy: "VMW_SATP_LOCAL", + }, + }, + { + Key: "key-vim.host.MultipathInfo.LogicalUnit-0000000000766d686261303a303a30", + Id: "0000000000766d686261303a303a30", + Lun: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", + Path: []types.HostMultipathInfoPath{ + { + Key: "key-vim.host.MultipathInfo.Path-vmhba0:C0:T0:L0", + Name: "vmhba0:C0:T0:L0", + PathState: "active", + State: "active", + IsWorkingPath: types.NewBool(true), + Adapter: "key-vim.host.ParallelScsiHba-vmhba0", + Lun: "key-vim.host.MultipathInfo.LogicalUnit-0000000000766d686261303a303a30", + Transport: &types.HostParallelScsiTargetTransport{}, + }, + }, + Policy: &types.HostMultipathInfoFixedLogicalUnitPolicy{ + HostMultipathInfoLogicalUnitPolicy: types.HostMultipathInfoLogicalUnitPolicy{ + Policy: "VMW_PSP_FIXED", + }, + Prefer: "vmhba0:C0:T0:L0", + }, + StorageArrayTypePolicy: &types.HostMultipathInfoLogicalUnitStorageArrayTypePolicy{ + Policy: "VMW_SATP_LOCAL", + }, + }, + }, + }, + PlugStoreTopology: &types.HostPlugStoreTopology{ + Adapter: []types.HostPlugStoreTopologyAdapter{ + { + Key: "key-vim.host.PlugStoreTopology.Adapter-vmhba0", + Adapter: "key-vim.host.ParallelScsiHba-vmhba0", + Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0"}, + }, + { + Key: "key-vim.host.PlugStoreTopology.Adapter-vmhba1", + Adapter: "key-vim.host.BlockHba-vmhba1", + Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0"}, + }, + { + Key: "key-vim.host.PlugStoreTopology.Adapter-vmhba64", + Adapter: "key-vim.host.BlockHba-vmhba64", + Path: nil, + }, + }, + Path: []types.HostPlugStoreTopologyPath{ + { + Key: "key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0", + Name: "vmhba0:C0:T0:L0", + ChannelNumber: 0, + TargetNumber: 0, + LunNumber: 0, + Adapter: "key-vim.host.PlugStoreTopology.Adapter-vmhba0", + Target: "key-vim.host.PlugStoreTopology.Target-pscsi.0:0", + Device: "key-vim.host.PlugStoreTopology.Device-0000000000766d686261303a303a30", + }, + { + Key: "key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0", + Name: "vmhba1:C0:T0:L0", + ChannelNumber: 0, + TargetNumber: 0, + LunNumber: 0, + Adapter: "key-vim.host.PlugStoreTopology.Adapter-vmhba1", + Target: "key-vim.host.PlugStoreTopology.Target-ide.0:0", + Device: "key-vim.host.PlugStoreTopology.Device-0005000000766d686261313a303a30", + }, + }, + Target: []types.HostPlugStoreTopologyTarget{ + { + Key: "key-vim.host.PlugStoreTopology.Target-pscsi.0:0", + Transport: &types.HostParallelScsiTargetTransport{}, + }, + { + Key: "key-vim.host.PlugStoreTopology.Target-ide.0:0", + Transport: &types.HostBlockAdapterTargetTransport{}, + }, + }, + Device: []types.HostPlugStoreTopologyDevice{ + { + Key: "key-vim.host.PlugStoreTopology.Device-0005000000766d686261313a303a30", + Lun: "key-vim.host.ScsiLun-0005000000766d686261313a303a30", + Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0"}, + }, + { + Key: "key-vim.host.PlugStoreTopology.Device-0000000000766d686261303a303a30", + Lun: "key-vim.host.ScsiDisk-0000000000766d686261303a303a30", + Path: []string{"key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0"}, + }, + }, + Plugin: []types.HostPlugStoreTopologyPlugin{ + { + Key: "key-vim.host.PlugStoreTopology.Plugin-NMP", + Name: "NMP", + Device: []string{"key-vim.host.PlugStoreTopology.Device-0005000000766d686261313a303a30", "key-vim.host.PlugStoreTopology.Device-0000000000766d686261303a303a30"}, + ClaimedPath: []string{"key-vim.host.PlugStoreTopology.Path-vmhba0:C0:T0:L0", "key-vim.host.PlugStoreTopology.Path-vmhba1:C0:T0:L0"}, + }, + }, + }, + SoftwareInternetScsiEnabled: false, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_system.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_system.go new file mode 100644 index 0000000000..496f49d3ae --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_system.go @@ -0,0 +1,1802 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "time" + + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +// HostSystem is the default template for HostSystem properties. +// Capture method: +// +// govc host.info -dump +var HostSystem = mo.HostSystem{ + ManagedEntity: mo.ManagedEntity{ + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "HostSystem", Value: "ha-host"}, + Value: nil, + AvailableField: nil, + }, + Parent: &types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, + CustomValue: nil, + OverallStatus: "", + ConfigStatus: "", + ConfigIssue: nil, + EffectiveRole: nil, + Permission: nil, + Name: "", + DisabledMethod: nil, + RecentTask: nil, + DeclaredAlarmState: nil, + TriggeredAlarmState: nil, + AlarmActionsEnabled: (*bool)(nil), + Tag: nil, + }, + Runtime: types.HostRuntimeInfo{ + DynamicData: types.DynamicData{}, + ConnectionState: "connected", + PowerState: "poweredOn", + StandbyMode: "none", + InMaintenanceMode: false, + BootTime: (*time.Time)(nil), + HealthSystemRuntime: &types.HealthSystemRuntime{ + DynamicData: types.DynamicData{}, + SystemHealthInfo: &types.HostSystemHealthInfo{ + DynamicData: types.DynamicData{}, + NumericSensorInfo: []types.HostNumericSensorInfo{ + { + DynamicData: types.DynamicData{}, + Name: "VMware Rollup Health State", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "system", + }, + { + DynamicData: types.DynamicData{}, + Name: "CPU socket #0 Level-1 Cache is 16384 B", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Processors", + }, + { + DynamicData: types.DynamicData{}, + Name: "CPU socket #0 Level-2 Cache is 0 B", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Processors", + }, + { + DynamicData: types.DynamicData{}, + Name: "CPU socket #1 Level-1 Cache is 16384 B", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Processors", + }, + { + DynamicData: types.DynamicData{}, + Name: "CPU socket #1 Level-2 Cache is 0 B", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Processors", + }, + { + DynamicData: types.DynamicData{}, + Name: "Phoenix Technologies LTD System BIOS 6.00 2014-05-20 00:00:00.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware, Inc. VMware ESXi 6.0.0 build-3634798 2016-03-07 00:00:00.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-ata-piix 2.12-10vmw.600.2.34.3634798 2016-03-08 07:38:41.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsu-lsi-mptsas-plugin 1.0.0-1vmw.600.2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-mlx4-core 1.9.7.0-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsu-lsi-mpt2sas-plugin 1.0.0-4vmw.600.2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-aacraid 1.1.5.1-9vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-via 0.3.3-2vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-qla4xxx 5.01.03.2-7vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-sata-promise 2.12-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-megaraid-mbox 2.20.5.1-6vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware vsan 6.0.0-2.34.3563498 2016-02-17 17:18:19.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-e1000 8.0.3.1-5vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-serverworks 0.4.3-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-mptspi 4.23.01.00-9vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-nx-nic 5.0.621-5vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware block-cciss 3.6.14-10vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-bnx2x 1.78.80.v60.12-1vmw.600.2.34.3634798 2016-03-08 07:38:41.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ipmi-ipmi-devintf 39.1-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-mptsas 4.23.01.00-9vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-megaraid2 2.00.4-9vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware nvme 1.0e.0.35-1vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware esx-xserver 6.0.0-2.34.3634798 2016-03-08 07:39:27.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware nmlx4-en 3.0.0.0-1vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsu-hp-hpsa-plugin 1.0.0-1vmw.600.2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-megaraid-sas 6.603.55.00-2vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-enic 2.1.2.38-2vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsi-msgpt3 06.255.12.00-8vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-ahci 3.0-22vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-forcedeth 0.61-2vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-atiixp 0.4.6-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware elxnet 10.2.309.6v-1vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware esx-dvfilter-generic-fastpath 6.0.0-2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware uhci-usb-uhci 1.0-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-amd 0.3.10-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-sata-sil24 1.1-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ohci-usb-ohci 1.0-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-igb 5.0.5.1.1-5vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-pdc2027x 1.0-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ehci-ehci-hcd 1.0-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsu-lsi-lsi-mr3-plugin 1.0.0-2vmw.600.2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-ixgbe 3.7.13.7.14iov-20vmw.600.2.34.3634798 2016-03-08 07:38:41.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware vsanhealth 6.0.0-3000000.3.0.2.34.3544323 2016-02-12 06:45:30.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-cnic 1.78.76.v60.13-2vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-sata-svw 2.3-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ipmi-ipmi-msghandler 39.1-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware emulex-esx-elxnetcli 10.2.309.6v-2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-aic79xx 3.1-5vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware qlnativefc 2.0.12.0-5vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsu-lsi-lsi-msgpt3-plugin 1.0.0-1vmw.600.2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ima-qla4xxx 2.02.18-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-mlx4-en 1.9.7.0-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-e1000e 3.2.2.1-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-tg3 3.131d.v60.4-2vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-hpsa 6.0.0.44-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-bnx2fc 1.78.78.v60.8-1vmw.600.2.34.3634798 2016-03-08 07:38:41.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware cpu-microcode 6.0.0-2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-fnic 1.5.0.45-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware nmlx4-rdma 3.0.0.0-1vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-vmxnet3 1.1.3.0-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lpfc 10.2.309.8-2vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware esx-ui 1.0.0-3617585 2016-03-03 04:52:43.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-cmd64x 0.2.5-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsi-mr3 6.605.08.00-7vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-hpt3x2n 0.3.4-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-sata-nv 3.5-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware misc-cnic-register 1.78.75.v60.7-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware lsu-lsi-megaraid-sas-plugin 1.0.0-2vmw.600.2.34.3634798 2016-03-08 07:39:28.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ata-pata-sil680 0.4.8-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware esx-tboot 6.0.0-2.34.3634798 2016-03-08 07:39:27.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware xhci-xhci 1.0-3vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-ips 7.12.05-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-adp94xx 1.0.8.12-6vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware rste 2.0.2.0088-4vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware ipmi-ipmi-si-drv 39.1-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMWARE mtip32xx-native 3.8.5-1vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-mpt2sas 19.00.00.00-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware misc-drivers 6.0.0-2.34.3634798 2016-03-08 07:38:41.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware nmlx4-core 3.0.0.0-1vmw.600.2.34.3634798 2016-03-08 07:38:46.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware sata-sata-sil 2.3-4vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware esx-base 6.0.0-2.34.3634798 2016-03-08 07:39:18.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware scsi-bnx2i 2.78.76.v60.8-1vmw.600.2.34.3634798 2016-03-08 07:38:41.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "VMware net-bnx2 2.2.4f.v60.10-1vmw.600.2.34.3634798 2016-03-08 07:38:45.000", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "e1000 driver 8.0.3.1-NAPI", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + { + DynamicData: types.DynamicData{}, + Name: "e1000 device firmware N/A", + HealthState: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Sensor is operating under normal conditions", + }, + Key: "green", + }, + CurrentReading: 0, + UnitModifier: 0, + BaseUnits: "", + RateUnits: "", + SensorType: "Software Components", + }, + }, + }, + HardwareStatusInfo: &types.HostHardwareStatusInfo{ + DynamicData: types.DynamicData{}, + MemoryStatusInfo: nil, + CpuStatusInfo: []types.BaseHostHardwareElementInfo{ + &types.HostHardwareElementInfo{ + DynamicData: types.DynamicData{}, + Name: "CPU socket #0", + Status: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Physical element is functioning as expected", + }, + Key: "Green", + }, + }, + &types.HostHardwareElementInfo{ + DynamicData: types.DynamicData{}, + Name: "CPU socket #1", + Status: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Green", + Summary: "Physical element is functioning as expected", + }, + Key: "Green", + }, + }, + }, + StorageStatusInfo: nil, + }, + }, + DasHostState: (*types.ClusterDasFdmHostState)(nil), + TpmPcrValues: nil, + VsanRuntimeInfo: &types.VsanHostRuntimeInfo{}, + NetworkRuntimeInfo: &types.HostRuntimeInfoNetworkRuntimeInfo{ + DynamicData: types.DynamicData{}, + NetStackInstanceRuntimeInfo: []types.HostRuntimeInfoNetStackInstanceRuntimeInfo{ + { + DynamicData: types.DynamicData{}, + NetStackInstanceKey: "defaultTcpipStack", + State: "active", + VmknicKeys: []string{"vmk0"}, + MaxNumberOfConnections: 11000, + CurrentIpV6Enabled: types.NewBool(true), + }, + }, + NetworkResourceRuntime: (*types.HostNetworkResourceRuntime)(nil), + }, + VFlashResourceRuntimeInfo: (*types.HostVFlashManagerVFlashResourceRunTimeInfo)(nil), + HostMaxVirtualDiskCapacity: 68169720922112, + }, + Summary: types.HostListSummary{ + DynamicData: types.DynamicData{}, + Host: &types.ManagedObjectReference{Type: "HostSystem", Value: "ha-host"}, + Hardware: &types.HostHardwareSummary{ + DynamicData: types.DynamicData{}, + Vendor: "VMware, Inc.", + Model: "VMware Virtual Platform", + Uuid: "564d2f12-8041-639b-5018-05a835b72eaf", + OtherIdentifyingInfo: []types.HostSystemIdentificationInfo{ + { + DynamicData: types.DynamicData{}, + IdentifierValue: " No Asset Tag", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Asset Tag", + Summary: "Asset tag of the system", + }, + Key: "AssetTag", + }, + }, + { + DynamicData: types.DynamicData{}, + IdentifierValue: "[MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "OEM specific string", + Summary: "OEM specific string", + }, + Key: "OemSpecificString", + }, + }, + { + DynamicData: types.DynamicData{}, + IdentifierValue: "Welcome to the Virtual Machine", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "OEM specific string", + Summary: "OEM specific string", + }, + Key: "OemSpecificString", + }, + }, + { + DynamicData: types.DynamicData{}, + IdentifierValue: "VMware-56 4d 2f 12 80 41 63 9b-50 18 05 a8 35 b7 2e af", + IdentifierType: &types.ElementDescription{ + Description: types.Description{ + DynamicData: types.DynamicData{}, + Label: "Service tag", + Summary: "Service tag of the system", + }, + Key: "ServiceTag", + }, + }, + }, + MemorySize: 4294430720, + CpuModel: "Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz", + CpuMhz: 2294, + NumCpuPkgs: 2, + NumCpuCores: 2, + NumCpuThreads: 2, + NumNics: 1, + NumHBAs: 3, + }, + Runtime: (*types.HostRuntimeInfo)(nil), + Config: types.HostConfigSummary{ + DynamicData: types.DynamicData{}, + Name: "localhost.localdomain", + Port: 902, + SslThumbprint: "", + Product: &HostConfigInfo.Product, + VmotionEnabled: false, + FaultToleranceEnabled: types.NewBool(true), + FeatureVersion: nil, + AgentVmDatastore: (*types.ManagedObjectReference)(nil), + AgentVmNetwork: (*types.ManagedObjectReference)(nil), + }, + QuickStats: types.HostListSummaryQuickStats{ + DynamicData: types.DynamicData{}, + OverallCpuUsage: 67, + OverallMemoryUsage: 1404, + DistributedCpuFairness: 0, + DistributedMemoryFairness: 0, + Uptime: 77229, + }, + OverallStatus: "gray", + RebootRequired: false, + CustomValue: nil, + ManagementServerIp: "127.0.0.1", + MaxEVCModeKey: "", + CurrentEVCModeKey: "", + Gateway: (*types.HostListSummaryGatewaySummary)(nil), + }, + Hardware: (*types.HostHardwareInfo)(nil), + Capability: (*types.HostCapability)(nil), + LicensableResource: types.HostLicensableResourceInfo{ + Resource: []types.KeyAnyValue{ + { + Key: "numCpuPackages", + Value: types.KeyValue{ + Key: "numCpuPackages", + Value: "2", + }, + }, + }, + }, + ConfigManager: types.HostConfigManager{ + DynamicData: types.DynamicData{}, + CpuScheduler: &types.ManagedObjectReference{Type: "HostCpuSchedulerSystem", Value: "cpuSchedulerSystem"}, + DatastoreSystem: &types.ManagedObjectReference{Type: "HostDatastoreSystem", Value: "ha-datastoresystem"}, + MemoryManager: &types.ManagedObjectReference{Type: "HostMemorySystem", Value: "memoryManagerSystem"}, + StorageSystem: &types.ManagedObjectReference{Type: "HostStorageSystem", Value: "storageSystem"}, + NetworkSystem: &types.ManagedObjectReference{Type: "HostNetworkSystem", Value: "networkSystem"}, + VmotionSystem: &types.ManagedObjectReference{Type: "HostVMotionSystem", Value: "ha-vmotion-system"}, + VirtualNicManager: &types.ManagedObjectReference{Type: "HostVirtualNicManager", Value: "ha-vnic-mgr"}, + ServiceSystem: &types.ManagedObjectReference{Type: "HostServiceSystem", Value: "serviceSystem"}, + FirewallSystem: &types.ManagedObjectReference{Type: "HostFirewallSystem", Value: "firewallSystem"}, + AdvancedOption: &types.ManagedObjectReference{Type: "OptionManager", Value: "ha-adv-options"}, + DiagnosticSystem: &types.ManagedObjectReference{Type: "HostDiagnosticSystem", Value: "diagnosticsystem"}, + AutoStartManager: &types.ManagedObjectReference{Type: "HostAutoStartManager", Value: "ha-autostart-mgr"}, + SnmpSystem: &types.ManagedObjectReference{Type: "HostSnmpSystem", Value: "ha-snmp-agent"}, + DateTimeSystem: &types.ManagedObjectReference{Type: "HostDateTimeSystem", Value: "dateTimeSystem"}, + PatchManager: &types.ManagedObjectReference{Type: "HostPatchManager", Value: "ha-host-patch-manager"}, + ImageConfigManager: &types.ManagedObjectReference{Type: "HostImageConfigManager", Value: "ha-image-config-manager"}, + BootDeviceSystem: (*types.ManagedObjectReference)(nil), + FirmwareSystem: &types.ManagedObjectReference{Type: "HostFirmwareSystem", Value: "ha-firmwareSystem"}, + HealthStatusSystem: &types.ManagedObjectReference{Type: "HostHealthStatusSystem", Value: "healthStatusSystem"}, + PciPassthruSystem: &types.ManagedObjectReference{Type: "HostPciPassthruSystem", Value: "ha-pcipassthrusystem"}, + LicenseManager: &types.ManagedObjectReference{Type: "LicenseManager", Value: "ha-license-manager"}, + KernelModuleSystem: &types.ManagedObjectReference{Type: "HostKernelModuleSystem", Value: "kernelModuleSystem"}, + AuthenticationManager: &types.ManagedObjectReference{Type: "HostAuthenticationManager", Value: "ha-auth-manager"}, + PowerSystem: &types.ManagedObjectReference{Type: "HostPowerSystem", Value: "ha-power-system"}, + CacheConfigurationManager: &types.ManagedObjectReference{Type: "HostCacheConfigurationManager", Value: "ha-cache-configuration-manager"}, + EsxAgentHostManager: (*types.ManagedObjectReference)(nil), + IscsiManager: &types.ManagedObjectReference{Type: "IscsiManager", Value: "iscsiManager"}, + VFlashManager: &types.ManagedObjectReference{Type: "HostVFlashManager", Value: "ha-vflash-manager"}, + VsanSystem: &types.ManagedObjectReference{Type: "HostVsanSystem", Value: "vsanSystem"}, + MessageBusProxy: &types.ManagedObjectReference{Type: "MessageBusProxy", Value: "messageBusProxy"}, + UserDirectory: &types.ManagedObjectReference{Type: "UserDirectory", Value: "ha-user-directory"}, + AccountManager: &types.ManagedObjectReference{Type: "HostLocalAccountManager", Value: "ha-localacctmgr"}, + HostAccessManager: &types.ManagedObjectReference{Type: "HostAccessManager", Value: "ha-host-access-manager"}, + GraphicsManager: &types.ManagedObjectReference{Type: "HostGraphicsManager", Value: "ha-graphics-manager"}, + VsanInternalSystem: &types.ManagedObjectReference{Type: "HostVsanInternalSystem", Value: "ha-vsan-internal-system"}, + CertificateManager: &types.ManagedObjectReference{Type: "HostCertificateManager", Value: "ha-certificate-manager"}, + }, + Config: &HostConfigInfo, + Vm: nil, + Datastore: nil, + Network: nil, + DatastoreBrowser: types.ManagedObjectReference{Type: "HostDatastoreBrowser", Value: "ha-host-datastorebrowser"}, + SystemResources: (*types.HostSystemResourceInfo)(nil), +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/host_vnic_manager.go b/vendor/github.com/vmware/govmomi/simulator/esx/host_vnic_manager.go new file mode 100644 index 0000000000..6d6479af5e --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/host_vnic_manager.go @@ -0,0 +1,47 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +var VirtualNicManagerNetConfig = []types.VirtualNicManagerNetConfig{ + { + NicType: "management", + MultiSelectAllowed: true, + CandidateVnic: []types.HostVirtualNic{ + { + Device: "vmk0", + Key: "management.key-vim.host.VirtualNic-vmk0", + Portgroup: "Management Network", + Spec: types.HostVirtualNicSpec{ + Ip: &types.HostIpConfig{ + Dhcp: true, + IpAddress: "127.0.0.1", + SubnetMask: "255.0.0.0", + }, + Mac: "00:0c:29:81:d8:a0", + Portgroup: "Management Network", + Mtu: 1500, + TsoEnabled: types.NewBool(true), + NetStackInstanceKey: "defaultTcpipStack", + SystemOwned: types.NewBool(false), + }, + }, + }, + SelectedVnic: []string{"management.key-vim.host.VirtualNic-vmk0"}, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/performance_manager.go b/vendor/github.com/vmware/govmomi/simulator/esx/performance_manager.go new file mode 100644 index 0000000000..f749514d8a --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/performance_manager.go @@ -0,0 +1,15072 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// HistoricalInterval is the default template for the PerformanceManager historicalInterval property. +// Capture method: +// +// govc object.collect -s -dump PerformanceManager:ha-perfmgr historicalInterval +var HistoricalInterval = []types.PerfInterval{ + { + Enabled: true, + Key: 1, + Length: 129600, + Name: "PastDay", + SamplingPeriod: 300, + }, +} + +// PerfCounter is the default template for the PerformanceManager perfCounter property. +// Capture method: +// +// govc object.collect -s -dump PerformanceManager:ha-perfmgr perfCounter +var PerfCounter = []types.PerfCounterInfo{ + { + Key: 0, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{1, 2, 3}, + }, + { + Key: 1, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 2, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 3, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 4, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{5, 6, 7}, + }, + { + Key: 5, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 6, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 7, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 8, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reserved capacity", + Summary: "Total CPU capacity reserved by virtual machines", + }, + Key: "reservedCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 9, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "Amount of time spent on system processes on each virtual CPU in the virtual machine", + }, + Key: "system", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 10, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Wait", + Summary: "Total CPU time spent in wait state", + }, + Key: "wait", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 11, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ready", + Summary: "Time that the virtual machine was ready, but could not get scheduled to run on the physical CPU during last measurement interval", + }, + Key: "ready", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 12, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Used", + Summary: "Total CPU usage", + }, + Key: "used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 13, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Idle", + Summary: "Total time that the CPU spent in an idle state", + }, + Key: "idle", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 14, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap wait", + Summary: "CPU time spent waiting for swap-in", + }, + Key: "swapwait", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 15, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{16, 17, 18}, + }, + { + Key: 16, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 17, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 18, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 19, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{20, 21, 22}, + }, + { + Key: 20, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 21, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 22, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 23, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Total capacity", + Summary: "Total CPU capacity reserved by and available for virtual machines", + }, + Key: "totalCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 24, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Latency", + Summary: "Percent of time the virtual machine is unable to run because it is contending for access to the physical CPU(s)", + }, + Key: "latency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 25, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Entitlement", + Summary: "CPU resources devoted by the ESX scheduler", + }, + Key: "entitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 26, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Demand", + Summary: "The amount of CPU resources a virtual machine would use if there were no CPU contention or CPU limit", + }, + Key: "demand", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 27, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Co-stop", + Summary: "Time the virtual machine is ready to run, but is unable to run due to co-scheduling constraints", + }, + Key: "costop", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 28, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max limited", + Summary: "Time the virtual machine is ready to run, but is not run due to maxing out its CPU limit setting", + }, + Key: "maxlimited", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 29, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overlap", + Summary: "Time the virtual machine was interrupted to perform system services on behalf of itself or other virtual machines", + }, + Key: "overlap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 30, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Run", + Summary: "Time the virtual machine is scheduled to run", + }, + Key: "run", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 31, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Demand-to-entitlement ratio", + Summary: "CPU resource entitlement to CPU demand ratio (in percents)", + }, + Key: "demandEntitlementRatio", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 32, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Readiness", + Summary: "Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU", + }, + Key: "readiness", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65536, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65537, 65538, 65539}, + }, + { + Key: 65537, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65538, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65539, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65540, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65541, 65542, 65543}, + }, + { + Key: 65541, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65542, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65543, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65544, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65545, 65546, 65547}, + }, + { + Key: 65545, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65546, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65547, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65548, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65549, 65550, 65551}, + }, + { + Key: 65549, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65550, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65551, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65552, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65553, 65554, 65555}, + }, + { + Key: 65553, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65554, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65555, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65556, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65557, 65558, 65559}, + }, + { + Key: 65557, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65558, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65559, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65560, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65561, 65562, 65563}, + }, + { + Key: 65561, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65562, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65563, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65568, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65569, 65570, 65571}, + }, + { + Key: 65569, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65570, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65571, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65572, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65573, 65574, 65575}, + }, + { + Key: 65573, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65574, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65575, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65576, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65577, 65578, 65579}, + }, + { + Key: 65577, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65578, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65579, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65580, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Free state", + Summary: "Current memory availability state of ESXi. Possible values are high, clear, soft, hard, low. The state value determines the techniques used for memory reclamation from virtual machines", + }, + Key: "state", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65581, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65582, 65583, 65584}, + }, + { + Key: 65582, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65583, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65584, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65585, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65586, 65587, 65588}, + }, + { + Key: 65586, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65587, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65588, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65589, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation consumed", + Summary: "Memory reservation consumed by powered-on virtual machines", + }, + Key: "reservedCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65590, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65591, 65592, 65593}, + }, + { + Key: 65591, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65592, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65593, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65594, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65595, 65596, 65597}, + }, + { + Key: 65595, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65596, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65597, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65598, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65599, 65600, 65601}, + }, + { + Key: 65599, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65600, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65601, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65602, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65603, 65604, 65605}, + }, + { + Key: 65603, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65604, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65605, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65606, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65607, 65608, 65609}, + }, + { + Key: 65607, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65608, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65609, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65610, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65611, 65612, 65613}, + }, + { + Key: 65611, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65612, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65613, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65614, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65615, 65616, 65617}, + }, + { + Key: 65615, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65616, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65617, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65618, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in rate", + Summary: "Rate at which guest physical memory is swapped in from the swap space", + }, + Key: "swapinRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65619, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out rate", + Summary: "Rate at which guest physical memory is swapped out to the swap space", + }, + Key: "swapoutRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65620, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active write", + Summary: "Amount of guest physical memory that is being actively written by guest. Activeness is estimated by ESXi", + }, + Key: "activewrite", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65621, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compressed", + Summary: "Guest physical memory pages that have undergone memory compression", + }, + Key: "compressed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65622, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compression rate", + Summary: "Rate of guest physical memory page compression by ESXi", + }, + Key: "compressionRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65623, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Decompression rate", + Summary: "Rate of guest physical memory decompression", + }, + Key: "decompressionRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65624, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead reserved", + Summary: "Host physical memory reserved by ESXi, for its data structures, for running the virtual machine", + }, + Key: "overheadMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65625, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Total reservation", + Summary: "Total reservation, available and consumed, for powered-on virtual machines", + }, + Key: "totalCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65626, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compressed", + Summary: "Amount of guest physical memory pages compressed by ESXi", + }, + Key: "zipped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65627, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compression saved", + Summary: "Host physical memory, reclaimed from a virtual machine, by memory compression. This value is less than the value of 'Compressed' memory", + }, + Key: "zipSaved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65628, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Page-fault latency", + Summary: "Percentage of time the virtual machine spent waiting to swap in or decompress guest physical memory", + }, + Key: "latency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65629, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Entitlement", + Summary: "Amount of host physical memory the virtual machine deserves, as determined by ESXi", + }, + Key: "entitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65630, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reclamation threshold", + Summary: "Threshold of free host physical memory below which ESXi will begin actively reclaiming memory from virtual machines by swapping, compression and ballooning", + }, + Key: "lowfreethreshold", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65631, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65635, 65636, 65637}, + }, + { + Key: 65632, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in rate", + Summary: "Rate at which guest physical memory is swapped in from the host swap cache", + }, + Key: "llSwapInRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65633, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out rate", + Summary: "Rate at which guest physical memory is swapped out to the host swap cache", + }, + Key: "llSwapOutRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65634, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead active", + Summary: "Estimate of the host physical memory, from Overhead consumed, that is actively read or written to by ESXi", + }, + Key: "overheadTouched", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65635, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65636, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65637, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65638, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65639, 65640, 65641}, + }, + { + Key: 65639, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65640, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65641, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65642, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{65643, 65644, 65645}, + }, + { + Key: 65643, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65644, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65645, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65646, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS PB Cache Size", + Summary: "Space used for holding VMFS Pointer Blocks in memory", + }, + Key: "vmfs.pbc.size", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65647, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Maximum VMFS PB Cache Size", + Summary: "Maximum size the VMFS Pointer Block Cache can grow to", + }, + Key: "vmfs.pbc.sizeMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65648, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS Working Set", + Summary: "Amount of file blocks whose addresses are cached in the VMFS PB Cache", + }, + Key: "vmfs.pbc.workingSet", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "TB", + Summary: "Terabyte", + }, + Key: "teraBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65649, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Maximum VMFS Working Set", + Summary: "Maximum amount of file blocks whose addresses are cached in the VMFS PB Cache", + }, + Key: "vmfs.pbc.workingSetMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "TB", + Summary: "Terabyte", + }, + Key: "teraBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65650, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS PB Cache Overhead", + Summary: "Amount of VMFS heap used by the VMFS PB Cache", + }, + Key: "vmfs.pbc.overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 65651, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS PB Cache Capacity Miss Ratio", + Summary: "Trailing average of the ratio of capacity misses to compulsory misses for the VMFS PB Cache", + }, + Key: "vmfs.pbc.capMissRatio", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131072, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{131073, 131074, 131075}, + }, + { + Key: 131073, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131074, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131075, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131076, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read requests", + Summary: "Number of disk reads during the collection interval", + }, + Key: "numberRead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131077, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write requests", + Summary: "Number of disk writes during the collection interval", + }, + Key: "numberWrite", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131078, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Average number of kilobytes read from the disk each second during the collection interval", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131079, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Average number of kilobytes written to disk each second during the collection interval", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131080, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Commands issued", + Summary: "Number of SCSI commands issued during the collection interval", + }, + Key: "commands", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131081, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Commands aborted", + Summary: "Number of SCSI commands aborted during the collection interval", + }, + Key: "commandsAborted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131082, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Bus resets", + Summary: "Number of SCSI-bus reset commands issued during the collection interval", + }, + Key: "busResets", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131083, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical device read latency", + Summary: "Average amount of time, in milliseconds, to read from the physical device", + }, + Key: "deviceReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131084, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Kernel read latency", + Summary: "Average amount of time, in milliseconds, spent by VMkernel to process each SCSI read command", + }, + Key: "kernelReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131085, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "Average amount of time taken during the collection interval to process a SCSI read command issued from the guest OS to the virtual machine", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131086, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Queue read latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI read command, during the collection interval", + }, + Key: "queueReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131087, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical device write latency", + Summary: "Average amount of time, in milliseconds, to write to the physical device", + }, + Key: "deviceWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131088, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Kernel write latency", + Summary: "Average amount of time, in milliseconds, spent by VMkernel to process each SCSI write command", + }, + Key: "kernelWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131089, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "Average amount of time taken during the collection interval to process a SCSI write command issued by the guest OS to the virtual machine", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131090, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Queue write latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI write command, during the collection interval", + }, + Key: "queueWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131091, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical device command latency", + Summary: "Average amount of time, in milliseconds, to complete a SCSI command from the physical device", + }, + Key: "deviceLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131092, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Kernel command latency", + Summary: "Average amount of time, in milliseconds, spent by VMkernel to process each SCSI command", + }, + Key: "kernelLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131093, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Command latency", + Summary: "Average amount of time taken during the collection interval to process a SCSI command issued by the guest OS to the virtual machine", + }, + Key: "totalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131094, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Queue command latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI command, during the collection interval", + }, + Key: "queueLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131095, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all disks used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131096, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Maximum queue depth", + Summary: "Maximum queue depth", + }, + Key: "maxQueueDepth", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131097, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of disk reads per second during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131098, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of disk writes per second during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 131099, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average commands issued per second", + Summary: "Average number of SCSI commands issued per second during the collection interval", + }, + Key: "commandsAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196608, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{196609, 196610, 196611}, + }, + { + Key: 196609, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196610, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196611, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196612, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packets received", + Summary: "Number of packets received during the interval", + }, + Key: "packetsRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196613, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packets transmitted", + Summary: "Number of packets transmitted during the interval", + }, + Key: "packetsTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196614, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data receive rate", + Summary: "Average rate at which data was received during the interval", + }, + Key: "received", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196615, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data transmit rate", + Summary: "Average rate at which data was transmitted during the interval", + }, + Key: "transmitted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196616, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Receive packets dropped", + Summary: "Number of receives dropped", + }, + Key: "droppedRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196617, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Transmit packets dropped", + Summary: "Number of transmits dropped", + }, + Key: "droppedTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196618, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data receive rate", + Summary: "Average amount of data received per second", + }, + Key: "bytesRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196619, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data transmit rate", + Summary: "Average amount of data transmitted per second", + }, + Key: "bytesTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196620, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Broadcast receives", + Summary: "Number of broadcast packets received during the sampling interval", + }, + Key: "broadcastRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196621, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Broadcast transmits", + Summary: "Number of broadcast packets transmitted during the sampling interval", + }, + Key: "broadcastTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196622, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Multicast receives", + Summary: "Number of multicast packets received during the sampling interval", + }, + Key: "multicastRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196623, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Multicast transmits", + Summary: "Number of multicast packets transmitted during the sampling interval", + }, + Key: "multicastTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196624, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packet receive errors", + Summary: "Number of packets with errors received during the sampling interval", + }, + Key: "errorsRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196625, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packet transmit errors", + Summary: "Number of packets with errors transmitted during the sampling interval", + }, + Key: "errorsTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196626, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Unknown protocol frames", + Summary: "Number of frames with unknown protocol received during the sampling interval", + }, + Key: "unknownProtos", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196627, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pnicBytesRx", + Summary: "pnicBytesRx", + }, + Key: "pnicBytesRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 196628, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pnicBytesTx", + Summary: "pnicBytesTx", + }, + Key: "pnicBytesTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262144, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Uptime", + Summary: "Total time elapsed, in seconds, since last system startup", + }, + Key: "uptime", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "s", + Summary: "Second", + }, + Key: "second", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262145, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heartbeat", + Summary: "Number of heartbeats issued per virtual machine during the interval", + }, + Key: "heartbeat", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262146, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk usage", + Summary: "Amount of disk space usage for each mount point", + }, + Key: "diskUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262147, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (None)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "none", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{262148, 262149, 262150}, + }, + { + Key: 262148, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (Average)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262149, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (Maximum)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262150, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (Minimum)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262151, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory touched", + Summary: "Memory touched by the system resource group", + }, + Key: "resourceMemTouched", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262152, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory mapped", + Summary: "Memory mapped by the system resource group", + }, + Key: "resourceMemMapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262153, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory share saved", + Summary: "Memory saved due to sharing by the system resource group", + }, + Key: "resourceMemShared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262154, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory swapped", + Summary: "Memory swapped out by the system resource group", + }, + Key: "resourceMemSwapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262155, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory overhead", + Summary: "Overhead memory consumed by the system resource group", + }, + Key: "resourceMemOverhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262156, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory shared", + Summary: "Memory shared by the system resource group", + }, + Key: "resourceMemCow", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262157, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory zero", + Summary: "Zero filled memory used by the system resource group", + }, + Key: "resourceMemZero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262158, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU running (1 min. average)", + Summary: "CPU running average over 1 minute of the system resource group", + }, + Key: "resourceCpuRun1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262159, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU active (1 min average)", + Summary: "CPU active average over 1 minute of the system resource group", + }, + Key: "resourceCpuAct1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262160, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU maximum limited (1 min)", + Summary: "CPU maximum limited over 1 minute of the system resource group", + }, + Key: "resourceCpuMaxLimited1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262161, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU running (5 min average)", + Summary: "CPU running average over 5 minutes of the system resource group", + }, + Key: "resourceCpuRun5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262162, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU active (5 min average)", + Summary: "CPU active average over 5 minutes of the system resource group", + }, + Key: "resourceCpuAct5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262163, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU maximum limited (5 min)", + Summary: "CPU maximum limited over 5 minutes of the system resource group", + }, + Key: "resourceCpuMaxLimited5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262164, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU allocation minimum (in MHz)", + Summary: "CPU allocation reservation (in MHz) of the system resource group", + }, + Key: "resourceCpuAllocMin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262165, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU allocation maximum (in MHz)", + Summary: "CPU allocation limit (in MHz) of the system resource group", + }, + Key: "resourceCpuAllocMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262166, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU allocation shares", + Summary: "CPU allocation shares of the system resource group", + }, + Key: "resourceCpuAllocShares", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262167, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory allocation minimum (in KB)", + Summary: "Memory allocation reservation (in KB) of the system resource group", + }, + Key: "resourceMemAllocMin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262168, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory allocation maximum (in KB)", + Summary: "Memory allocation limit (in KB) of the system resource group", + }, + Key: "resourceMemAllocMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262169, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory allocation shares", + Summary: "Memory allocation shares of the system resource group", + }, + Key: "resourceMemAllocShares", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262170, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "OS Uptime", + Summary: "Total time elapsed, in seconds, since last operating system boot-up", + }, + Key: "osUptime", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "s", + Summary: "Second", + }, + Key: "second", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262171, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory consumed", + Summary: "Memory consumed by the system resource group", + }, + Key: "resourceMemConsumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 262172, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "File descriptors used", + Summary: "Number of file descriptors used by the system resource group", + }, + Key: "resourceFdUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327680, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (1 min average)", + Summary: "CPU active average over 1 minute", + }, + Key: "actav1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327681, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (1 min peak)", + Summary: "CPU active peak over 1 minute", + }, + Key: "actpk1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327682, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (1 min average)", + Summary: "CPU running average over 1 minute", + }, + Key: "runav1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327683, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (5 min average)", + Summary: "CPU active average over 5 minutes", + }, + Key: "actav5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327684, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (5 min peak)", + Summary: "CPU active peak over 5 minutes", + }, + Key: "actpk5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327685, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (5 min average)", + Summary: "CPU running average over 5 minutes", + }, + Key: "runav5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327686, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (15 min average)", + Summary: "CPU active average over 15 minutes", + }, + Key: "actav15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327687, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (15 min peak)", + Summary: "CPU active peak over 15 minutes", + }, + Key: "actpk15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327688, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (15 min average)", + Summary: "CPU running average over 15 minutes", + }, + Key: "runav15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327689, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (1 min peak)", + Summary: "CPU running peak over 1 minute", + }, + Key: "runpk1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327690, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Throttled (1 min average)", + Summary: "Amount of CPU resources over the limit that were refused, average over 1 minute", + }, + Key: "maxLimited1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327691, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (5 min peak)", + Summary: "CPU running peak over 5 minutes", + }, + Key: "runpk5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327692, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Throttled (5 min average)", + Summary: "Amount of CPU resources over the limit that were refused, average over 5 minutes", + }, + Key: "maxLimited5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327693, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (15 min peak)", + Summary: "CPU running peak over 15 minutes", + }, + Key: "runpk15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327694, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Throttled (15 min average)", + Summary: "Amount of CPU resources over the limit that were refused, average over 15 minutes", + }, + Key: "maxLimited15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327695, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Group CPU sample count", + Summary: "Group CPU sample count", + }, + Key: "sampleCount", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 327696, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Group CPU sample period", + Summary: "Group CPU sample period", + }, + Key: "samplePeriod", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 393216, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "Amount of total configured memory that is available for use", + }, + Key: "memUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 393217, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory swap used", + Summary: "Sum of the memory swapped by all powered-on virtual machines on the host", + }, + Key: "swapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 393218, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory swap in", + Summary: "Amount of memory that is swapped in for the Service Console", + }, + Key: "swapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 393219, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory swap out", + Summary: "Amount of memory that is swapped out for the Service Console", + }, + Key: "swapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 393220, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU usage", + Summary: "Amount of Service Console CPU usage", + }, + Key: "cpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458752, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average commands issued per second", + Summary: "Average number of commands issued per second by the storage adapter during the collection interval", + }, + Key: "commandsAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458753, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second by the storage adapter during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458754, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second by the storage adapter during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458755, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data by the storage adapter", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458756, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data by the storage adapter", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458757, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read by the storage adapter takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458758, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write by the storage adapter takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 458759, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all storage adapters used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524288, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average commands issued per second", + Summary: "Average number of commands issued per second on the storage path during the collection interval", + }, + Key: "commandsAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524289, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second on the storage path during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524290, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second on the storage path during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524291, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data on the storage path", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524292, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data on the storage path", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524293, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read issued on the storage path takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524294, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write issued on the storage path takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 524295, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all storage paths used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589824, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second to the virtual disk during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589825, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second to the virtual disk during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589826, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data from the virtual disk", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589827, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data to the virtual disk", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589828, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read from the virtual disk takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589829, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write to the virtual disk takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589830, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average number of outstanding read requests", + Summary: "Average number of outstanding read requests to the virtual disk during the collection interval", + }, + Key: "readOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589831, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average number of outstanding write requests", + Summary: "Average number of outstanding write requests to the virtual disk during the collection interval", + }, + Key: "writeOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589832, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read workload metric", + Summary: "Storage DRS virtual disk metric for the read workload model", + }, + Key: "readLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589833, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write workload metric", + Summary: "Storage DRS virtual disk metric for the write workload model", + }, + Key: "writeLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589834, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read request size", + Summary: "Average read request size in bytes", + }, + Key: "readIOSize", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589835, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write request size", + Summary: "Average write request size in bytes", + }, + Key: "writeIOSize", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589836, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of small seeks", + Summary: "Number of seeks during the interval that were less than 64 LBNs apart", + }, + Key: "smallSeeks", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589837, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of medium seeks", + Summary: "Number of seeks during the interval that were between 64 and 8192 LBNs apart", + }, + Key: "mediumSeeks", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589838, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of large seeks", + Summary: "Number of seeks during the interval that were greater than 8192 LBNs apart", + }, + Key: "largeSeeks", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589839, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read Latency (us)", + Summary: "Read latency in microseconds", + }, + Key: "readLatencyUS", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589840, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write Latency (us)", + Summary: "Write latency in microseconds", + }, + Key: "writeLatencyUS", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589841, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Flash Read Cache I/Os per second for the virtual disk", + Summary: "The average virtual Flash Read Cache I/Os per second value for the virtual disk", + }, + Key: "vFlashCacheIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589842, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Flash Read Cache latency for the virtual disk", + Summary: "The average virtual Flash Read Cache latency value for the virtual disk", + }, + Key: "vFlashCacheLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 589843, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Flash Read Cache throughput for virtual disk", + Summary: "The average virtual Flash Read Cache throughput value for the virtual disk", + }, + Key: "vFlashCacheThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655360, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second to the datastore during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655361, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second to the datastore during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655362, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data from the datastore", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655363, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data to the datastore", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655364, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read from the datastore takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655365, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write to the datastore takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655366, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control normalized latency", + Summary: "Storage I/O Control size-normalized I/O latency", + }, + Key: "sizeNormalizedDatastoreLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655367, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control aggregated IOPS", + Summary: "Storage I/O Control aggregated IOPS", + }, + Key: "datastoreIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655368, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore bytes read", + Summary: "Storage DRS datastore bytes read", + }, + Key: "datastoreReadBytes", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655369, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore bytes written", + Summary: "Storage DRS datastore bytes written", + }, + Key: "datastoreWriteBytes", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655370, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore read I/O rate", + Summary: "Storage DRS datastore read I/O rate", + }, + Key: "datastoreReadIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655371, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore write I/O rate", + Summary: "Storage DRS datastore write I/O rate", + }, + Key: "datastoreWriteIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655372, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore normalized read latency", + Summary: "Storage DRS datastore normalized read latency", + }, + Key: "datastoreNormalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655373, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore normalized write latency", + Summary: "Storage DRS datastore normalized write latency", + }, + Key: "datastoreNormalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655374, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore outstanding read requests", + Summary: "Storage DRS datastore outstanding read requests", + }, + Key: "datastoreReadOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655375, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore outstanding write requests", + Summary: "Storage DRS datastore outstanding write requests", + }, + Key: "datastoreWriteOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655376, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control datastore maximum queue depth", + Summary: "Storage I/O Control datastore maximum queue depth", + }, + Key: "datastoreMaxQueueDepth", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655377, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore read workload metric", + Summary: "Storage DRS datastore metric for read workload model", + }, + Key: "datastoreReadLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655378, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore write workload metric", + Summary: "Storage DRS datastore metric for write workload model", + }, + Key: "datastoreWriteLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655379, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all datastores used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655380, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control active time percentage", + Summary: "Percentage of time Storage I/O Control actively controlled datastore latency", + }, + Key: "siocActiveTimePercentage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 655381, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore latency observed by VMs", + Summary: "The average datastore latency as seen by virtual machines", + }, + Key: "datastoreVMObservedLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 720896, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Current power usage", + }, + Key: "power", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "W", + Summary: "Watt", + }, + Key: "watt", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 720897, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cap", + Summary: "Maximum allowed power usage", + }, + Key: "powerCap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "W", + Summary: "Watt", + }, + Key: "watt", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 720898, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Energy usage", + Summary: "Total energy used since last stats reset", + }, + Key: "energy", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "J", + Summary: "Joule", + }, + Key: "joule", + }, + RollupType: "summation", + StatsType: "delta", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 786432, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication VM Count", + Summary: "Current number of replicated virtual machines", + }, + Key: "hbrNumVms", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication", + Summary: "vSphere Replication", + }, + Key: "hbr", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 786433, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Replication Data Receive Rate", + Summary: "Average amount of data received per second", + }, + Key: "hbrNetRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication", + Summary: "vSphere Replication", + }, + Key: "hbr", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 786434, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Replication Data Transmit Rate", + Summary: "Average amount of data transmitted per second", + }, + Key: "hbrNetTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication", + Summary: "vSphere Replication", + }, + Key: "hbr", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 851968, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of caches controlled by the virtual flash module", + Summary: "Number of caches controlled by the virtual flash module", + }, + Key: "numActiveVMDKs", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual flash", + Summary: "Virtual flash module related statistical values", + }, + Key: "vflashModule", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245184, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read IOPS", + Summary: "Read IOPS", + }, + Key: "readIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245185, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read throughput", + Summary: "Read throughput in kBps", + }, + Key: "readThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245186, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read latency", + Summary: "Average read latency in ms", + }, + Key: "readAvgLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245187, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max read latency", + Summary: "Max read latency in ms", + }, + Key: "readMaxLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245188, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cache hit rate", + Summary: "Cache hit rate percentage", + }, + Key: "readCacheHitRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245189, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read congestion per sampling interval", + Summary: "Read congestion", + }, + Key: "readCongestion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245190, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write IOPS", + Summary: "Write IOPS", + }, + Key: "writeIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245191, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write throughput", + Summary: "Write throughput in kBps", + }, + Key: "writeThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245192, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write latency", + Summary: "Average write latency in ms", + }, + Key: "writeAvgLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245193, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max write latency", + Summary: "Max write latency in ms", + }, + Key: "writeMaxLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245194, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write congestion per sampling interval", + Summary: "Write congestion", + }, + Key: "writeCongestion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245195, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Recovery write IOPS", + Summary: "Recovery write IOPS", + }, + Key: "recoveryWriteIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245196, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Recovery write through-put", + Summary: "Recovery write through-put in kBps", + }, + Key: "recoveryWriteThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245197, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average recovery write latency", + Summary: "Average recovery write latency in ms", + }, + Key: "recoveryWriteAvgLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245198, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max recovery write latency", + Summary: "Max recovery write latency in ms", + }, + Key: "recoveryWriteMaxLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1245199, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Recovery write congestion per sampling interval", + Summary: "Recovery write congestion", + }, + Key: "recoveryWriteCongestion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310720, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{1310721, 1310722, 1310723}, + }, + { + Key: 1310721, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310722, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310723, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310724, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{1310725, 1310726, 1310727}, + }, + { + Key: 1310725, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310726, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310727, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310728, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: []int32{1310729, 1310730, 1310731}, + }, + { + Key: 1310729, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310730, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310731, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1310732, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Temperature", + Summary: "The temperature of a GPU in degrees celsius", + }, + Key: "temperature", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "℃", + Summary: "Temperature in degrees Celsius", + }, + Key: "celsius", + }, + RollupType: "average", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, + { + Key: 1376256, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Persistent memory available reservation", + Summary: "Persistent memory available reservation on a host.", + }, + Key: "available.reservation", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "PMEM", + Summary: "PMEM", + }, + Key: "pmem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 0, + PerDeviceLevel: 0, + AssociatedCounterId: nil, + }, +} + +// *********************************** VM Metrics ************************************ +var VmMetrics = []types.PerfMetricId{ + { + CounterId: 11, + Instance: "$cpu", + }, + { + CounterId: 1, + Instance: "", + }, + { + CounterId: 12, + Instance: "", + }, + { + CounterId: 9, + Instance: "", + }, + { + CounterId: 29, + Instance: "", + }, + { + CounterId: 30, + Instance: "$cpu", + }, + { + CounterId: 24, + Instance: "", + }, + { + CounterId: 13, + Instance: "", + }, + { + CounterId: 10, + Instance: "$cpu", + }, + { + CounterId: 14, + Instance: "$cpu", + }, + { + CounterId: 27, + Instance: "$cpu", + }, + { + CounterId: 25, + Instance: "", + }, + { + CounterId: 5, + Instance: "$cpu", + }, + { + CounterId: 32, + Instance: "$cpu", + }, + { + CounterId: 14, + Instance: "", + }, + { + CounterId: 12, + Instance: "$cpu", + }, + { + CounterId: 10, + Instance: "", + }, + { + CounterId: 28, + Instance: "$cpu", + }, + { + CounterId: 5, + Instance: "", + }, + { + CounterId: 27, + Instance: "", + }, + { + CounterId: 31, + Instance: "", + }, + { + CounterId: 32, + Instance: "", + }, + { + CounterId: 26, + Instance: "", + }, + { + CounterId: 13, + Instance: "$cpu", + }, + { + CounterId: 28, + Instance: "", + }, + { + CounterId: 30, + Instance: "", + }, + { + CounterId: 11, + Instance: "", + }, + { + CounterId: 655379, + Instance: "", + }, + + { + CounterId: 655362, + Instance: "$physDisk", + }, + { + CounterId: 655363, + Instance: "$physDisk", + }, + { + CounterId: 655360, + Instance: "$physDisk", + }, + { + CounterId: 655364, + Instance: "$physDisk", + }, + { + CounterId: 655361, + Instance: "$physDisk", + }, + { + CounterId: 655365, + Instance: "$physDisk", + }, + + { + CounterId: 131095, + Instance: "", + }, + { + CounterId: 65549, + Instance: "", + }, + { + CounterId: 65595, + Instance: "", + }, + { + CounterId: 65632, + Instance: "", + }, + { + CounterId: 65591, + Instance: "", + }, + { + CounterId: 65623, + Instance: "", + }, + { + CounterId: 65628, + Instance: "", + }, + { + CounterId: 65621, + Instance: "", + }, + { + CounterId: 65618, + Instance: "", + }, + { + CounterId: 65634, + Instance: "", + }, + { + CounterId: 65624, + Instance: "", + }, + { + CounterId: 65586, + Instance: "", + }, + { + CounterId: 65545, + Instance: "", + }, + { + CounterId: 65633, + Instance: "", + }, + { + CounterId: 65607, + Instance: "", + }, + { + CounterId: 65541, + Instance: "", + }, + { + CounterId: 65626, + Instance: "", + }, + { + CounterId: 65620, + Instance: "", + }, + { + CounterId: 65611, + Instance: "", + }, + { + CounterId: 65629, + Instance: "", + }, + { + CounterId: 65622, + Instance: "", + }, + { + CounterId: 65619, + Instance: "", + }, + { + CounterId: 65553, + Instance: "", + }, + { + CounterId: 65627, + Instance: "", + }, + { + CounterId: 65635, + Instance: "", + }, + { + CounterId: 65599, + Instance: "", + }, + { + CounterId: 65582, + Instance: "", + }, + { + CounterId: 65537, + Instance: "", + }, + { + CounterId: 65603, + Instance: "", + }, + { + CounterId: 196622, + Instance: "4000", + }, + { + CounterId: 196612, + Instance: "", + }, + { + CounterId: 196617, + Instance: "", + }, + { + CounterId: 196613, + Instance: "", + }, + { + CounterId: 196619, + Instance: "4000", + }, + { + CounterId: 196618, + Instance: "4000", + }, + { + CounterId: 196617, + Instance: "4000", + }, + { + CounterId: 196621, + Instance: "4000", + }, + { + CounterId: 196616, + Instance: "4000", + }, + { + CounterId: 196615, + Instance: "4000", + }, + { + CounterId: 196614, + Instance: "4000", + }, + { + CounterId: 196618, + Instance: "", + }, + { + CounterId: 196609, + Instance: "4000", + }, + { + CounterId: 196619, + Instance: "", + }, + { + CounterId: 196622, + Instance: "", + }, + { + CounterId: 196628, + Instance: "4000", + }, + { + CounterId: 196609, + Instance: "", + }, + { + CounterId: 196612, + Instance: "4000", + }, + { + CounterId: 196628, + Instance: "", + }, + { + CounterId: 196627, + Instance: "", + }, + { + CounterId: 196616, + Instance: "", + }, + { + CounterId: 196613, + Instance: "4000", + }, + { + CounterId: 196627, + Instance: "4000", + }, + { + CounterId: 196614, + Instance: "", + }, + { + CounterId: 196621, + Instance: "", + }, + { + CounterId: 196620, + Instance: "4000", + }, + { + CounterId: 196620, + Instance: "", + }, + { + CounterId: 196623, + Instance: "", + }, + { + CounterId: 196615, + Instance: "", + }, + { + CounterId: 196623, + Instance: "4000", + }, + { + CounterId: 720898, + Instance: "", + }, + { + CounterId: 720896, + Instance: "", + }, + { + CounterId: 327684, + Instance: "", + }, + { + CounterId: 327687, + Instance: "", + }, + { + CounterId: 327693, + Instance: "", + }, + { + CounterId: 327680, + Instance: "", + }, + { + CounterId: 327685, + Instance: "", + }, + { + CounterId: 327694, + Instance: "", + }, + { + CounterId: 327686, + Instance: "", + }, + { + CounterId: 327692, + Instance: "", + }, + { + CounterId: 327688, + Instance: "", + }, + { + CounterId: 327695, + Instance: "", + }, + { + CounterId: 327689, + Instance: "", + }, + { + CounterId: 327681, + Instance: "", + }, + { + CounterId: 327696, + Instance: "", + }, + { + CounterId: 327683, + Instance: "", + }, + { + CounterId: 327691, + Instance: "", + }, + { + CounterId: 327690, + Instance: "", + }, + { + CounterId: 327682, + Instance: "", + }, + { + CounterId: 262144, + Instance: "", + }, + { + CounterId: 262145, + Instance: "", + }, + { + CounterId: 262170, + Instance: "", + }, + { + CounterId: 589827, + Instance: "", + }, + { + CounterId: 589826, + Instance: "", + }, +} + +// **************************** Host metrics ********************************* + +var HostMetrics = []types.PerfMetricId{ + { + CounterId: 23, + Instance: "", + }, + { + CounterId: 14, + Instance: "", + }, + { + CounterId: 1, + Instance: "", + }, + { + CounterId: 11, + Instance: "", + }, + { + CounterId: 20, + Instance: "$cpu", + }, + { + CounterId: 13, + Instance: "", + }, + { + CounterId: 5, + Instance: "", + }, + { + CounterId: 32, + Instance: "", + }, + { + CounterId: 26, + Instance: "", + }, + { + CounterId: 24, + Instance: "", + }, + { + CounterId: 16, + Instance: "$cpu", + }, + { + CounterId: 27, + Instance: "", + }, + { + CounterId: 16, + Instance: "", + }, + + { + CounterId: 10, + Instance: "", + }, + { + CounterId: 12, + Instance: "", + }, + { + CounterId: 1, + Instance: "$cpu", + }, + { + CounterId: 12, + Instance: "$cpu", + }, + { + CounterId: 13, + Instance: "$cpu", + }, + { + CounterId: 8, + Instance: "", + }, + { + CounterId: 655380, + Instance: "$physDisk", + }, + { + CounterId: 655370, + Instance: "$physDisk", + }, + { + CounterId: 655377, + Instance: "$physDisk", + }, + { + CounterId: 655379, + Instance: "", + }, + { + CounterId: 655375, + Instance: "$physDisk", + }, + { + CounterId: 655378, + Instance: "$physDisk", + }, + { + CounterId: 655372, + Instance: "$physDisk", + }, + { + CounterId: 655369, + Instance: "$physDisk", + }, + { + CounterId: 655373, + Instance: "$physDisk", + }, + { + CounterId: 655362, + Instance: "$physDisk", + }, + { + CounterId: 655374, + Instance: "$physDisk", + }, + { + CounterId: 655368, + Instance: "$physDisk", + }, + { + CounterId: 655365, + Instance: "$physDisk", + }, + { + CounterId: 655366, + Instance: "$physDisk", + }, + { + CounterId: 655367, + Instance: "$physDisk", + }, + { + CounterId: 655371, + Instance: "$physDisk", + }, + { + CounterId: 655361, + Instance: "$physDisk", + }, + { + CounterId: 655376, + Instance: "$physDisk", + }, + { + CounterId: 655363, + Instance: "$physDisk", + }, + { + CounterId: 655360, + Instance: "$physDisk", + }, + { + CounterId: 655381, + Instance: "$physDisk", + }, + { + CounterId: 131073, + Instance: "", + }, + { + CounterId: 131090, + Instance: "$physDisk", + }, + { + CounterId: 131079, + Instance: "", + }, + { + CounterId: 131086, + Instance: "$physDisk", + }, + { + CounterId: 131098, + Instance: "$physDisk", + }, + { + CounterId: 131081, + Instance: "$physDisk", + }, + { + CounterId: 131082, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131090, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131081, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131086, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131088, + Instance: "$physDisk", + }, + { + CounterId: 131098, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131078, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131079, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131099, + Instance: "$physDisk", + }, + { + CounterId: 131087, + Instance: "$physDisk", + }, + { + CounterId: 131089, + Instance: "$physDisk", + }, + { + CounterId: 131078, + Instance: "$physDisk", + }, + { + CounterId: 131096, + Instance: "$physDisk", + }, + { + CounterId: 131091, + Instance: "$physDisk", + }, + { + CounterId: 131080, + Instance: "$physDisk", + }, + { + CounterId: 131078, + Instance: "", + }, + { + CounterId: 131076, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131092, + Instance: "$physDisk", + }, + { + CounterId: 131080, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131095, + Instance: "", + }, + { + CounterId: 131097, + Instance: "$physDisk", + }, + { + CounterId: 131093, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131092, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131084, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131099, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131079, + Instance: "$physDisk", + }, + { + CounterId: 131085, + Instance: "$physDisk", + }, + { + CounterId: 131083, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131076, + Instance: "$physDisk", + }, + { + CounterId: 131096, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131094, + Instance: "$physDisk", + }, + { + CounterId: 131088, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131089, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131077, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131077, + Instance: "$physDisk", + }, + { + CounterId: 131093, + Instance: "$physDisk", + }, + { + CounterId: 131087, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131085, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131091, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131097, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131082, + Instance: "$physDisk", + }, + { + CounterId: 131094, + Instance: "mpx.vmhba32:C0:T0:L0", + }, + { + CounterId: 131084, + Instance: "$physDisk", + }, + { + CounterId: 131083, + Instance: "$physDisk", + }, + { + CounterId: 786433, + Instance: "", + }, + { + CounterId: 786434, + Instance: "", + }, + { + CounterId: 786432, + Instance: "", + }, + { + CounterId: 65573, + Instance: "", + }, + { + CounterId: 65618, + Instance: "", + }, + { + CounterId: 65632, + Instance: "", + }, + { + CounterId: 65623, + Instance: "", + }, + { + CounterId: 65582, + Instance: "", + }, + { + CounterId: 65611, + Instance: "", + }, + { + CounterId: 65541, + Instance: "", + }, + { + CounterId: 65586, + Instance: "", + }, + { + CounterId: 65621, + Instance: "", + }, + { + CounterId: 65561, + Instance: "", + }, + { + CounterId: 65569, + Instance: "", + }, + { + CounterId: 65580, + Instance: "", + }, + { + CounterId: 65553, + Instance: "", + }, + { + CounterId: 65646, + Instance: "", + }, + { + CounterId: 65603, + Instance: "", + }, + { + CounterId: 65647, + Instance: "", + }, + { + CounterId: 65628, + Instance: "", + }, + { + CounterId: 65557, + Instance: "", + }, + { + CounterId: 65635, + Instance: "", + }, + { + CounterId: 65589, + Instance: "", + }, + { + CounterId: 65643, + Instance: "", + }, + { + CounterId: 65545, + Instance: "", + }, + { + CounterId: 65537, + Instance: "", + }, + { + CounterId: 65622, + Instance: "", + }, + { + CounterId: 65639, + Instance: "", + }, + { + CounterId: 65599, + Instance: "", + }, + { + CounterId: 65633, + Instance: "", + }, + { + CounterId: 65650, + Instance: "", + }, + { + CounterId: 65649, + Instance: "", + }, + { + CounterId: 65615, + Instance: "", + }, + { + CounterId: 65577, + Instance: "", + }, + { + CounterId: 65648, + Instance: "", + }, + { + CounterId: 65619, + Instance: "", + }, + { + CounterId: 65630, + Instance: "", + }, + { + CounterId: 65651, + Instance: "", + }, + { + CounterId: 65620, + Instance: "", + }, + { + CounterId: 65625, + Instance: "", + }, + { + CounterId: 65549, + Instance: "", + }, + { + CounterId: 196616, + Instance: "vmnic0", + }, + { + CounterId: 196612, + Instance: "vmnic0", + }, + { + CounterId: 196621, + Instance: "", + }, + { + CounterId: 196618, + Instance: "vmnic0", + }, + { + CounterId: 196609, + Instance: "vmnic1", + }, + { + CounterId: 196622, + Instance: "", + }, + { + CounterId: 196623, + Instance: "vmnic0", + }, + { + CounterId: 196626, + Instance: "", + }, + { + CounterId: 196614, + Instance: "", + }, + { + CounterId: 196616, + Instance: "vmnic1", + }, + { + CounterId: 196615, + Instance: "vmnic0", + }, + { + CounterId: 196621, + Instance: "vmnic1", + }, + { + CounterId: 196622, + Instance: "vmnic0", + }, + { + CounterId: 196614, + Instance: "vmnic0", + }, + { + CounterId: 196620, + Instance: "", + }, + { + CounterId: 196622, + Instance: "vmnic1", + }, + { + CounterId: 196617, + Instance: "", + }, + { + CounterId: 196616, + Instance: "", + }, + { + CounterId: 196613, + Instance: "vmnic0", + }, + { + CounterId: 196614, + Instance: "vmnic1", + }, + { + CounterId: 196625, + Instance: "", + }, + { + CounterId: 196609, + Instance: "vmnic0", + }, + { + CounterId: 196624, + Instance: "", + }, + { + CounterId: 196619, + Instance: "vmnic1", + }, + { + CounterId: 196625, + Instance: "vmnic0", + }, + { + CounterId: 196617, + Instance: "vmnic1", + }, + { + CounterId: 196619, + Instance: "", + }, + { + CounterId: 196618, + Instance: "vmnic1", + }, + { + CounterId: 196626, + Instance: "vmnic0", + }, + { + CounterId: 196612, + Instance: "vmnic1", + }, + { + CounterId: 196613, + Instance: "", + }, + { + CounterId: 196621, + Instance: "vmnic0", + }, + { + CounterId: 196615, + Instance: "", + }, + { + CounterId: 196620, + Instance: "vmnic1", + }, + { + CounterId: 196612, + Instance: "", + }, + { + CounterId: 196624, + Instance: "vmnic1", + }, + { + CounterId: 196617, + Instance: "vmnic0", + }, + { + CounterId: 196625, + Instance: "vmnic1", + }, + { + CounterId: 196618, + Instance: "", + }, + { + CounterId: 196623, + Instance: "vmnic1", + }, + { + CounterId: 196623, + Instance: "", + }, + { + CounterId: 196609, + Instance: "", + }, + { + CounterId: 196613, + Instance: "vmnic1", + }, + { + CounterId: 196620, + Instance: "vmnic0", + }, + { + CounterId: 196619, + Instance: "vmnic0", + }, + { + CounterId: 196624, + Instance: "vmnic0", + }, + { + CounterId: 196615, + Instance: "vmnic1", + }, + { + CounterId: 196626, + Instance: "vmnic1", + }, + { + CounterId: 720898, + Instance: "", + }, + { + CounterId: 720897, + Instance: "", + }, + { + CounterId: 720896, + Instance: "", + }, + { + CounterId: 327681, + Instance: "", + }, + { + CounterId: 327694, + Instance: "", + }, + { + CounterId: 327689, + Instance: "", + }, + { + CounterId: 327696, + Instance: "", + }, + { + CounterId: 327685, + Instance: "", + }, + { + CounterId: 327680, + Instance: "", + }, + { + CounterId: 327690, + Instance: "", + }, + { + CounterId: 327693, + Instance: "", + }, + { + CounterId: 327683, + Instance: "", + }, + { + CounterId: 327688, + Instance: "", + }, + { + CounterId: 327687, + Instance: "", + }, + { + CounterId: 327684, + Instance: "", + }, + { + CounterId: 327691, + Instance: "", + }, + { + CounterId: 327682, + Instance: "", + }, + { + CounterId: 327695, + Instance: "", + }, + { + CounterId: 327686, + Instance: "", + }, + { + CounterId: 327692, + Instance: "", + }, + { + CounterId: 458755, + Instance: "vmhba64", + }, + { + CounterId: 458755, + Instance: "vmhba1", + }, + { + CounterId: 458756, + Instance: "vmhba1", + }, + { + CounterId: 458757, + Instance: "vmhba32", + }, + { + CounterId: 458753, + Instance: "vmhba1", + }, + { + CounterId: 458754, + Instance: "vmhba1", + }, + { + CounterId: 458752, + Instance: "vmhba0", + }, + { + CounterId: 458755, + Instance: "vmhba32", + }, + { + CounterId: 458757, + Instance: "vmhba64", + }, + { + CounterId: 458753, + Instance: "vmhba64", + }, + { + CounterId: 458754, + Instance: "vmhba64", + }, + { + CounterId: 458752, + Instance: "vmhba64", + }, + { + CounterId: 458759, + Instance: "", + }, + { + CounterId: 458758, + Instance: "vmhba1", + }, + { + CounterId: 458753, + Instance: "vmhba32", + }, + { + CounterId: 458758, + Instance: "vmhba0", + }, + { + CounterId: 458756, + Instance: "vmhba64", + }, + { + CounterId: 458754, + Instance: "vmhba32", + }, + { + CounterId: 458753, + Instance: "vmhba0", + }, + { + CounterId: 458757, + Instance: "vmhba0", + }, + { + CounterId: 458754, + Instance: "vmhba0", + }, + { + CounterId: 458756, + Instance: "vmhba0", + }, + { + CounterId: 458752, + Instance: "vmhba1", + }, + { + CounterId: 458752, + Instance: "vmhba32", + }, + { + CounterId: 458756, + Instance: "vmhba32", + }, + { + CounterId: 458755, + Instance: "vmhba0", + }, + { + CounterId: 458758, + Instance: "vmhba64", + }, + { + CounterId: 458757, + Instance: "vmhba1", + }, + { + CounterId: 458758, + Instance: "vmhba32", + }, + { + CounterId: 524290, + Instance: "$physDisk", + }, + { + CounterId: 524288, + Instance: "$physDisk", + }, + { + CounterId: 524291, + Instance: "$physDisk", + }, + { + CounterId: 524292, + Instance: "$physDisk", + }, + { + CounterId: 524295, + Instance: "", + }, + { + CounterId: 524289, + Instance: "$physDisk", + }, + { + CounterId: 524293, + Instance: "$physDisk", + }, + { + CounterId: 524294, + Instance: "$physDisk", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262168, + Instance: "host/system", + }, + { + CounterId: 262172, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262166, + Instance: "host/system", + }, + { + CounterId: 262157, + Instance: "host/system/svmotion", + }, + { + CounterId: 262157, + Instance: "host/system/drivers", + }, + { + CounterId: 262163, + Instance: "host/system", + }, + { + CounterId: 262156, + Instance: "host/system", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262153, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262161, + Instance: "host/system/vmotion", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262171, + Instance: "host", + }, + { + CounterId: 262156, + Instance: "host", + }, + { + CounterId: 262152, + Instance: "host", + }, + { + CounterId: 262153, + Instance: "host/vim", + }, + { + CounterId: 262151, + Instance: "host/system/drivers", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262172, + Instance: "host/system/kernel", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262153, + Instance: "host/system/ft", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262148, + Instance: "host/system/kernel", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262156, + Instance: "host/system/kernel", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262165, + Instance: "host/system/vmotion", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262171, + Instance: "host/iofilters", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262157, + Instance: "host/system/kernel", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262153, + Instance: "host", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262172, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262151, + Instance: "host/system/kernel", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262172, + Instance: "host/vim", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262148, + Instance: "host/system", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262155, + Instance: "host/system/drivers", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262153, + Instance: "host/system/vmotion", + }, + { + CounterId: 262148, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262152, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262172, + Instance: "host", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262162, + Instance: "host/vim", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262153, + Instance: "host/system", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262155, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262154, + Instance: "host", + }, + { + CounterId: 262157, + Instance: "host/system", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262153, + Instance: "host/vim/vmci", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262148, + Instance: "host/iofilters", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262152, + Instance: "host/system/kernel", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262171, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262151, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262172, + Instance: "host/system/helper", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262154, + Instance: "host/system/helper", + }, + { + CounterId: 262151, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262155, + Instance: "host/system/helper", + }, + { + CounterId: 262156, + Instance: "host/vim/tmp", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262171, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262154, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262157, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262148, + Instance: "host/system/drivers", + }, + { + CounterId: 262152, + Instance: "host/system/helper", + }, + { + CounterId: 262171, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262153, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262154, + Instance: "host/system/svmotion", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262161, + Instance: "host/system", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262152, + Instance: "host/system/svmotion", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262158, + Instance: "host/system", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262148, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262148, + Instance: "host/system/helper", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262171, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262152, + Instance: "host/system/drivers", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262158, + Instance: "host/system/vmotion", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262152, + Instance: "host/vim", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262151, + Instance: "host/system/vmotion", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262144, + Instance: "", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262171, + Instance: "host/vim/vmci", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262151, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262164, + Instance: "host/system", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262163, + Instance: "host/vim", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262171, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262155, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262171, + Instance: "host/system/kernel", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262160, + Instance: "host/system/vmotion", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262151, + Instance: "host/system", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262155, + Instance: "host/user", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262160, + Instance: "host/system", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262148, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262155, + Instance: "host/system/svmotion", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262155, + Instance: "host/system", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262167, + Instance: "host/system", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmci", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262156, + Instance: "host/system/drivers", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262165, + Instance: "host/vim", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262159, + Instance: "host/system", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmci", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262157, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262153, + Instance: "host/system/helper", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262163, + Instance: "host/system/vmotion", + }, + { + CounterId: 262151, + Instance: "host/user", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262155, + Instance: "host/iofilters", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262171, + Instance: "host/vim/tmp", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262154, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262171, + Instance: "host/system", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262153, + Instance: "host/iofilters", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262151, + Instance: "host/vim/tmp", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262148, + Instance: "host/system/vmotion", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262157, + Instance: "host/iofilters", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 262157, + Instance: "host", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262171, + Instance: "host/system/helper", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262156, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/var", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262157, + Instance: "host/system/helper", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262157, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262152, + Instance: "host/vim/tmp", + }, + { + CounterId: 262154, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262168, + Instance: "host/system/vmotion", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262172, + Instance: "host/user", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262152, + Instance: "host/user", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262152, + Instance: "host/system", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262157, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262153, + Instance: "host/system/drivers", + }, + { + CounterId: 262153, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262162, + Instance: "host/system", + }, + { + CounterId: 262154, + Instance: "host/system/drivers", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262172, + Instance: "host/system/ft", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262148, + Instance: "host/system/ft", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262152, + Instance: "host/system/ft", + }, + { + CounterId: 262155, + Instance: "host/system/ft", + }, + { + CounterId: 262156, + Instance: "host/system/ft", + }, + { + CounterId: 262148, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262157, + Instance: "host/system/ft", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262148, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262172, + Instance: "host/system/vmotion", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262152, + Instance: "host/system/vmotion", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262154, + Instance: "host/system/vmotion", + }, + { + CounterId: 262155, + Instance: "host/system/kernel", + }, + { + CounterId: 262155, + Instance: "host/system/vmotion", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 262156, + Instance: "host/system/vmotion", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262157, + Instance: "host/system/vmotion", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262171, + Instance: "host/system/vmotion", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262159, + Instance: "host/system/vmotion", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262164, + Instance: "host/system/vmotion", + }, + { + CounterId: 262167, + Instance: "host/system/vmotion", + }, + { + CounterId: 262153, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262167, + Instance: "host/vim", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262169, + Instance: "host/system/vmotion", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262166, + Instance: "host/system/vmotion", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262172, + Instance: "host/system/svmotion", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262151, + Instance: "host/system/svmotion", + }, + { + CounterId: 262156, + Instance: "host/system/helper", + }, + { + CounterId: 262153, + Instance: "host/system/svmotion", + }, + { + CounterId: 262171, + Instance: "host/system/svmotion", + }, + { + CounterId: 262148, + Instance: "host/vim", + }, + { + CounterId: 262165, + Instance: "host/system", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262151, + Instance: "host/vim", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vsfwd", + }, + { + CounterId: 262154, + Instance: "host/vim", + }, + { + CounterId: 262169, + Instance: "host/system", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262155, + Instance: "host/vim", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262154, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262154, + Instance: "host/system/kernel", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262157, + Instance: "host/vim", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262171, + Instance: "host/vim", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262158, + Instance: "host/vim", + }, + { + CounterId: 262159, + Instance: "host/vim", + }, + { + CounterId: 262160, + Instance: "host/vim", + }, + { + CounterId: 262161, + Instance: "host/vim", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262172, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262164, + Instance: "host/vim", + }, + { + CounterId: 262157, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262166, + Instance: "host/vim", + }, + { + CounterId: 262168, + Instance: "host/vim", + }, + { + CounterId: 262169, + Instance: "host/vim", + }, + { + CounterId: 262153, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262151, + Instance: "host/vim/vmci", + }, + { + CounterId: 262152, + Instance: "host/vim/vmci", + }, + { + CounterId: 262152, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmci", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262155, + Instance: "host/vim/vmci", + }, + { + CounterId: 262157, + Instance: "host/vim/vimuser", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262172, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262148, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262156, + Instance: "host/vim/vmci", + }, + { + CounterId: 262152, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262157, + Instance: "host/vim/vmci", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262155, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262171, + Instance: "host/user", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262171, + Instance: "host/system/ft", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262151, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262156, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262171, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262172, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 262148, + Instance: "host", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262148, + Instance: "host/system/svmotion", + }, + { + CounterId: 262148, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262156, + Instance: "host/system/svmotion", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262151, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262153, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262155, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262155, + Instance: "host", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262151, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262162, + Instance: "host/system/vmotion", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262155, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262154, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262151, + Instance: "host/system/helper", + }, + { + CounterId: 262172, + Instance: "host/vim/tmp", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 262148, + Instance: "host/vim/tmp", + }, + { + CounterId: 262153, + Instance: "host/vim/tmp", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262172, + Instance: "host/system", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262155, + Instance: "host/vim/tmp", + }, + { + CounterId: 262157, + Instance: "host/vim/tmp", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262156, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262171, + Instance: "host/system/drivers", + }, + { + CounterId: 262172, + Instance: "host/iofilters", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262154, + Instance: "host/system", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262151, + Instance: "host/iofilters", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262156, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262156, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262152, + Instance: "host/iofilters", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262155, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 262154, + Instance: "host/iofilters", + }, + { + CounterId: 262156, + Instance: "host/iofilters", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262172, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262154, + Instance: "host/system/ft", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 262151, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262152, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vsanmgmtdWatchdog", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262153, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 262154, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262155, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262157, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262151, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/pktcap-agent", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262153, + Instance: "host/system/kernel", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262152, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262154, + Instance: "host/vim/tmp", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262155, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/vdpi", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262152, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262172, + Instance: "host/system/drivers", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262171, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262153, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262154, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262156, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 262154, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 262156, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 262157, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262171, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 262156, + Instance: "host/vim", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262172, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262152, + Instance: "host/system/kernel/root", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 262152, + Instance: "host/iofilters/spm", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262156, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 262151, + Instance: "host/system/ft", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 262151, + Instance: "host", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 262148, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262148, + Instance: "host/user", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262154, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 262172, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262153, + Instance: "host/user", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262154, + Instance: "host/user", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262156, + Instance: "host/user", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262156, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262172, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 262157, + Instance: "host/user", + }, + { + CounterId: 262157, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262151, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262152, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262153, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262171, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 262155, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 262148, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 851968, + Instance: "vfc", + }, +} + +// ********************************* Resource pool metrics ********************************** +var ResourcePoolMetrics = []types.PerfMetricId{ + { + CounterId: 5, + Instance: "", + }, + { + CounterId: 65586, + Instance: "", + }, + { + CounterId: 65591, + Instance: "", + }, + { + CounterId: 65545, + Instance: "", + }, + { + CounterId: 65553, + Instance: "", + }, + { + CounterId: 65541, + Instance: "", + }, + { + CounterId: 65549, + Instance: "", + }, + { + CounterId: 65582, + Instance: "", + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/performance_manager_data.go b/vendor/github.com/vmware/govmomi/simulator/esx/performance_manager_data.go new file mode 100644 index 0000000000..45c641e7f0 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/performance_manager_data.go @@ -0,0 +1,1213 @@ +/* +Copyright (c) 2018-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package esx + +var MetricData = map[string]map[int32][]int64{ + "VirtualMachine": VmMetricData, + "HostSystem": HostMetricData, + "ResourcePool": ResourcePoolMetricData, +} + +var VmMetricData = map[int32][]int64{ + 131078: []int64{105, 91, 90, 120, 103, 65, 84, 486, 377, 483, 268, 3788, 5638, 417, 114, 51, 50, 31, 388, 22, + 19, 24, 83, 69, 22, 21, 47, 9, 68, 22, 12, 34, 137, 94, 68, 82, 53, 88, 73, 24, + 45, 35, 42, 52, 104, 103, 112, 124, 91, 111, 183, 82, 85, 40, 54, 27, 29, 17, 30, 23, + 32, 20, 30, 17, 38, 16, 14, 134, 92, 27, 16, 34, 28, 45, 39, 21, 37, 46, 65, 187, + 122, 551, 295, 121, 130, 84, 207, 128, 57, 34, 18, 38, 25, 25, 42, 21, 16, 117, 78, 20, + }, + 262144: []int64{2953459, 2953479, 2953499, 2953519, 2953539, 2953559, 2953579, 2953599, 2953619, 2953639, 2953659, 2953679, 2953699, 2953719, 2953739, 2953759, 2953779, 2953799, 2953819, 2953839, + 2953859, 2953879, 2953899, 2953919, 2953939, 2953959, 2953979, 2953999, 2954019, 2954039, 2954059, 2954079, 2954099, 2954119, 2954139, 2954159, 2954179, 2954199, 2954219, 2954239, + 2954259, 2954279, 2954299, 2954319, 2954339, 2954359, 2954379, 2954399, 2954419, 2954439, 2954459, 2954479, 2954499, 2954519, 2954539, 2954559, 2954579, 2954599, 2954619, 2954639, + 2954659, 2954679, 2954699, 2954719, 2954739, 2954759, 2954779, 2954799, 2954819, 2954839, 2954859, 2954879, 2954899, 2954919, 2954939, 2954959, 2954979, 2954999, 2955019, 2955039, + 2955059, 2955079, 2955099, 2955119, 2955139, 2955159, 2955179, 2955199, 2955219, 2955239, 2955259, 2955279, 2955299, 2955319, 2955339, 2955359, 2955379, 2955399, 2955419, 2955439, + }, + 589826: []int64{0, 1, 0, 23, 0, 0, 0, 62, 2, 5, 2, 3134, 4717, 81, 3, 0, 2, 0, 73, 0, + 1, 0, 4, 0, 0, 3, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 10, 0, 0, 0, + 0, 3, 5, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 0, 0, 2, 0, + 0, 1, 0, 0, 1, 0, 0, 4, 0, 0, 1, 3, 2, 0, 1, 1, 1, 0, 0, 0, + 0, 352, 62, 0, 0, 0, 17, 1, 0, 1, 1, 0, 0, 0, 0, 2, 0, 5, 0, 0, + }, + 27: []int64{0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327684: []int64{2100, 1900, 2100, 2100, 2100, 2100, 2100, 2500, 3900, 4000, 4200, 4500, 4600, 7200, 7200, 7200, 7200, 7200, 7200, 7200, + 7200, 7200, 5700, 5700, 5700, 5700, 5100, 3800, 2300, 1900, 1900, 2100, 2100, 2000, 2000, 2000, 2000, 2000, 2100, 2000, + 2000, 2000, 2000, 2000, 2000, 2000, 1800, 1800, 1800, 1800, 1800, 1800, 1700, 1700, 1800, 1800, 1800, 1800, 1800, 1800, + 1800, 1900, 2000, 2000, 2000, 2000, 2000, 2600, 3700, 3700, 3700, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, + 4000, 6400, 2200, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 1900, 2100, 2100, 2100, + }, + 589827: []int64{185, 221, 201, 190, 213, 180, 183, 3167, 675, 806, 640, 1307, 1853, 985, 283, 202, 244, 188, 189, 223, + 190, 193, 516, 150, 100, 135, 127, 92, 160, 103, 101, 160, 203, 188, 238, 195, 206, 1006, 215, 168, + 234, 202, 185, 238, 197, 195, 229, 199, 207, 244, 696, 179, 231, 155, 122, 100, 153, 107, 107, 140, + 107, 91, 145, 100, 120, 147, 99, 3340, 2031, 123, 101, 153, 103, 120, 152, 89, 123, 236, 194, 234, + 181, 397, 536, 205, 210, 238, 201, 188, 205, 234, 183, 192, 222, 183, 238, 189, 185, 2573, 269, 168, + }, + 65591: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 262145: []int64{30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + }, + 131095: []int64{0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 1, 0, 1, 1, 1, 3, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 13, 0, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + }, + 327680: []int64{900, 900, 1100, 1200, 1200, 1000, 900, 2100, 3100, 4200, 4000, 4300, 4500, 6200, 5300, 3900, 1400, 1000, 1100, 1100, + 1000, 900, 1100, 1100, 1300, 1000, 1400, 1200, 1400, 1000, 1000, 900, 1000, 1100, 1000, 1000, 900, 1000, 1200, 1100, + 1000, 1200, 1200, 1300, 900, 900, 900, 900, 1100, 1000, 1100, 900, 900, 1200, 1400, 1300, 1300, 1100, 1200, 900, + 1000, 900, 1000, 1100, 1200, 1000, 900, 2600, 4400, 4400, 2600, 1300, 1200, 1300, 1000, 1000, 1000, 900, 1100, 1000, + 1000, 1500, 1700, 1800, 1200, 1000, 1300, 1300, 1400, 1000, 1000, 900, 1000, 1100, 1000, 1000, 900, 1800, 1900, 1900, + }, + 65628: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196612: []int64{2225, 3281, 1618, 2063, 1848, 1873, 2184, 7480, 8118, 10104, 10870, 9808, 10400, 13222, 2843, 2012, 3354, 1841, 2146, 1756, + 1978, 2008, 1907, 1994, 2224, 3298, 2051, 2094, 1828, 2006, 2211, 3199, 1709, 1954, 1759, 1851, 2318, 1896, 1896, 2121, + 3276, 1983, 2205, 1779, 1689, 2019, 3311, 1876, 2034, 1907, 1961, 2015, 1749, 1927, 2294, 3313, 2048, 1981, 1967, 1848, + 2192, 3359, 1871, 1895, 1966, 1923, 2129, 3255, 1851, 1869, 3261, 1965, 2286, 1853, 1894, 1937, 3358, 1834, 2190, 1876, + 1949, 2031, 1892, 1787, 2014, 3183, 1621, 1724, 1817, 1774, 2141, 3293, 1798, 2044, 1798, 1832, 2108, 1780, 1946, 2000, + }, + 196619: []int64{338, 541, 275, 276, 274, 277, 338, 518, 546, 597, 677, 545, 606, 600, 305, 280, 542, 274, 351, 275, + 276, 275, 277, 276, 339, 391, 292, 275, 274, 276, 337, 541, 275, 275, 275, 276, 340, 277, 276, 276, + 389, 292, 337, 274, 276, 275, 542, 274, 339, 275, 274, 275, 278, 274, 340, 389, 293, 276, 274, 277, + 339, 543, 289, 274, 277, 275, 337, 280, 274, 274, 390, 290, 339, 276, 274, 277, 542, 276, 339, 275, + 274, 277, 277, 274, 340, 404, 275, 274, 277, 275, 338, 541, 274, 275, 275, 274, 340, 275, 276, 275, + }, + 196628: []int64{346, 555, 281, 282, 280, 283, 347, 528, 557, 609, 691, 554, 618, 611, 312, 286, 556, 280, 360, 281, + 282, 281, 281, 282, 347, 400, 298, 282, 280, 282, 346, 555, 281, 281, 281, 282, 348, 283, 282, 282, + 399, 298, 345, 280, 282, 281, 556, 281, 348, 282, 281, 281, 284, 280, 348, 398, 300, 283, 280, 283, + 347, 557, 295, 280, 284, 282, 345, 286, 280, 280, 399, 297, 347, 282, 280, 283, 556, 282, 347, 281, + 280, 283, 283, 280, 348, 414, 281, 280, 283, 282, 347, 555, 280, 282, 282, 281, 348, 281, 282, 282, + }, + 196613: []int64{1045, 1729, 698, 934, 692, 804, 938, 5133, 5837, 7138, 7639, 7081, 7420, 9237, 1494, 953, 1727, 787, 1039, 739, + 801, 815, 800, 881, 1148, 1807, 970, 803, 770, 845, 1084, 1932, 824, 883, 844, 832, 1204, 818, 873, 810, + 1834, 920, 972, 857, 841, 804, 1671, 793, 1068, 782, 832, 851, 831, 776, 1161, 1701, 922, 809, 777, 765, + 1029, 1893, 788, 772, 790, 815, 1050, 1463, 736, 768, 1782, 864, 1144, 923, 780, 890, 1645, 766, 1146, 827, + 829, 938, 914, 787, 1153, 1815, 786, 735, 752, 821, 1070, 1742, 773, 760, 759, 850, 1071, 798, 809, 788, + }, + 1: []int64{459, 568, 565, 667, 468, 400, 428, 2434, 1844, 1903, 2087, 2129, 2462, 4030, 755, 424, 599, 426, 669, 421, + 421, 458, 761, 611, 443, 740, 651, 400, 594, 441, 430, 545, 481, 579, 452, 435, 462, 584, 708, 389, + 765, 566, 439, 554, 417, 402, 579, 414, 645, 412, 538, 417, 465, 1149, 429, 746, 521, 388, 596, 389, + 445, 556, 566, 592, 488, 399, 457, 3707, 2176, 486, 774, 638, 457, 560, 475, 405, 579, 405, 663, 406, + 388, 1451, 624, 592, 474, 771, 662, 429, 588, 387, 452, 564, 452, 586, 451, 404, 444, 1771, 690, 397, + }, + 196614: []int64{246, 416, 202, 245, 203, 203, 245, 510, 474, 664, 776, 792, 927, 1261, 318, 259, 416, 203, 245, 203, + 217, 245, 218, 218, 246, 309, 216, 245, 203, 203, 246, 415, 203, 245, 203, 203, 260, 204, 203, 245, + 309, 215, 245, 203, 203, 245, 416, 203, 248, 203, 203, 245, 203, 203, 246, 308, 216, 245, 203, 203, + 246, 416, 203, 244, 203, 203, 245, 562, 203, 244, 308, 215, 246, 203, 203, 244, 416, 203, 245, 203, + 203, 245, 204, 203, 245, 320, 203, 244, 203, 203, 245, 416, 203, 245, 203, 203, 245, 203, 203, 245, + }, + 30: []int64{1889, 2375, 2401, 2804, 2005, 1726, 1848, 10236, 7642, 7872, 8787, 8676, 10432, 16327, 3168, 1797, 2525, 1766, 2769, 1788, + 1770, 1909, 3236, 2649, 1853, 3209, 2727, 1711, 2510, 1865, 1802, 2296, 2000, 2470, 1920, 1817, 1960, 2477, 2940, 1641, + 3366, 2229, 1820, 2288, 1733, 1693, 2534, 1742, 2643, 1721, 2257, 1705, 1966, 4724, 1806, 3226, 2100, 1688, 2475, 1648, + 1920, 2305, 2364, 2465, 1997, 1649, 1950, 15409, 8946, 2036, 3316, 2566, 1886, 2273, 2041, 1687, 2450, 1777, 2788, 1725, + 1647, 5924, 2638, 2466, 1963, 3281, 2712, 1828, 2480, 1654, 1898, 2356, 1888, 2469, 1915, 1691, 1840, 7415, 2902, 1648, + }, + 327683: []int64{1000, 1000, 1100, 1100, 1100, 1100, 1100, 1300, 1500, 1700, 1900, 2100, 2400, 2900, 3000, 3000, 3000, 2900, 2900, 2900, + 2900, 2900, 2700, 2500, 2300, 2200, 2000, 1700, 1200, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1000, 1100, 1000, 1100, 1100, 1000, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1400, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, + 1700, 1800, 1500, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1100, 1200, 1200, 1200, + }, + 65627: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 655379: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196622: []int64{20, 20, 20, 20, 21, 20, 20, 24, 20, 20, 22, 20, 20, 20, 20, 20, 20, 21, 20, 20, + 20, 20, 20, 21, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 22, 20, 24, 20, 20, + 20, 20, 21, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 21, 20, 20, 20, 21, 20, + 21, 20, 20, 20, 20, 20, 20, 25, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 21, + 20, 20, 20, 20, 20, 21, 21, 20, 20, 20, 19, 20, 21, 20, 20, 20, 20, 20, 21, 20, + }, + 65603: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327685: []int64{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1200, 1400, 1600, 1800, 2000, 2200, 2700, 2800, 2800, 2800, 2800, 2800, 2800, + 2800, 2800, 2600, 2400, 2200, 2000, 1800, 1600, 1100, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + 1000, 1000, 1100, 1000, 1100, 1000, 1000, 1400, 1600, 1600, 1600, 1600, 1600, 1600, 1700, 1600, 1700, 1600, 1600, 1600, + 1600, 1800, 1400, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1000, 1200, 1200, 1200, + }, + 196615: []int64{338, 541, 275, 276, 274, 277, 338, 518, 546, 597, 677, 545, 606, 600, 305, 280, 542, 274, 351, 275, + 276, 275, 277, 276, 339, 391, 292, 275, 274, 276, 337, 541, 275, 275, 275, 276, 340, 277, 276, 276, + 389, 292, 337, 274, 276, 275, 542, 274, 339, 275, 274, 275, 278, 274, 340, 389, 293, 276, 274, 277, + 339, 543, 289, 274, 277, 275, 337, 280, 274, 274, 390, 290, 339, 276, 274, 277, 542, 276, 339, 275, + 274, 277, 277, 274, 340, 404, 275, 274, 277, 275, 338, 541, 274, 275, 275, 274, 340, 275, 276, 275, + }, + 327689: []int64{1300, 1700, 2000, 2200, 2200, 2200, 1200, 7000, 7000, 7000, 4800, 7500, 7500, 11300, 11300, 11300, 4800, 1800, 2300, 2300, + 2300, 1300, 2600, 2600, 2600, 2200, 3700, 3700, 3700, 1900, 1900, 1900, 1900, 1900, 1800, 1800, 1500, 2100, 2600, 2600, + 2600, 3700, 3700, 3700, 1800, 1800, 1700, 1700, 1900, 1900, 1900, 1500, 1500, 4100, 4100, 4100, 3700, 3700, 3700, 1800, + 1800, 1900, 1900, 1900, 1900, 1700, 1500, 11100, 11100, 11100, 10400, 4000, 4000, 4000, 1800, 1800, 2100, 2100, 2100, 2100, + 2100, 7600, 7600, 7600, 2000, 2000, 3800, 3800, 3800, 1900, 1900, 1900, 1900, 2000, 2000, 2000, 1500, 9100, 9100, 9100, + }, + 196609: []int64{584, 957, 478, 521, 477, 480, 584, 1029, 1020, 1261, 1453, 1337, 1533, 1861, 624, 539, 959, 477, 597, 478, + 494, 520, 496, 494, 585, 700, 508, 521, 477, 480, 583, 957, 478, 520, 478, 479, 600, 481, 479, 521, + 699, 507, 583, 477, 479, 520, 958, 478, 588, 479, 478, 520, 481, 478, 586, 698, 509, 521, 478, 480, + 585, 959, 492, 519, 481, 479, 583, 843, 478, 519, 699, 506, 585, 479, 478, 522, 958, 479, 585, 478, + 478, 522, 481, 478, 585, 724, 478, 518, 480, 479, 584, 958, 478, 520, 479, 478, 586, 478, 480, 520, + }, + 196627: []int64{240, 397, 197, 239, 197, 198, 239, 491, 467, 656, 767, 778, 921, 1255, 312, 253, 398, 197, 239, 197, + 212, 239, 198, 212, 240, 301, 204, 239, 197, 198, 240, 397, 197, 239, 197, 198, 254, 198, 198, 239, + 301, 204, 239, 197, 197, 239, 398, 198, 242, 198, 198, 239, 197, 198, 240, 301, 205, 239, 198, 198, + 240, 398, 198, 238, 198, 198, 239, 547, 198, 238, 301, 204, 240, 197, 198, 238, 398, 197, 239, 198, + 198, 239, 198, 197, 239, 307, 197, 238, 197, 197, 239, 398, 197, 239, 197, 197, 239, 198, 198, 239, + }, + 327691: []int64{1900, 1700, 2000, 2000, 2000, 2000, 2000, 2300, 3600, 3900, 3900, 4200, 4300, 6900, 6900, 6900, 6900, 6900, 6900, 6900, + 6900, 6900, 5200, 5200, 5200, 5200, 4800, 3700, 2200, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, + 1900, 1900, 1900, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1700, 1700, 1800, 1800, 1800, 1800, 1800, 1800, + 1800, 1900, 1900, 1900, 1900, 1900, 1900, 2500, 3700, 3700, 3700, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, + 4000, 6000, 2100, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, + }, + 196623: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65549: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327688: []int64{2300, 2300, 2300, 2300, 2300, 2400, 2400, 2400, 2400, 2200, 2100, 1900, 1800, 1700, 1800, 1800, 1800, 1800, 1800, 1800, + 1800, 1800, 1700, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1500, 1500, 1400, 1400, 1300, 1200, 1000, 1000, + 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1100, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, + 1200, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, + }, + 65582: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 32: []int64{25, 24, 26, 25, 30, 27, 29, 68, 43, 51, 54, 65, 48, 46, 30, 24, 28, 26, 25, 29, + 24, 27, 35, 28, 28, 36, 34, 23, 32, 24, 22, 28, 20, 24, 25, 26, 27, 24, 26, 24, + 29, 25, 26, 23, 24, 29, 26, 25, 26, 22, 23, 26, 28, 22, 23, 25, 26, 24, 20, 25, + 31, 25, 19, 21, 22, 21, 30, 35, 32, 29, 27, 27, 24, 25, 24, 24, 23, 24, 25, 24, + 26, 26, 24, 23, 21, 30, 34, 23, 25, 25, 28, 29, 23, 22, 28, 24, 26, 33, 27, 23, + }, + 196616: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 26: []int64{217, 224, 259, 290, 282, 249, 216, 489, 724, 988, 925, 1006, 1057, 1432, 1233, 916, 342, 231, 273, 255, + 244, 208, 264, 269, 299, 239, 325, 290, 323, 235, 240, 228, 238, 259, 249, 239, 221, 242, 286, 273, + 247, 282, 293, 311, 229, 221, 218, 225, 260, 242, 254, 220, 229, 297, 330, 318, 300, 265, 296, 227, + 232, 217, 252, 276, 276, 240, 222, 617, 1020, 1019, 617, 300, 299, 315, 241, 230, 231, 229, 272, 249, + 236, 357, 392, 426, 276, 246, 305, 300, 326, 233, 231, 225, 242, 262, 248, 233, 213, 417, 449, 458, + }, + 31: []int64{43400, 44800, 51800, 58000, 56400, 49800, 43200, 97800, 144800, 197600, 185000, 201200, 211400, 286400, 246600, 183200, 68400, 46200, 54600, 51000, + 48800, 41600, 52800, 53800, 59800, 47800, 65000, 58000, 64600, 47000, 48000, 45600, 47600, 51800, 49800, 47800, 44200, 48400, 57200, 54600, + 49400, 56400, 58600, 62200, 45800, 44200, 43600, 45000, 52000, 48400, 50800, 44000, 45800, 59400, 66000, 63600, 60000, 53000, 59200, 45400, + 46400, 43400, 50400, 55200, 55200, 48000, 44400, 123400, 204000, 203800, 123400, 60000, 59800, 63000, 48200, 46000, 46200, 45800, 54400, 49800, + 47200, 71400, 78400, 85200, 55200, 49200, 61000, 60000, 65200, 46600, 46200, 45000, 48400, 52400, 49600, 46600, 42600, 83400, 89800, 91600, + }, + 25: []int64{50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + }, + 65553: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65607: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 28: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327681: []int64{1400, 1900, 2100, 2200, 2200, 2200, 1300, 7200, 7200, 7200, 5200, 8000, 8000, 11800, 11800, 11800, 5100, 1800, 2300, 2300, + 2300, 1400, 2700, 2700, 2700, 2300, 3800, 3800, 3800, 1900, 1900, 2100, 2100, 2100, 2000, 2000, 1600, 2100, 2700, 2700, + 2700, 4100, 4100, 4100, 1800, 1800, 1700, 1700, 1900, 1900, 1900, 1600, 1600, 4100, 4100, 4100, 3700, 3700, 3700, 1800, + 1800, 2000, 2000, 2000, 2000, 1800, 1600, 11400, 11400, 11400, 10900, 4000, 4000, 4000, 1800, 1800, 2200, 2200, 2200, 2200, + 2200, 7700, 7700, 7700, 2100, 2100, 3800, 3800, 3800, 1900, 1900, 2200, 2200, 2200, 2100, 2100, 1600, 9400, 9400, 9400, + }, + 262170: []int64{2861015, 2861045, 2861045, 2861075, 2861105, 2861105, 2861135, 2861165, 2861165, 2861195, 2861225, 2861225, 2861255, 2861285, 2861285, 2861315, 2861345, 2861345, 2861375, 2861405, + 2861405, 2861435, 2861465, 2861465, 2861495, 2861525, 2861525, 2861555, 2861585, 2861585, 2861615, 2861645, 2861645, 2861675, 2861705, 2861705, 2861735, 2861765, 2861765, 2861795, + 2861825, 2861825, 2861855, 2861885, 2861885, 2861915, 2861945, 2861945, 2861975, 2862005, 2862005, 2862035, 2862065, 2862065, 2862095, 2862125, 2862125, 2862155, 2862185, 2862185, + 2862215, 2862245, 2862245, 2862275, 2862305, 2862305, 2862335, 2862365, 2862365, 2862395, 2862425, 2862425, 2862455, 2862485, 2862485, 2862515, 2862545, 2862545, 2862575, 2862605, + 2862605, 2862635, 2862665, 2862665, 2862695, 2862725, 2862725, 2862755, 2862785, 2862785, 2862815, 2862845, 2862845, 2862875, 2862905, 2862905, 2862935, 2862965, 2862965, 2862995, + }, + 327686: []int64{2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2300, 2200, 2100, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, + 1900, 1900, 1800, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, + 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1600, 1600, 1500, 1400, 1400, 1300, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1200, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, + 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1400, 1400, 1400, + }, + 327690: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327694: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 720898: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65619: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 5: []int64{211, 261, 260, 307, 215, 184, 197, 1121, 849, 876, 961, 980, 1134, 1856, 347, 195, 276, 196, 308, 193, + 194, 211, 350, 281, 204, 341, 300, 184, 273, 203, 198, 251, 221, 267, 208, 200, 212, 269, 326, 179, + 352, 260, 202, 255, 192, 185, 266, 191, 297, 189, 248, 192, 214, 529, 198, 344, 240, 178, 274, 179, + 205, 256, 260, 273, 225, 183, 210, 1708, 1002, 224, 356, 294, 211, 258, 218, 186, 266, 186, 305, 187, + 179, 668, 287, 273, 218, 355, 305, 197, 271, 178, 208, 260, 208, 270, 208, 186, 204, 816, 317, 183, + }, + 12: []int64{1711, 2153, 2171, 2558, 1771, 1503, 1598, 9515, 7128, 7337, 8062, 8181, 9498, 15824, 2927, 1603, 2297, 1593, 2559, 1573, + 1578, 1731, 2944, 2338, 1647, 2816, 2499, 1511, 2280, 1659, 1629, 2050, 1832, 2202, 1711, 1617, 1743, 2257, 2729, 1455, + 2939, 2164, 1645, 2127, 1545, 1509, 2199, 1561, 2466, 1539, 2068, 1561, 1767, 4473, 1625, 2855, 1997, 1445, 2282, 1465, + 1664, 2104, 2168, 2258, 1855, 1498, 1716, 14725, 8581, 1833, 2979, 2449, 1722, 2119, 1846, 1524, 2224, 1522, 2550, 1509, + 1477, 5683, 2386, 2276, 1781, 2955, 2527, 1618, 2245, 1464, 1687, 2148, 1688, 2238, 1720, 1516, 1656, 6995, 2664, 1458, + }, + 131079: []int64{185, 221, 201, 190, 213, 180, 183, 3168, 675, 806, 641, 1307, 1853, 985, 283, 202, 244, 188, 189, 223, + 190, 193, 516, 150, 100, 135, 127, 92, 160, 103, 101, 160, 203, 188, 238, 195, 206, 1006, 215, 168, + 234, 202, 185, 238, 197, 195, 229, 199, 207, 244, 700, 179, 231, 155, 122, 100, 153, 107, 107, 140, + 107, 91, 145, 100, 120, 147, 99, 3340, 2031, 123, 101, 153, 103, 120, 152, 89, 123, 236, 194, 234, + 181, 397, 544, 197, 221, 227, 201, 188, 205, 234, 183, 192, 222, 183, 238, 189, 185, 2573, 269, 168, + }, + 29: []int64{9, 10, 10, 10, 11, 8, 10, 43, 34, 38, 34, 67, 101, 52, 14, 8, 10, 9, 16, 7, + 8, 7, 14, 9, 8, 11, 12, 6, 9, 8, 7, 8, 10, 8, 9, 10, 9, 11, 11, 7, + 10, 9, 7, 9, 10, 8, 12, 9, 10, 10, 13, 9, 9, 10, 8, 9, 9, 5, 8, 7, + 8, 8, 8, 7, 9, 6, 7, 27, 19, 7, 10, 9, 7, 8, 8, 6, 9, 8, 9, 11, + 9, 19, 15, 10, 10, 11, 13, 10, 9, 9, 7, 8, 9, 7, 8, 7, 8, 18, 10, 7, + }, + 65537: []int64{3500, 3500, 3500, 3199, 3199, 3199, 3699, 3699, 3699, 3799, 3799, 3799, 3799, 3799, 3799, 3500, 3500, 3500, 3299, 3299, + 3299, 3399, 3399, 3399, 3399, 3399, 3399, 3199, 3199, 3199, 3299, 3299, 3299, 3299, 3299, 3299, 3199, 3199, 3199, 3199, + 3199, 3199, 3399, 3399, 3399, 3399, 3399, 3399, 3099, 3099, 3099, 3299, 3299, 3299, 3799, 3799, 3799, 3099, 3099, 3099, + 3500, 3500, 3500, 3399, 3399, 3399, 3399, 3399, 3399, 3699, 3699, 3699, 3699, 3699, 3699, 4000, 4000, 4000, 3899, 3899, + 3899, 3500, 3500, 3500, 3299, 3299, 3299, 3599, 3599, 3599, 3299, 3299, 3299, 3199, 3199, 3199, 3199, 3199, 3199, 3099, + }, + 65635: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65611: []int64{10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + }, + 65622: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 14: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65541: []int64{10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + }, + 327687: []int64{10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 9400, 6400, 4600, 4400, 4400, 4500, 4500, 4500, 4500, 4500, 4500, + 4500, 4500, 4200, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, + 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 3900, 3800, 2700, 2600, 2100, 1900, 1800, + 1800, 1900, 1900, 1900, 1900, 1900, 1900, 2000, 2100, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2100, 2100, + 2100, 2200, 2200, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, + }, + 65545: []int64{3670016, 3670016, 3670016, 3355440, 3355440, 3355440, 3879728, 3879728, 3879728, 3984588, 3984588, 3984588, 3984588, 3984588, 3984588, 3670016, 3670016, 3670016, 3460300, 3460300, + 3460300, 3565156, 3565156, 3565156, 3565156, 3565156, 3565156, 3355440, 3355440, 3355440, 3460300, 3460300, 3460300, 3460300, 3460300, 3460300, 3355440, 3355440, 3355440, 3355440, + 3355440, 3355440, 3565156, 3565156, 3565156, 3565156, 3565156, 3565156, 3250584, 3250584, 3250584, 3460300, 3460300, 3460300, 3984588, 3984588, 3984588, 3250584, 3250584, 3250584, + 3670016, 3670016, 3670016, 3565156, 3565156, 3565156, 3565156, 3565156, 3565156, 3879728, 3879728, 3879728, 3879728, 3879728, 3879728, 4194304, 4194304, 4194304, 4089444, 4089444, + 4089444, 3670016, 3670016, 3670016, 3460300, 3460300, 3460300, 3774872, 3774872, 3774872, 3460300, 3460300, 3460300, 3355440, 3355440, 3355440, 3355440, 3355440, 3355440, 3250584, + }, + 65586: []int64{57744, 57744, 57744, 57760, 57760, 57760, 57760, 57760, 57760, 57792, 57792, 57792, 57712, 57712, 57712, 57824, 57824, 57824, 57840, 57840, + 57840, 57856, 57856, 57856, 57776, 57776, 57776, 57888, 57888, 57888, 57696, 57696, 57696, 57712, 57712, 57712, 57824, 57824, 57824, 57856, + 57856, 57856, 57888, 57888, 57888, 57904, 57904, 57904, 57904, 57904, 57904, 57920, 57920, 57920, 57936, 57936, 57936, 57856, 57856, 57856, + 57968, 57968, 57872, 57984, 57984, 57984, 58000, 57904, 57904, 57824, 57824, 57824, 57840, 57840, 57840, 57760, 57760, 57760, 57776, 57888, + 57888, 57696, 57696, 57696, 57808, 57808, 57808, 57712, 57936, 57936, 57840, 57840, 57840, 57840, 57952, 57952, 57760, 57872, 57872, 57872, + }, + 65624: []int64{84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + }, + 65634: []int64{57744, 57744, 57744, 57760, 57760, 57760, 57760, 57760, 57760, 57792, 57792, 57792, 57712, 57712, 57712, 57824, 57824, 57824, 57840, 57840, + 57840, 57856, 57856, 57856, 57776, 57776, 57776, 57888, 57888, 57888, 57696, 57696, 57696, 57712, 57712, 57712, 57824, 57824, 57824, 57856, + 57856, 57856, 57888, 57888, 57888, 57904, 57904, 57904, 57904, 57904, 57904, 57920, 57920, 57920, 57936, 57936, 57936, 57856, 57856, 57856, + 57968, 57968, 57872, 57984, 57984, 57984, 58000, 57904, 57904, 57824, 57824, 57824, 57840, 57840, 57840, 57760, 57760, 57760, 57776, 57888, + 57888, 57696, 57696, 57696, 57808, 57808, 57808, 57712, 57936, 57936, 57840, 57840, 57840, 57840, 57952, 57952, 57760, 57872, 57872, 57872, + }, + 65626: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65629: []int64{10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + }, + 65621: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65623: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327695: []int64{160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + }, + 13: []int64{37978, 37501, 37462, 37066, 37839, 38140, 38011, 29354, 32106, 31822, 30939, 30913, 29139, 23406, 36679, 38089, 37345, 38110, 37061, 38081, + 38120, 37966, 36595, 37207, 38021, 36634, 37109, 38187, 37335, 38029, 38098, 37573, 37880, 37394, 37941, 38053, 37909, 37384, 36931, 38248, + 36492, 37654, 38055, 37596, 38126, 38157, 37319, 38123, 37220, 38150, 37587, 38157, 37893, 32654, 38076, 36665, 37776, 38207, 37424, 38241, + 37941, 37582, 37542, 37439, 37894, 38254, 37917, 24375, 30881, 37834, 36563, 37313, 37999, 37605, 37848, 38206, 37440, 38100, 37089, 38127, + 38208, 33912, 37191, 37407, 37916, 36568, 37091, 38034, 37393, 38237, 37976, 37508, 38001, 37419, 37956, 38192, 38043, 32389, 36953, 38248, + }, + 327682: []int64{800, 900, 1000, 1200, 1100, 1000, 800, 1900, 2900, 4000, 3700, 4000, 4200, 5800, 5000, 3700, 1400, 900, 1100, 1000, + 1000, 800, 1000, 1100, 1200, 900, 1300, 1100, 1300, 900, 900, 900, 900, 1000, 1000, 900, 800, 900, 1100, 1100, + 1000, 1100, 1100, 1200, 900, 900, 900, 900, 1000, 1000, 1000, 900, 900, 1200, 1300, 1300, 1200, 1100, 1200, 900, + 900, 800, 1000, 1100, 1100, 900, 800, 2500, 4200, 4200, 2500, 1200, 1200, 1300, 1000, 900, 900, 900, 1100, 1000, + 900, 1400, 1600, 1700, 1100, 900, 1200, 1200, 1300, 900, 900, 900, 900, 1000, 1000, 900, 800, 1700, 1800, 1900, + }, + 65595: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65618: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196621: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196620: []int64{53, 31, 40, 39, 38, 34, 42, 276, 414, 530, 550, 290, 179, 96, 38, 51, 46, 34, 40, 35, + 43, 38, 42, 31, 47, 47, 34, 43, 42, 39, 39, 36, 35, 42, 42, 41, 42, 47, 43, 41, + 36, 32, 40, 50, 36, 38, 43, 39, 36, 32, 35, 41, 45, 35, 36, 43, 42, 35, 43, 36, + 49, 41, 32, 51, 44, 45, 38, 49, 34, 47, 38, 42, 45, 49, 40, 28, 48, 34, 40, 34, + 47, 34, 48, 43, 33, 39, 34, 39, 39, 46, 36, 49, 38, 34, 33, 44, 40, 37, 51, 36, + }, + 24: []int64{83, 108, 82, 102, 104, 96, 105, 276, 193, 208, 261, 221, 312, 203, 105, 85, 105, 79, 92, 103, + 85, 85, 122, 120, 94, 151, 106, 87, 104, 91, 79, 106, 76, 104, 93, 89, 96, 93, 94, 84, + 150, 54, 83, 77, 85, 88, 130, 83, 84, 79, 82, 74, 89, 97, 81, 132, 65, 97, 82, 84, + 108, 89, 81, 86, 71, 71, 104, 225, 136, 94, 128, 72, 77, 78, 87, 79, 95, 100, 98, 90, + 83, 102, 99, 84, 82, 123, 100, 90, 98, 85, 95, 109, 74, 92, 91, 82, 86, 152, 98, 84, + }, + 65632: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65633: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 131073: []int64{290, 313, 292, 310, 317, 245, 267, 3654, 1052, 1289, 909, 5095, 7491, 1402, 397, 253, 294, 220, 577, 245, + 210, 217, 600, 219, 122, 157, 175, 101, 229, 125, 113, 194, 340, 282, 306, 277, 259, 1095, 289, 192, + 280, 238, 227, 291, 301, 299, 341, 324, 299, 355, 884, 262, 316, 195, 176, 127, 183, 124, 137, 164, + 139, 111, 175, 117, 159, 163, 114, 3475, 2124, 150, 117, 187, 132, 166, 192, 111, 160, 282, 259, 421, + 304, 948, 840, 318, 352, 312, 408, 316, 263, 269, 201, 230, 248, 208, 281, 211, 202, 2690, 347, 189, + }, + 10: []int64{38008, 37528, 37491, 37093, 37873, 38166, 38033, 29492, 32179, 31921, 30994, 31066, 29370, 23484, 36708, 38107, 37359, 38126, 37127, 38097, + 38132, 37979, 36623, 37238, 38032, 36645, 37131, 38194, 37359, 38040, 38105, 37590, 37920, 37431, 37973, 38079, 37929, 37422, 36953, 38261, + 36518, 37666, 38075, 37616, 38170, 38191, 37362, 38155, 37250, 38189, 37648, 38186, 37925, 35180, 38096, 36675, 37795, 38213, 37441, 38251, + 37950, 37594, 37558, 37443, 37914, 38263, 37927, 24447, 30924, 37848, 36574, 37326, 38012, 37623, 37861, 38214, 37454, 38126, 37111, 38178, + 38246, 33970, 37262, 37439, 37949, 36598, 37151, 38072, 37418, 38245, 37985, 37527, 38015, 37441, 37972, 38208, 38054, 32457, 36985, 38260, + }, + 327696: []int64{6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + }, + 196618: []int64{246, 416, 202, 245, 203, 203, 245, 510, 474, 664, 776, 792, 927, 1261, 318, 259, 416, 203, 245, 203, + 217, 245, 218, 218, 246, 309, 216, 245, 203, 203, 246, 415, 203, 245, 203, 203, 260, 204, 203, 245, + 309, 215, 245, 203, 203, 245, 416, 203, 248, 203, 203, 245, 203, 203, 246, 308, 216, 245, 203, 203, + 246, 416, 203, 244, 203, 203, 245, 562, 203, 244, 308, 215, 246, 203, 203, 244, 416, 203, 245, 203, + 203, 245, 204, 203, 245, 320, 203, 244, 203, 203, 245, 416, 203, 245, 203, 203, 245, 203, 203, 245, + }, + 65620: []int64{3145728, 3145728, 3145728, 2831152, 2831152, 2831152, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 2831152, 2831152, 2831152, 2621440, 2621440, + 2621440, 2516580, 2516580, 2516580, 2411724, 2411724, 2516580, 2516580, 2516580, 2516580, 2516580, 2516580, 2516580, 2726296, 2726296, 2726296, 2726296, 2726296, 2726296, 2411724, + 2411724, 2411724, 2621440, 2726296, 2726296, 2831152, 2831152, 2831152, 2411724, 2411724, 2411724, 2516580, 2516580, 2516580, 3040868, 3040868, 3040868, 2411724, 2621440, 2621440, + 2936012, 2936012, 2936012, 2936012, 2936012, 2936012, 2411724, 2411724, 2411724, 2936012, 2936012, 2936012, 2936012, 2936012, 2936012, 2621440, 2621440, 2621440, 2621440, 2621440, + 2621440, 2411724, 2411724, 2411724, 2306864, 2306864, 2306864, 2726296, 2726296, 2726296, 2306864, 2411724, 2621440, 2621440, 2621440, 2621440, 2411724, 2411724, 2411724, 2411724, + }, + 720896: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65599: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327693: []int64{10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 9300, 6200, 4300, 4100, 4100, 4200, 4200, 4200, 4200, 4200, 4200, + 4200, 4200, 3900, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, + 3800, 3700, 3700, 3700, 3700, 3700, 3700, 3700, 3700, 3700, 3700, 3700, 3700, 3600, 3500, 2600, 2500, 1900, 1800, 1800, + 1800, 1800, 1900, 1800, 1800, 1800, 1800, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 2100, 2100, + 2100, 2100, 2100, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2100, 2100, 2000, + }, + 327692: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196617: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 9: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 11: []int64{102, 98, 107, 101, 122, 108, 120, 272, 175, 206, 218, 262, 194, 187, 120, 97, 115, 108, 103, 117, + 97, 111, 140, 113, 115, 145, 140, 92, 130, 97, 90, 114, 80, 100, 103, 108, 109, 100, 106, 98, + 117, 103, 104, 95, 97, 116, 105, 101, 107, 91, 93, 108, 113, 92, 96, 101, 104, 97, 84, 102, + 127, 102, 80, 87, 91, 88, 123, 143, 128, 116, 109, 109, 98, 104, 99, 99, 95, 97, 101, 96, + 107, 105, 99, 94, 88, 121, 138, 95, 104, 100, 115, 118, 96, 90, 113, 98, 105, 133, 108, 94, + }, +} + +var HostMetricData = map[int32][]int64{ + 786434: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 786433: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196621: []int64{12, 6, 12, 14, 14, 3, 9, 10, 8, 8, 7, 4, 13, 10, 2, 10, 12, 5, 8, 14, + 4, 10, 10, 5, 7, 13, 4, 9, 13, 6, 10, 11, 5, 5, 15, 6, 7, 8, 6, 11, + 11, 3, 6, 16, 4, 5, 9, 11, 9, 9, 6, 10, 14, 4, 4, 13, 11, 4, 14, 7, + 10, 12, 4, 7, 14, 9, 3, 12, 9, 8, 9, 9, 3, 14, 9, 4, 11, 9, 5, 12, + 10, 3, 13, 10, 4, 8, 12, 7, 10, 8, 4, 14, 11, 2, 8, 15, 7, 6, 8, 9, + }, + 65648: []int64{125627793408, 125627793408, 129922760704, 129922760704, 132070244352, 132070244352, 133143986176, 133143986176, 133143986176, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, + 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 134217728000, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, + 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, 135291469824, + 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, + 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, 136365211648, + }, + 196617: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 720897: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 655379: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 786432: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65580: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65553: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327688: []int64{3000, 2800, 2700, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2400, 2300, 2300, 2300, 2300, 2300, 2400, + 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2300, 2400, 2400, 2300, 2400, 2300, 2300, + 2300, 2300, 2300, 2300, 2200, 2200, 2100, 2000, 2000, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1900, 2000, + 2000, 2000, 2000, 2000, 1900, 2000, 1900, 1900, 1900, 1900, 1900, 1900, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2100, 2000, 2000, 2000, 2000, 2000, 2100, 2100, 2100, 2100, 2000, 2000, + }, + 65569: []int64{8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + }, + 65618: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65599: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65651: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65623: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65621: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65545: []int64{5148100, 5152036, 5152036, 5068216, 5066748, 5066748, 4668288, 4667468, 4667532, 4415832, 4414556, 4414556, 4645244, 4643896, 4643832, 4476060, 4477808, 4477328, 4393504, 4394380, + 4394380, 4415352, 4414368, 4414368, 4582080, 4667244, 4709192, 4604396, 4601648, 4601236, 4223616, 4266064, 4308068, 4517720, 4517808, 4517808, 4895296, 4894212, 4894148, 4160148, + 4160652, 4160716, 4496260, 4497200, 4497260, 4895660, 4894568, 4894504, 4160500, 4160176, 4160176, 4789388, 4790264, 4790264, 4517628, 4559080, 4601088, 4601024, 4601032, 4601032, + 4831780, 4833388, 4833324, 4833324, 4831012, 4831076, 5313912, 5314316, 5314316, 4999740, 5003640, 5003544, 4584148, 4622376, 4622376, 4412724, 4580436, 4664320, 5146664, 5147684, + 5147684, 4833048, 4411892, 4453836, 4349040, 4394232, 4394168, 4394168, 4770512, 4770576, 4665656, 4202908, 4202908, 4832052, 5002572, 5002508, 4583080, 4498160, 4498224, 4707940, + }, + 5: []int64{1092, 1227, 1198, 1351, 2006, 529, 356, 461, 353, 508, 352, 354, 418, 546, 477, 362, 521, 476, 472, 467, + 369, 363, 431, 383, 462, 367, 360, 372, 469, 509, 343, 534, 408, 402, 416, 353, 346, 445, 390, 461, + 353, 411, 357, 437, 690, 353, 508, 424, 482, 434, 339, 363, 479, 426, 430, 387, 342, 406, 1875, 1155, + 393, 520, 501, 373, 419, 381, 366, 466, 353, 465, 344, 378, 822, 463, 435, 380, 575, 460, 481, 428, + 342, 409, 444, 367, 427, 374, 386, 366, 982, 485, 364, 584, 411, 372, 568, 374, 341, 454, 345, 445, + }, + 14: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65622: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65628: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65537: []int64{5407, 5407, 5407, 5407, 5411, 5407, 5407, 5407, 5407, 5410, 5407, 5407, 5407, 5407, 5410, 5407, 5407, 5407, 5407, 5407, + 5407, 5407, 5407, 5407, 5407, 5407, 5407, 5407, 5409, 5406, 5406, 5406, 5406, 5409, 5406, 5406, 5406, 5406, 5407, 5406, + 5406, 5406, 5406, 5406, 5406, 5406, 5406, 5409, 5406, 5406, 5406, 5406, 5411, 5406, 5406, 5406, 5406, 5408, 5406, 5406, + 5406, 5406, 5406, 5406, 5406, 5406, 5411, 5407, 5407, 5407, 5407, 5412, 5407, 5407, 5407, 5407, 5409, 5407, 5407, 5407, + 5407, 5407, 5407, 5407, 5407, 5407, 5407, 5407, 5407, 5407, 5409, 5407, 5407, 5407, 5407, 5411, 5407, 5407, 5407, 5407, + }, + 65643: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65649: []int64{35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + }, + 11: []int64{442, 507, 594, 440, 424, 313, 293, 343, 303, 291, 355, 295, 320, 387, 294, 337, 379, 376, 322, 354, + 304, 291, 320, 275, 295, 307, 327, 336, 316, 316, 327, 311, 310, 310, 279, 324, 311, 311, 310, 297, + 280, 279, 313, 325, 283, 316, 303, 305, 340, 324, 308, 342, 322, 292, 292, 287, 278, 332, 401, 322, + 341, 342, 318, 296, 319, 300, 309, 337, 290, 313, 301, 327, 343, 293, 309, 272, 342, 365, 353, 315, + 308, 317, 362, 266, 291, 334, 325, 319, 352, 302, 333, 362, 308, 302, 315, 320, 291, 325, 337, 340, + }, + 24: []int64{201, 234, 226, 256, 192, 156, 146, 161, 149, 153, 164, 147, 150, 169, 162, 154, 186, 161, 153, 162, + 154, 143, 157, 143, 158, 153, 155, 155, 154, 149, 149, 180, 136, 152, 149, 150, 152, 171, 153, 146, + 149, 147, 144, 148, 146, 150, 168, 141, 161, 153, 152, 161, 153, 148, 146, 143, 145, 162, 200, 161, + 151, 169, 143, 145, 149, 150, 148, 158, 159, 152, 156, 152, 154, 155, 149, 148, 168, 157, 159, 158, + 150, 152, 166, 143, 151, 155, 148, 146, 180, 154, 151, 171, 152, 148, 204, 149, 148, 153, 149, 159, + }, + 196620: []int64{527, 555, 283, 168, 82, 35, 43, 38, 26, 32, 28, 39, 25, 32, 29, 37, 37, 29, 36, 28, + 35, 30, 26, 30, 35, 29, 37, 33, 34, 37, 31, 26, 27, 35, 35, 30, 31, 35, 33, 25, + 21, 32, 35, 29, 31, 31, 34, 31, 26, 34, 31, 39, 27, 28, 47, 31, 34, 34, 35, 27, + 37, 26, 38, 38, 35, 31, 25, 36, 25, 32, 25, 38, 32, 33, 34, 29, 28, 25, 34, 27, + 36, 33, 36, 28, 31, 25, 32, 33, 27, 44, 32, 36, 24, 38, 33, 24, 37, 28, 41, 27, + }, + 65586: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 524295: []int64{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65639: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 720898: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196613: []int64{12359, 13847, 11628, 12730, 13984, 5095, 4435, 8374, 4211, 5373, 4141, 4239, 4236, 4183, 4305, 5360, 7261, 5387, 4253, 4244, + 4291, 5295, 8625, 4227, 4310, 4256, 4233, 5376, 4226, 4323, 4232, 6436, 4482, 5155, 4311, 4271, 4243, 8395, 4262, 5290, + 4203, 4287, 4263, 4216, 4202, 5297, 6340, 4482, 4240, 4213, 4195, 5192, 8610, 4389, 4234, 4243, 4247, 5229, 4940, 4221, + 4192, 6390, 4424, 5325, 4357, 4193, 4315, 8399, 4195, 5331, 4307, 4246, 4339, 4309, 4229, 5336, 6628, 4303, 4215, 4213, + 4307, 5349, 8433, 4218, 4244, 4217, 4311, 5227, 4256, 4254, 4257, 7483, 4206, 5174, 4195, 4301, 4249, 8539, 4218, 5243, + }, + 1: []int64{2371, 2663, 2602, 2933, 4356, 1149, 773, 1002, 766, 1103, 764, 769, 908, 1187, 1035, 787, 1132, 1034, 1025, 1014, + 801, 789, 937, 832, 1004, 796, 783, 808, 1018, 1105, 745, 1161, 886, 874, 904, 766, 752, 967, 847, 1002, + 766, 893, 775, 950, 1499, 766, 1102, 920, 1047, 943, 737, 790, 1040, 926, 935, 840, 744, 883, 4070, 2508, + 853, 1129, 1088, 809, 909, 828, 795, 1012, 766, 1010, 748, 820, 1784, 1005, 944, 825, 1248, 1000, 1045, 929, + 743, 888, 965, 796, 927, 813, 838, 795, 2131, 1053, 790, 1269, 892, 807, 1233, 813, 742, 985, 749, 967, + }, + 720896: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65577: []int64{30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, + 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, + 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, + 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, + 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, 30618, + }, + 65620: []int64{4099524, 4103460, 4103460, 4061584, 4060116, 4060116, 3619708, 3618888, 3618952, 3451144, 3449868, 3449868, 3428896, 3427548, 3427484, 3196796, 3282432, 3386808, 3386872, 3387748, + 3387748, 3387748, 3386764, 3386764, 3764188, 3807412, 3807416, 3807480, 3804732, 3804320, 3196012, 3196516, 3238524, 3448176, 3553120, 3553120, 3909636, 3908552, 3908488, 3195456, + 3279848, 3279912, 3384768, 3385708, 3385768, 3826108, 3825016, 3824952, 3237752, 3447144, 3447144, 3887608, 3888484, 3888484, 3720712, 3887992, 3888056, 3363704, 3363712, 3363712, + 3762236, 3763844, 3763780, 3679896, 3677584, 3677648, 3573272, 3573676, 3573676, 3363964, 3367864, 3367768, 3116140, 3280200, 3280200, 3175404, 3343112, 3343112, 3804488, 3805508, + 3805508, 3386012, 3279432, 3489148, 3489212, 3492460, 3492396, 3282680, 3533196, 3533260, 3533196, 3196276, 3196276, 3615704, 3744280, 3744216, 3534504, 3491528, 3596448, 3596448, + }, + 65633: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196625: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196615: []int64{608, 692, 553, 618, 611, 312, 287, 556, 280, 360, 281, 282, 282, 281, 282, 347, 459, 357, 282, 280, + 282, 346, 555, 282, 281, 281, 282, 348, 283, 282, 282, 399, 299, 345, 281, 282, 281, 556, 281, 348, + 282, 281, 281, 284, 280, 348, 398, 300, 283, 280, 283, 347, 557, 296, 280, 284, 282, 345, 287, 281, + 280, 399, 297, 347, 282, 280, 283, 556, 282, 347, 282, 281, 283, 283, 281, 349, 414, 282, 280, 283, + 282, 347, 555, 281, 282, 282, 281, 348, 281, 282, 282, 470, 282, 347, 280, 282, 281, 558, 280, 347, + }, + 65630: []int64{961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, + 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, + 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, + 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, + 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, 961912, + }, + 65541: []int64{14892144, 14892144, 14892144, 14892144, 14892144, 14892144, 14892144, 14892144, 14892144, 14892148, 14892144, 14892132, 14892144, 14892144, 14892144, 14892144, 14892916, 14892208, 14892208, 14892208, + 14892196, 14892208, 14892208, 14892208, 14892196, 14892208, 14892208, 14892208, 14892208, 14890776, 14890304, 14890304, 14890304, 14890292, 14890304, 14890304, 14890304, 14890292, 14890304, 14890304, + 14890304, 14890304, 14890304, 14890304, 14890504, 14890304, 14890292, 14890304, 14890304, 14890304, 14890292, 14890304, 14890304, 14890304, 14890304, 14890304, 14890304, 14890304, 14890304, 14890292, + 14890304, 14890304, 14890304, 14890292, 14890304, 14890304, 14891100, 14893012, 14893012, 14893012, 14893012, 14892932, 14893000, 14893012, 14893012, 14893012, 14893000, 14893012, 14893012, 14893012, + 14893012, 14893012, 14893012, 14893012, 14893012, 14893000, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893012, 14893000, 14893012, + }, + 65647: []int64{268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + }, + 131078: []int64{489, 365, 4041, 5640, 417, 114, 51, 51, 31, 388, 22, 19, 26, 83, 81, 28, 23, 48, 9, 68, + 22, 13, 156, 137, 94, 69, 83, 53, 88, 86, 31, 46, 36, 42, 52, 105, 103, 112, 124, 92, + 111, 183, 82, 87, 55, 60, 27, 29, 18, 30, 23, 32, 20, 31, 17, 38, 16, 15, 136, 104, + 34, 16, 37, 28, 45, 39, 23, 37, 46, 65, 187, 123, 551, 296, 134, 136, 86, 208, 128, 57, + 36, 18, 38, 25, 25, 43, 21, 16, 117, 91, 27, 51, 31, 13, 118, 23, 8, 18, 20, 10, + }, + 65632: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65635: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196609: []int64{1283, 1482, 1350, 1564, 1898, 633, 548, 966, 484, 607, 485, 501, 529, 486, 501, 595, 773, 571, 529, 484, + 487, 593, 965, 485, 528, 485, 486, 610, 487, 487, 529, 709, 509, 593, 484, 486, 528, 966, 485, 598, + 486, 485, 528, 488, 485, 596, 709, 511, 529, 485, 488, 594, 967, 500, 527, 488, 486, 593, 850, 485, + 526, 710, 508, 595, 487, 485, 530, 966, 486, 594, 486, 485, 530, 488, 485, 596, 730, 485, 526, 487, + 486, 594, 965, 485, 529, 486, 485, 595, 485, 487, 528, 791, 486, 594, 484, 486, 528, 967, 485, 593, + }, + 65582: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 26: []int64{1144, 1078, 1165, 1217, 1592, 1383, 1058, 480, 367, 409, 392, 381, 359, 415, 420, 435, 374, 462, 470, 503, + 416, 378, 368, 376, 396, 384, 374, 357, 381, 425, 411, 385, 421, 435, 450, 367, 358, 355, 362, 396, + 379, 391, 358, 367, 434, 465, 452, 436, 446, 477, 407, 369, 354, 390, 414, 413, 375, 358, 755, 1160, + 1158, 755, 437, 438, 454, 380, 367, 368, 367, 411, 388, 373, 493, 529, 564, 415, 384, 444, 486, 512, + 417, 368, 364, 380, 400, 384, 370, 349, 554, 587, 597, 394, 435, 430, 505, 427, 414, 346, 357, 398, + }, + 196616: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65611: []int64{18083012, 18083020, 18082672, 18082320, 18096832, 18082492, 18082612, 18082524, 18082524, 18094536, 18082572, 18082408, 18082572, 18082524, 18091984, 18082412, 18083304, 18082412, 18082488, 18082560, + 18082556, 18082328, 18082328, 18082284, 18082288, 18082452, 18082412, 18082580, 18091268, 18081104, 18080724, 18080880, 18080836, 18088572, 18080924, 18080884, 18080764, 18080712, 18084604, 18080908, + 18080908, 18080864, 18080828, 18080828, 18081120, 18080800, 18080680, 18090892, 18080764, 18080764, 18080556, 18080876, 18095260, 18080768, 18080844, 18080848, 18080800, 18085776, 18080908, 18080480, + 18080556, 18080468, 18080424, 18080408, 18080532, 18080488, 18097776, 18083388, 18083248, 18083168, 18083548, 18099296, 18083164, 18083484, 18083440, 18083264, 18089172, 18083424, 18083264, 18083420, + 18083376, 18083632, 18083432, 18083388, 18083420, 18083300, 18083420, 18083340, 18083400, 18083356, 18091760, 18083240, 18083196, 18083212, 18083080, 18096856, 18083148, 18083208, 18083116, 18083196, + }, + 65557: []int64{26247692, 26247660, 26247884, 26247936, 26247912, 26247896, 26247884, 26248064, 26248056, 26247924, 26247980, 26248084, 26247812, 26247964, 26247916, 26247912, 26247996, 26248112, 26248032, 26248068, + 26248188, 26248088, 26247940, 26248096, 26248200, 26248040, 26248044, 26248052, 26248092, 26248084, 26248036, 26248056, 26248096, 26248080, 26248056, 26248052, 26248104, 26248164, 26248020, 26247996, + 26248016, 26248084, 26247964, 26247956, 26247908, 26247840, 26247932, 26247888, 26247920, 26247812, 26247900, 26247864, 26247840, 26247900, 26247916, 26247768, 26247876, 26247864, 26247660, 26248168, + 26248068, 26248104, 26248184, 26248232, 26248032, 26248144, 26247996, 26248160, 26248172, 26248112, 26248140, 26248100, 26248176, 26248064, 26248072, 26248076, 26248100, 26248084, 26248156, 26248076, + 26248180, 26248100, 26248064, 26248184, 26248076, 26248112, 26248100, 26248164, 26248012, 26248072, 26248100, 26247996, 26248064, 26248116, 26248068, 26248112, 26248084, 26248016, 26248144, 26248148, + }, + 327695: []int64{160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + }, + 27: []int64{0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327690: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65561: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327685: []int64{2400, 2500, 2800, 3000, 3500, 3600, 3600, 3600, 3500, 3500, 3500, 3500, 3500, 3400, 3200, 3000, 2800, 2600, 2400, 1900, + 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, + 1700, 1700, 1700, 1700, 1700, 1800, 1700, 1700, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 2100, 2400, + 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2300, 2400, 2300, 2300, 2500, 2200, 1900, 1800, 1800, 1800, 1900, 1900, + 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1700, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, + }, + 23: []int64{114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + }, + 327680: []int64{5200, 4900, 5300, 5600, 7200, 6200, 4800, 2300, 1800, 2000, 1900, 1800, 1700, 2000, 2000, 2100, 1800, 2200, 2300, 2400, + 2000, 1800, 1800, 1800, 1900, 1900, 1800, 1700, 1800, 2000, 2000, 1800, 2000, 2100, 2100, 1800, 1700, 1700, 1800, 1900, + 1800, 1900, 1700, 1800, 2100, 2200, 2100, 2100, 2100, 2200, 1900, 1800, 1700, 1900, 2000, 2000, 1800, 1700, 3500, 5200, + 5200, 3400, 2100, 2100, 2200, 1800, 1800, 1800, 1800, 2000, 1800, 1800, 2300, 2500, 2600, 2000, 1800, 2100, 2300, 2400, + 2000, 1800, 1800, 1800, 1900, 1800, 1800, 1700, 2600, 2700, 2800, 1900, 2100, 2100, 2400, 2000, 2000, 1700, 1700, 1900, + }, + 327682: []int64{4800, 4500, 4900, 5100, 6700, 5800, 4500, 2100, 1600, 1800, 1700, 1600, 1600, 1800, 1900, 1900, 1600, 2000, 2100, 2200, + 1800, 1600, 1600, 1700, 1800, 1700, 1600, 1500, 1600, 1800, 1800, 1700, 1800, 1800, 1900, 1600, 1600, 1600, 1600, 1800, + 1700, 1700, 1600, 1600, 1900, 2000, 2000, 1900, 2000, 2100, 1800, 1600, 1600, 1700, 1800, 1800, 1600, 1500, 3200, 4900, + 4900, 3200, 1900, 1900, 2000, 1700, 1600, 1600, 1600, 1800, 1700, 1600, 2200, 2300, 2400, 1800, 1600, 1900, 2100, 2200, + 1800, 1600, 1600, 1700, 1700, 1700, 1600, 1500, 2400, 2500, 2600, 1700, 1900, 1900, 2200, 1800, 1800, 1500, 1600, 1700, + }, + 13: []int64{30507, 29370, 29577, 28286, 22549, 35395, 36907, 35994, 36930, 35587, 36940, 36931, 36357, 35252, 35857, 36852, 35470, 35858, 35896, 35942, + 36795, 36838, 36254, 36675, 35972, 36812, 36872, 36765, 35918, 35578, 37015, 35361, 36446, 36500, 36382, 36939, 36991, 36129, 36612, 35981, + 36941, 36419, 36901, 36198, 34003, 36927, 35597, 36310, 35809, 36222, 37054, 36835, 35841, 36294, 36256, 36635, 37025, 36485, 23728, 29935, + 36589, 35483, 35638, 36758, 36361, 36690, 36815, 35951, 36933, 35958, 37004, 36727, 32864, 35963, 36220, 36703, 35029, 35973, 35809, 36283, + 37029, 36442, 36143, 36809, 36288, 36751, 36645, 36831, 31459, 35776, 36844, 34924, 36427, 36770, 35067, 36742, 37038, 36052, 37007, 36133, + }, + 327696: []int64{6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + }, + 327684: []int64{5000, 5300, 5500, 5600, 8100, 8100, 8100, 8100, 8100, 8100, 8100, 8100, 8100, 6600, 6600, 6600, 6600, 6300, 5000, 3000, + 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3100, 3000, 3000, 3000, 2800, 2800, 2800, 2800, 2800, 2800, 2800, + 2800, 2800, 2800, 2600, 2600, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 3600, 4800, + 4800, 4800, 5200, 5200, 5200, 5200, 5200, 5200, 5200, 5200, 5200, 5200, 7100, 3300, 2900, 2900, 2900, 2900, 2900, 2900, + 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2800, 2900, 2900, 2900, 2900, 2900, 2800, 3100, 3100, 3100, 3100, 3100, 3100, + }, + 327691: []int64{4900, 4900, 5000, 5200, 7700, 7700, 7700, 7700, 7700, 7700, 7700, 7700, 7700, 6000, 6000, 6000, 6000, 5700, 4800, 2900, + 2800, 2800, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2600, 2600, 2600, 2600, 2600, 2600, 2600, + 2600, 2600, 2600, 2500, 2500, 2600, 2600, 2600, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 3300, 4600, + 4600, 4600, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 6800, 3100, 2700, 2700, 2700, 2700, 2700, 2700, + 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2600, 2700, 2800, 2800, 2800, 2800, 2600, 2900, 2900, 2900, 2900, 2900, 2900, + }, + 327692: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65549: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 10: []int64{70023, 69041, 68994, 67423, 61621, 74879, 76270, 75520, 76292, 75277, 76212, 76328, 75767, 74735, 75448, 76202, 74760, 75242, 75240, 75507, + 76158, 76286, 75747, 76105, 75603, 76122, 76222, 76086, 75538, 75135, 76414, 74674, 75772, 76192, 75750, 76329, 76346, 75522, 76299, 75414, + 76309, 75807, 76331, 76055, 73442, 76254, 74847, 75925, 75240, 75555, 76395, 76106, 75712, 75715, 75632, 76070, 76416, 76057, 62685, 69153, + 75966, 74759, 75466, 76168, 75749, 76032, 76373, 75576, 76225, 75289, 76308, 76384, 72178, 75402, 75594, 76098, 74719, 75249, 75086, 75570, + 76411, 76151, 75617, 76196, 75625, 76105, 76373, 76233, 70604, 75121, 76386, 74489, 75778, 76169, 73856, 76442, 76439, 75576, 76432, 75432, + }, + 196623: []int64{0, 5, 4, 5, 2, 0, 1, 4, 3, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 4, + 2, 0, 0, 0, 4, 6, 2, 3, 8, 0, 0, 4, 0, 3, 0, 0, 0, 4, 0, 3, + 0, 0, 0, 4, 0, 2, 7, 1, 0, 5, 0, 1, 2, 0, 0, 4, 0, 0, 10, 0, + 0, 4, 0, 0, 3, 0, 0, 9, 1, 1, 4, 0, 0, 4, 0, 0, 1, 1, 0, 4, + 0, 0, 0, 3, 0, 4, 0, 0, 3, 5, 1, 4, 1, 0, 0, 2, 1, 4, 0, 0, + }, + 65646: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 262144: []int64{2953795, 2953815, 2953835, 2953855, 2953875, 2953895, 2953915, 2953935, 2953955, 2953975, 2953995, 2954015, 2954035, 2954055, 2954075, 2954095, 2954115, 2954135, 2954155, 2954175, + 2954195, 2954215, 2954235, 2954255, 2954275, 2954295, 2954315, 2954335, 2954355, 2954375, 2954395, 2954415, 2954435, 2954455, 2954475, 2954495, 2954515, 2954535, 2954555, 2954575, + 2954595, 2954615, 2954635, 2954655, 2954675, 2954695, 2954715, 2954735, 2954755, 2954775, 2954795, 2954815, 2954835, 2954855, 2954875, 2954895, 2954915, 2954935, 2954955, 2954975, + 2954995, 2955015, 2955035, 2955055, 2955075, 2955095, 2955115, 2955135, 2955155, 2955175, 2955195, 2955215, 2955235, 2955255, 2955275, 2955295, 2955315, 2955335, 2955355, 2955375, + 2955395, 2955415, 2955435, 2955455, 2955475, 2955495, 2955515, 2955535, 2955555, 2955575, 2955595, 2955615, 2955635, 2955655, 2955675, 2955695, 2955715, 2955735, 2955755, 2955775, + }, + 8: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 131079: []int64{807, 777, 1425, 1861, 991, 291, 217, 255, 197, 198, 231, 200, 611, 546, 162, 101, 143, 145, 102, 168, + 126, 113, 166, 213, 189, 245, 205, 206, 1023, 228, 170, 242, 219, 193, 245, 207, 196, 236, 209, 212, + 252, 710, 180, 253, 167, 124, 108, 171, 117, 122, 152, 112, 98, 156, 107, 127, 156, 100, 3353, 2054, + 129, 119, 173, 110, 130, 163, 90, 131, 247, 198, 244, 191, 398, 575, 209, 230, 234, 218, 203, 224, + 251, 188, 199, 233, 185, 250, 199, 186, 2582, 315, 176, 231, 266, 201, 256, 244, 190, 111, 158, 106, + }, + 131073: []int64{1296, 1143, 5467, 7501, 1409, 406, 269, 306, 228, 587, 254, 220, 638, 630, 243, 130, 167, 194, 111, 237, + 148, 126, 323, 350, 283, 315, 288, 259, 1112, 315, 202, 288, 255, 236, 298, 312, 299, 348, 334, 305, + 364, 894, 263, 340, 222, 184, 136, 200, 136, 153, 175, 144, 119, 187, 124, 166, 172, 116, 3489, 2158, + 163, 135, 210, 138, 175, 203, 114, 168, 293, 263, 431, 315, 949, 871, 343, 366, 321, 427, 331, 281, + 287, 206, 237, 258, 211, 294, 221, 203, 2699, 406, 203, 283, 297, 215, 374, 267, 199, 129, 179, 116, + }, + 65589: []int64{131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + }, + 65625: []int64{25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, + 25763, 25763, 25763, 25763, 25764, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, + 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, + 25763, 25763, 25763, 25764, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, + 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, 25763, + }, + 196612: []int64{16073, 18141, 16872, 19194, 25039, 6049, 4761, 7618, 3957, 4738, 3863, 4232, 4595, 3991, 4294, 4812, 7141, 4722, 4705, 3940, + 4134, 4807, 7470, 3830, 4575, 3872, 3968, 5070, 3991, 4036, 4699, 6582, 4164, 4810, 3901, 3809, 4601, 7575, 4003, 4657, + 4015, 4071, 4631, 3860, 4051, 4897, 6622, 4210, 4588, 4105, 4011, 4776, 7653, 3964, 4498, 4075, 4043, 4714, 9240, 3980, + 4452, 6584, 4162, 4865, 3995, 3999, 4528, 7621, 3956, 4759, 3999, 4062, 4604, 4019, 3924, 4620, 6589, 3762, 4330, 3922, + 3887, 4735, 7568, 3912, 4638, 3918, 3941, 4691, 3897, 4093, 4584, 7166, 3790, 4669, 3988, 3857, 4563, 7553, 3992, 4641, + }, + 196619: []int64{608, 692, 553, 618, 611, 312, 287, 556, 280, 360, 281, 282, 282, 281, 282, 347, 459, 357, 282, 280, + 282, 346, 555, 282, 281, 281, 282, 348, 283, 282, 282, 399, 299, 345, 281, 282, 281, 556, 281, 348, + 282, 281, 281, 284, 280, 348, 398, 300, 283, 280, 283, 347, 557, 296, 280, 284, 282, 345, 287, 281, + 280, 399, 297, 347, 282, 280, 283, 556, 282, 347, 282, 281, 283, 283, 281, 349, 414, 282, 280, 283, + 282, 347, 555, 281, 282, 282, 281, 348, 281, 282, 282, 470, 282, 347, 280, 282, 281, 558, 280, 347, + }, + 196622: []int64{65, 61, 48, 47, 49, 52, 55, 36, 53, 43, 38, 36, 60, 53, 67, 50, 53, 59, 58, 39, + 70, 71, 48, 62, 86, 46, 47, 71, 40, 44, 62, 42, 37, 77, 57, 39, 53, 45, 48, 72, + 40, 49, 82, 55, 45, 78, 69, 55, 65, 58, 91, 59, 67, 45, 67, 51, 50, 46, 57, 48, + 54, 41, 40, 47, 71, 39, 53, 39, 46, 52, 55, 41, 51, 61, 38, 51, 60, 53, 54, 37, + 37, 43, 42, 53, 62, 40, 40, 43, 48, 55, 51, 52, 39, 43, 40, 76, 52, 38, 62, 44, + }, + 65603: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 196626: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327689: []int64{8200, 5600, 9100, 9100, 12000, 12000, 12000, 5700, 2700, 2800, 2800, 2800, 2000, 3600, 3600, 3600, 3000, 4800, 4800, 4800, + 2900, 2600, 2900, 2900, 2900, 2400, 2400, 2200, 2900, 3400, 3400, 3400, 4800, 4800, 4800, 2600, 2600, 2700, 2700, 2700, + 2500, 2500, 2300, 2300, 4800, 4800, 4800, 4600, 4600, 4600, 2700, 2500, 2900, 2900, 2900, 2600, 2300, 2200, 11900, 11900, + 11900, 11300, 5000, 5000, 5000, 2600, 2600, 3100, 3100, 3100, 2700, 2700, 8200, 8200, 8200, 2700, 2700, 4700, 4700, 4700, + 2800, 2600, 2900, 2900, 2900, 2600, 2600, 2200, 9900, 9900, 9900, 2900, 4700, 4700, 5100, 5100, 5100, 3000, 3000, 3000, + }, + 16: []int64{1450, 1649, 1581, 1756, 2475, 782, 586, 716, 585, 756, 591, 582, 652, 816, 737, 597, 810, 731, 710, 720, + 604, 594, 686, 614, 715, 606, 595, 611, 711, 756, 571, 803, 651, 642, 653, 580, 580, 710, 629, 698, + 583, 647, 579, 673, 943, 586, 781, 651, 736, 674, 570, 603, 731, 667, 669, 612, 570, 676, 2294, 1460, + 626, 790, 736, 602, 651, 614, 597, 722, 596, 709, 580, 620, 1087, 713, 672, 611, 846, 704, 728, 672, + 572, 647, 693, 602, 666, 605, 615, 599, 1292, 736, 596, 864, 650, 605, 889, 610, 569, 703, 571, 688, + }, + 196624: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65573: []int64{14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + }, + 458759: []int64{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327681: []int64{8600, 6200, 9900, 9900, 12600, 12600, 12600, 6300, 2900, 3000, 3000, 3000, 2200, 3800, 3800, 3800, 3200, 5000, 5000, 5000, + 3000, 2800, 3200, 3200, 3200, 2600, 2600, 2400, 3100, 3600, 3600, 3600, 5300, 5300, 5300, 2800, 2800, 2900, 2900, 2900, + 2600, 2600, 2400, 2400, 4900, 4900, 4900, 4800, 4800, 4800, 2800, 2700, 3100, 3100, 3100, 2800, 2400, 2500, 12200, 12200, + 12200, 12000, 5200, 5200, 5200, 2700, 2700, 3300, 3300, 3300, 2900, 2900, 8400, 8400, 8400, 2900, 2900, 5000, 5000, 5000, + 2900, 2800, 3400, 3400, 3400, 2800, 2800, 2400, 10300, 10300, 10300, 3100, 4900, 4900, 5600, 5600, 5600, 3300, 3300, 3300, + }, + 131095: []int64{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65650: []int64{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + }, + 65615: []int64{1747308, 1747308, 1746928, 1746884, 1746996, 1746840, 1746928, 1746840, 1746840, 1747020, 1746840, 1746704, 1746884, 1746840, 1746840, 1746884, 1746976, 1746708, 1746752, 1746752, + 1746708, 1746752, 1746752, 1746708, 1746616, 1746752, 1746708, 1746752, 1746752, 1746708, 1746752, 1746796, 1746752, 1746796, 1746796, 1746752, 1746796, 1746660, 1746752, 1746796, + 1746796, 1746752, 1746796, 1746796, 1746884, 1746928, 1746836, 1746928, 1746972, 1746972, 1746792, 1746972, 1746972, 1746928, 1746972, 1746972, 1746928, 1746972, 1746972, 1746572, + 1746752, 1746708, 1746664, 1746664, 1746708, 1746664, 1746912, 1746708, 1746664, 1746664, 1746708, 1746664, 1746528, 1746708, 1746664, 1746664, 1746752, 1746708, 1746708, 1746752, + 1746708, 1746708, 1746752, 1746708, 1746708, 1746616, 1746708, 1746708, 1746752, 1746708, 1746708, 1746752, 1746708, 1746708, 1746752, 1746708, 1746708, 1746752, 1746616, 1746708, + }, + 327694: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 327683: []int64{2600, 2800, 3000, 3200, 3800, 3900, 3900, 3900, 3800, 3800, 3800, 3800, 3900, 3600, 3400, 3200, 3000, 2800, 2600, 2100, + 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 1900, 2000, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, + 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 2000, 1900, 2000, 1900, 1900, 2300, 2600, + 2600, 2600, 2600, 2600, 2500, 2600, 2600, 2600, 2500, 2500, 2500, 2500, 2700, 2300, 2000, 2000, 2000, 2000, 2100, 2100, + 2100, 2100, 2100, 2100, 2100, 2100, 2100, 1900, 2100, 2100, 2100, 2100, 2100, 2000, 2100, 2100, 2100, 2100, 2100, 2100, + }, + 327693: []int64{10000, 6800, 5200, 4900, 4900, 4900, 4900, 4900, 4900, 4900, 4900, 4900, 4900, 4900, 4700, 4700, 4700, 4700, 4700, 4700, + 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, 4700, + 4700, 4700, 4700, 4500, 4400, 4200, 3600, 3300, 2900, 2700, 2700, 2700, 2700, 2700, 2600, 2600, 2600, 2600, 2700, 2900, + 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2700, 2700, 2700, 2700, 2800, 2800, + 2800, 2800, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, + }, + 12: []int64{9486, 10654, 10409, 11735, 17425, 4598, 3092, 4011, 3066, 4413, 3059, 3076, 3635, 4749, 4143, 3150, 4531, 4138, 4101, 4058, + 3206, 3159, 3748, 3332, 4018, 3188, 3132, 3236, 4073, 4423, 2984, 4644, 3548, 3498, 3617, 3065, 3011, 3870, 3391, 4010, + 3066, 3575, 3102, 3801, 5998, 3066, 4411, 3683, 4191, 3775, 2950, 3160, 4163, 3706, 3741, 3364, 2977, 3533, 16280, 10036, + 3415, 4519, 4354, 3240, 3639, 3314, 3183, 4051, 3065, 4041, 2994, 3283, 7138, 4024, 3780, 3302, 4995, 4000, 4182, 3719, + 2974, 3554, 3863, 3186, 3710, 3254, 3354, 3184, 8526, 4216, 3161, 5076, 3568, 3231, 4932, 3254, 2968, 3942, 2997, 3871, + }, + 327687: []int64{10200, 7100, 5600, 5300, 5300, 5500, 5500, 5500, 5500, 5500, 5500, 5500, 5500, 5200, 4900, 4900, 4900, 5000, 5000, 5000, + 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, + 5000, 5000, 5000, 4800, 4800, 4700, 3800, 3600, 3000, 2900, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2900, 3100, + 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 2900, 2900, 2900, 2900, 2900, 2900, + 2900, 2900, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, 3100, + }, + 65619: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 32: []int64{55, 63, 74, 55, 53, 39, 36, 42, 37, 36, 44, 36, 40, 48, 36, 42, 47, 47, 40, 44, + 38, 36, 40, 34, 36, 38, 40, 42, 39, 39, 40, 38, 38, 38, 34, 40, 38, 38, 38, 37, + 35, 34, 39, 40, 35, 39, 37, 38, 42, 40, 38, 42, 40, 36, 36, 35, 34, 41, 50, 40, + 42, 42, 39, 37, 39, 37, 38, 42, 36, 39, 37, 40, 42, 36, 38, 34, 42, 45, 44, 39, + 38, 39, 45, 33, 36, 41, 40, 39, 44, 37, 41, 45, 38, 37, 39, 40, 36, 40, 42, 42, + }, + 196618: []int64{674, 789, 796, 945, 1287, 321, 261, 410, 203, 247, 203, 218, 246, 204, 219, 247, 314, 214, 247, 203, + 204, 247, 409, 203, 246, 203, 204, 262, 204, 204, 246, 310, 210, 247, 203, 203, 246, 409, 204, 250, + 204, 204, 246, 204, 204, 247, 310, 211, 246, 204, 204, 247, 410, 204, 246, 204, 204, 247, 563, 204, + 246, 310, 210, 247, 204, 204, 246, 409, 204, 247, 204, 204, 246, 204, 204, 247, 316, 203, 246, 203, + 203, 247, 409, 204, 246, 203, 203, 247, 204, 204, 246, 320, 203, 247, 204, 203, 247, 409, 204, 246, + }, + 196614: []int64{674, 789, 796, 945, 1287, 321, 261, 410, 203, 247, 203, 218, 246, 204, 219, 247, 314, 214, 247, 203, + 204, 247, 409, 203, 246, 203, 204, 262, 204, 204, 246, 310, 210, 247, 203, 203, 246, 409, 204, 250, + 204, 204, 246, 204, 204, 247, 310, 211, 246, 204, 204, 247, 410, 204, 246, 204, 204, 247, 563, 204, + 246, 310, 210, 247, 204, 204, 246, 409, 204, 247, 204, 204, 246, 204, 204, 247, 316, 203, 246, 203, + 203, 247, 409, 204, 246, 203, 203, 247, 204, 204, 246, 320, 203, 247, 204, 203, 247, 409, 204, 246, + }, + 20: []int64{2651, 2993, 2857, 3209, 4556, 1453, 1097, 1315, 1091, 1417, 1095, 1082, 1225, 1503, 1371, 1105, 1499, 1360, 1335, 1345, + 1119, 1109, 1261, 1150, 1332, 1129, 1105, 1138, 1324, 1407, 1063, 1485, 1207, 1186, 1221, 1078, 1082, 1317, 1174, 1316, + 1090, 1213, 1084, 1259, 1786, 1093, 1448, 1209, 1372, 1262, 1070, 1118, 1359, 1244, 1247, 1152, 1066, 1215, 4266, 2733, + 1167, 1466, 1366, 1122, 1225, 1146, 1113, 1333, 1104, 1325, 1076, 1151, 2059, 1314, 1256, 1142, 1566, 1299, 1363, 1257, + 1063, 1205, 1289, 1123, 1250, 1128, 1155, 1119, 2410, 1370, 1113, 1592, 1193, 1122, 1559, 1138, 1063, 1292, 1069, 1281, + }, + 327686: []int64{3200, 3000, 2900, 2700, 2700, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2700, 2600, 2600, 2600, 2600, 2600, 2600, + 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, + 2600, 2600, 2600, 2500, 2400, 2400, 2300, 2200, 2100, 2000, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 2000, 2100, + 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, + 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, + }, +} + +var ResourcePoolMetricData = map[int32][]int64{ + 65586: []int64{100088, 100088, 100088, 100120, 100136, 100136, 100088, 100088, 100088, 99928, 100040, 100040, 100072, 100184, 100184, 99912, 99912, 99912, 100040, 100040, + 100040, 100168, 100168, 100168, 100216, 100328, 100328, 100376, 100376, 100376, 100216, 100328, 100328, 100360, 100360, 100360, 100280, 100280, 100280, 100120, + 100120, 100120, 100040, 100040, 100040, 100152, 100184, 100088, 100120, 100120, 100120, 100056, 100184, 100184, 100104, 100008, 100008, 99960, 100072, 100072, + 100104, 100216, 100120, 100136, 100376, 100376, 100088, 100312, 100312, 100328, 100248, 100248, 100152, 100200, 100200, 100104, 100216, 100216, 100216, 100248, + 100248, 100056, 100184, 100184, 100184, 100024, 100024, 100024, 99864, 99864, 99976, 99992, 100104, 99912, 99944, 99944, 99752, 100008, 100008, 99912, + }, + 65582: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65591: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65545: []int64{4675424, 4674976, 4674976, 4423348, 4422168, 4422168, 4652808, 4652812, 4652812, 4484880, 4484988, 4484988, 4401132, 4401248, 4401248, 4421948, 4421944, 4421944, 4589848, 4673740, + 4715684, 4610952, 4610976, 4610976, 4233536, 4275568, 4317508, 4527272, 4527268, 4527268, 4904596, 4904704, 4904704, 4170736, 4170740, 4170740, 4506204, 4506196, 4506196, 4904496, + 4904508, 4904508, 4170424, 4170416, 4170416, 4799676, 4799708, 4799612, 4527008, 4568956, 4610900, 4610836, 4610956, 4610956, 4841560, 4841508, 4841508, 4841460, 4841536, 4841536, + 5323920, 5324036, 5323940, 5009380, 5009608, 5009608, 4589892, 4632056, 4632056, 4422356, 4590056, 4673940, 5156188, 5156236, 5156236, 4841568, 4422256, 4464200, 4359340, 4401308, + 4401308, 4401116, 4778724, 4778724, 4673868, 4212344, 4212344, 4841488, 5009132, 5009132, 4589816, 4505964, 4506076, 4715600, 4547796, 4547796, 4337888, 4338148, 4338148, 4233192, + }, + 65553: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 65541: []int64{14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, + 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, + 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, + 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, + 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, 14712240, + }, + 65549: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 5: []int64{311, 393, 308, 427, 310, 310, 370, 475, 399, 319, 460, 422, 426, 389, 327, 315, 372, 336, 386, 326, + 316, 328, 391, 446, 296, 489, 366, 319, 372, 308, 302, 386, 304, 417, 309, 367, 311, 340, 646, 307, + 467, 357, 422, 391, 296, 324, 376, 378, 389, 342, 300, 328, 1836, 1120, 349, 471, 419, 327, 374, 338, + 300, 386, 312, 422, 304, 296, 783, 409, 389, 337, 486, 421, 438, 389, 293, 328, 381, 324, 387, 328, + 302, 323, 937, 437, 301, 503, 369, 327, 539, 295, 297, 392, 293, 403, 323, 341, 337, 506, 397, 318, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/resource_pool.go b/vendor/github.com/vmware/govmomi/simulator/esx/resource_pool.go new file mode 100644 index 0000000000..2373311aaa --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/resource_pool.go @@ -0,0 +1,166 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "time" + + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +// ResourcePool is the default template for ResourcePool properties. +// Capture method: +// +// govc pool.info "*" -dump +var ResourcePool = mo.ResourcePool{ + ManagedEntity: mo.ManagedEntity{ + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, + Value: nil, + AvailableField: nil, + }, + Parent: &types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, + CustomValue: nil, + OverallStatus: "green", + ConfigStatus: "green", + ConfigIssue: nil, + EffectiveRole: []int32{-1}, + Permission: nil, + Name: "Resources", + DisabledMethod: []string{"CreateVApp", "CreateChildVM_Task"}, + RecentTask: nil, + DeclaredAlarmState: nil, + TriggeredAlarmState: nil, + AlarmActionsEnabled: (*bool)(nil), + Tag: nil, + }, + Summary: &types.ResourcePoolSummary{ + DynamicData: types.DynamicData{}, + Name: "Resources", + Config: types.ResourceConfigSpec{ + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, + ChangeVersion: "", + LastModified: (*time.Time)(nil), + CpuAllocation: types.ResourceAllocationInfo{ + DynamicData: types.DynamicData{}, + Reservation: types.NewInt64(4121), + ExpandableReservation: types.NewBool(false), + Limit: types.NewInt64(4121), + Shares: &types.SharesInfo{ + DynamicData: types.DynamicData{}, + Shares: 9000, + Level: "custom", + }, + OverheadLimit: nil, + }, + MemoryAllocation: types.ResourceAllocationInfo{ + DynamicData: types.DynamicData{}, + Reservation: types.NewInt64(961), + ExpandableReservation: types.NewBool(false), + Limit: types.NewInt64(961), + Shares: &types.SharesInfo{ + DynamicData: types.DynamicData{}, + Shares: 9000, + Level: "custom", + }, + OverheadLimit: nil, + }, + }, + Runtime: types.ResourcePoolRuntimeInfo{ + DynamicData: types.DynamicData{}, + Memory: types.ResourcePoolResourceUsage{ + DynamicData: types.DynamicData{}, + ReservationUsed: 0, + ReservationUsedForVm: 0, + UnreservedForPool: 1007681536, + UnreservedForVm: 1007681536, + OverallUsage: 0, + MaxUsage: 1007681536, + }, + Cpu: types.ResourcePoolResourceUsage{ + DynamicData: types.DynamicData{}, + ReservationUsed: 0, + ReservationUsedForVm: 0, + UnreservedForPool: 4121, + UnreservedForVm: 4121, + OverallUsage: 0, + MaxUsage: 4121, + }, + OverallStatus: "green", + }, + QuickStats: (*types.ResourcePoolQuickStats)(nil), + ConfiguredMemoryMB: 0, + }, + Runtime: types.ResourcePoolRuntimeInfo{ + DynamicData: types.DynamicData{}, + Memory: types.ResourcePoolResourceUsage{ + DynamicData: types.DynamicData{}, + ReservationUsed: 0, + ReservationUsedForVm: 0, + UnreservedForPool: 1007681536, + UnreservedForVm: 1007681536, + OverallUsage: 0, + MaxUsage: 1007681536, + }, + Cpu: types.ResourcePoolResourceUsage{ + DynamicData: types.DynamicData{}, + ReservationUsed: 0, + ReservationUsedForVm: 0, + UnreservedForPool: 4121, + UnreservedForVm: 4121, + OverallUsage: 0, + MaxUsage: 4121, + }, + OverallStatus: "green", + }, + Owner: types.ManagedObjectReference{Type: "ComputeResource", Value: "ha-compute-res"}, + ResourcePool: nil, + Vm: nil, + Config: types.ResourceConfigSpec{ + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "ResourcePool", Value: "ha-root-pool"}, + ChangeVersion: "", + LastModified: (*time.Time)(nil), + CpuAllocation: types.ResourceAllocationInfo{ + DynamicData: types.DynamicData{}, + Reservation: types.NewInt64(4121), + ExpandableReservation: types.NewBool(false), + Limit: types.NewInt64(4121), + Shares: &types.SharesInfo{ + DynamicData: types.DynamicData{}, + Shares: 9000, + Level: "custom", + }, + OverheadLimit: nil, + }, + MemoryAllocation: types.ResourceAllocationInfo{ + DynamicData: types.DynamicData{}, + Reservation: types.NewInt64(961), + ExpandableReservation: types.NewBool(false), + Limit: types.NewInt64(961), + Shares: &types.SharesInfo{ + DynamicData: types.DynamicData{}, + Shares: 9000, + Level: "custom", + }, + OverheadLimit: nil, + }, + }, + ChildConfiguration: nil, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/root_folder.go b/vendor/github.com/vmware/govmomi/simulator/esx/root_folder.go new file mode 100644 index 0000000000..1541de11a6 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/root_folder.go @@ -0,0 +1,77 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import ( + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +// RootFolder is the default template for the ServiceContent rootFolder property. +// Capture method: +// +// govc folder.info -dump / +var RootFolder = mo.Folder{ + ManagedEntity: mo.ManagedEntity{ + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-root"}, + Value: nil, + AvailableField: nil, + }, + Parent: (*types.ManagedObjectReference)(nil), + CustomValue: nil, + OverallStatus: "green", + ConfigStatus: "green", + ConfigIssue: nil, + EffectiveRole: []int32{-1}, + Permission: []types.Permission{ + { + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-root"}, + Principal: "vpxuser", + Group: false, + RoleId: -1, + Propagate: true, + }, + { + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-root"}, + Principal: "dcui", + Group: false, + RoleId: -1, + Propagate: true, + }, + { + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-root"}, + Principal: "root", + Group: false, + RoleId: -1, + Propagate: true, + }, + }, + Name: "ha-folder-root", + DisabledMethod: nil, + RecentTask: nil, + DeclaredAlarmState: nil, + TriggeredAlarmState: nil, + AlarmActionsEnabled: (*bool)(nil), + Tag: nil, + }, + ChildType: []string{"Datacenter"}, + ChildEntity: nil, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/service_content.go b/vendor/github.com/vmware/govmomi/simulator/esx/service_content.go new file mode 100644 index 0000000000..bb10eeaa55 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/service_content.go @@ -0,0 +1,87 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// ServiceContent is the default template for the ServiceInstance content property. +// Capture method: +// +// govc object.collect -s -dump - content +var ServiceContent = types.ServiceContent{ + RootFolder: types.ManagedObjectReference{Type: "Folder", Value: "ha-folder-root"}, + PropertyCollector: types.ManagedObjectReference{Type: "PropertyCollector", Value: "ha-property-collector"}, + ViewManager: &types.ManagedObjectReference{Type: "ViewManager", Value: "ViewManager"}, + About: types.AboutInfo{ + Name: "VMware ESXi", + FullName: "VMware ESXi 6.5.0 build-5969303", + Vendor: "VMware, Inc.", + Version: "6.5.0", + Build: "5969303", + LocaleVersion: "INTL", + LocaleBuild: "000", + OsType: "vmnix-x86", + ProductLineId: "embeddedEsx", + ApiType: "HostAgent", + ApiVersion: "6.5", + InstanceUuid: "", + LicenseProductName: "VMware ESX Server", + LicenseProductVersion: "6.0", + }, + Setting: &types.ManagedObjectReference{Type: "OptionManager", Value: "HostAgentSettings"}, + UserDirectory: &types.ManagedObjectReference{Type: "UserDirectory", Value: "ha-user-directory"}, + SessionManager: &types.ManagedObjectReference{Type: "SessionManager", Value: "ha-sessionmgr"}, + AuthorizationManager: &types.ManagedObjectReference{Type: "AuthorizationManager", Value: "ha-authmgr"}, + ServiceManager: &types.ManagedObjectReference{Type: "ServiceManager", Value: "ha-servicemanager"}, + PerfManager: &types.ManagedObjectReference{Type: "PerformanceManager", Value: "ha-perfmgr"}, + ScheduledTaskManager: (*types.ManagedObjectReference)(nil), + AlarmManager: (*types.ManagedObjectReference)(nil), + EventManager: &types.ManagedObjectReference{Type: "EventManager", Value: "ha-eventmgr"}, + TaskManager: &types.ManagedObjectReference{Type: "TaskManager", Value: "ha-taskmgr"}, + ExtensionManager: (*types.ManagedObjectReference)(nil), + CustomizationSpecManager: (*types.ManagedObjectReference)(nil), + CustomFieldsManager: (*types.ManagedObjectReference)(nil), + AccountManager: &types.ManagedObjectReference{Type: "HostLocalAccountManager", Value: "ha-localacctmgr"}, + DiagnosticManager: &types.ManagedObjectReference{Type: "DiagnosticManager", Value: "ha-diagnosticmgr"}, + LicenseManager: &types.ManagedObjectReference{Type: "LicenseManager", Value: "ha-license-manager"}, + SearchIndex: &types.ManagedObjectReference{Type: "SearchIndex", Value: "ha-searchindex"}, + FileManager: &types.ManagedObjectReference{Type: "FileManager", Value: "ha-nfc-file-manager"}, + DatastoreNamespaceManager: &types.ManagedObjectReference{Type: "DatastoreNamespaceManager", Value: "ha-datastore-namespace-manager"}, + VirtualDiskManager: &types.ManagedObjectReference{Type: "VirtualDiskManager", Value: "ha-vdiskmanager"}, + VirtualizationManager: (*types.ManagedObjectReference)(nil), + SnmpSystem: (*types.ManagedObjectReference)(nil), + VmProvisioningChecker: (*types.ManagedObjectReference)(nil), + VmCompatibilityChecker: (*types.ManagedObjectReference)(nil), + OvfManager: &types.ManagedObjectReference{Type: "OvfManager", Value: "ha-ovf-manager"}, + IpPoolManager: (*types.ManagedObjectReference)(nil), + DvSwitchManager: &types.ManagedObjectReference{Type: "DistributedVirtualSwitchManager", Value: "ha-dvsmanager"}, + HostProfileManager: (*types.ManagedObjectReference)(nil), + ClusterProfileManager: (*types.ManagedObjectReference)(nil), + ComplianceManager: (*types.ManagedObjectReference)(nil), + LocalizationManager: &types.ManagedObjectReference{Type: "LocalizationManager", Value: "ha-l10n-manager"}, + StorageResourceManager: &types.ManagedObjectReference{Type: "StorageResourceManager", Value: "ha-storage-resource-manager"}, + GuestOperationsManager: &types.ManagedObjectReference{Type: "GuestOperationsManager", Value: "ha-guest-operations-manager"}, + OverheadMemoryManager: (*types.ManagedObjectReference)(nil), + CertificateManager: (*types.ManagedObjectReference)(nil), + IoFilterManager: (*types.ManagedObjectReference)(nil), + VStorageObjectManager: &types.ManagedObjectReference{Type: "HostVStorageObjectManager", Value: "ha-vstorage-object-manager"}, + HostSpecManager: (*types.ManagedObjectReference)(nil), + CryptoManager: &types.ManagedObjectReference{Type: "CryptoManager", Value: "ha-crypto-manager"}, + HealthUpdateManager: (*types.ManagedObjectReference)(nil), + FailoverClusterConfigurator: (*types.ManagedObjectReference)(nil), + FailoverClusterManager: (*types.ManagedObjectReference)(nil), +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/setting.go b/vendor/github.com/vmware/govmomi/simulator/esx/setting.go new file mode 100644 index 0000000000..54ec6ead07 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/setting.go @@ -0,0 +1,40 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// HardwareVersion is the default VirtualMachine.Config.Version +var HardwareVersion = "vmx-13" + +// AdvancedOptions is captured from ESX's HostSystem.configManager.advancedOption +// Capture method: +// +// govc object.collect -s -dump $(govc object.collect -s HostSystem:ha-host configManager.advancedOption) setting +var AdvancedOptions = []types.BaseOptionValue{ + // This list is currently pruned to include a single option for testing + &types.OptionValue{ + Key: "Config.HostAgent.log.level", + Value: "info", + }, +} + +// Setting is captured from ESX's HostSystem.ServiceContent.setting +// Capture method: +// +// govc object.collect -s -dump OptionManager:HostAgentSettings setting +var Setting = []types.BaseOptionValue{} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/task_manager.go b/vendor/github.com/vmware/govmomi/simulator/esx/task_manager.go new file mode 100644 index 0000000000..1b09aff0bd --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/task_manager.go @@ -0,0 +1,10413 @@ +/* +Copyright (c) 2018-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// Description is the default template for the TaskManager description property. +// Capture method: +// +// govc object.collect -s -dump TaskManager:ha-taskmgr description +var Description = types.TaskDescription{ + MethodInfo: []types.BaseElementDescription{ + &types.ElementDescription{ + Description: types.Description{ + Label: "Set cluster resource custom value", + Summary: "Sets the value of a custom field for a cluster of objects as a unified compute-resource", + }, + Key: "ClusterComputeResource.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload cluster", + Summary: "Reloads the cluster", + }, + Key: "ClusterComputeResource.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename cluster", + Summary: "Rename the compute-resource", + }, + Key: "ClusterComputeResource.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove cluster", + Summary: "Deletes the cluster compute-resource and removes it from its parent folder (if any)", + }, + Key: "ClusterComputeResource.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the cluster", + }, + Key: "ClusterComputeResource.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Removes a set of tags from the cluster", + }, + Key: "ClusterComputeResource.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ClusterComputeResource.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure cluster", + Summary: "Reconfigures a cluster", + }, + Key: "ClusterComputeResource.reconfigureEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure cluster", + Summary: "Reconfigures a cluster", + }, + Key: "ClusterComputeResource.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply recommendation", + Summary: "Applies a recommendation", + }, + Key: "ClusterComputeResource.applyRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel recommendation", + Summary: "Cancels a recommendation", + }, + Key: "ClusterComputeResource.cancelRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Recommended power On hosts", + Summary: "Get recommendations for a location to power on a specific virtual machine", + }, + Key: "ClusterComputeResource.recommendHostsForVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add host", + Summary: "Adds a new host to the cluster", + }, + Key: "ClusterComputeResource.addHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add host and enable lockdown", + Summary: "Adds a new host to the cluster and enables lockdown mode on the host", + }, + Key: "ClusterComputeResource.addHostWithAdminDisabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move host into cluster", + Summary: "Moves a set of existing hosts into the cluster", + }, + Key: "ClusterComputeResource.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move host into cluster", + Summary: "Moves a host into the cluster", + }, + Key: "ClusterComputeResource.moveHostInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh recommendations", + Summary: "Refreshes the list of recommendations", + }, + Key: "ClusterComputeResource.refreshRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve EVC", + Summary: "Retrieve Enhanced vMotion Compatibility information for this cluster", + }, + Key: "ClusterComputeResource.evcManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve transitional EVC manager", + Summary: "Retrieve the transitional EVC manager for this cluster", + }, + Key: "ClusterComputeResource.transitionalEVCManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve DAS advanced runtime information", + Summary: "Retrieve DAS advanced runtime information for this cluster", + }, + Key: "ClusterComputeResource.retrieveDasAdvancedRuntimeInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve vShpere HA data for cluster", + Summary: "Retrieves HA data for a cluster", + }, + Key: "ClusterComputeResource.retrieveDasData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check VM admission in vSphere HA cluster", + Summary: "Checks if HA admission control allows a set of virtual machines to be powered on in the cluster", + }, + Key: "ClusterComputeResource.checkDasAdmission", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check cluster for vSphere HA configuration", + Summary: "Check how the specified HA config will affect the cluster state if high availability is enabled", + }, + Key: "ClusterComputeResource.checkReconfigureDas", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "checkReconfigureDasVmcp", + Summary: "checkReconfigureDasVmcp", + }, + Key: "ClusterComputeResource.checkReconfigureDasVmcp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DRS recommends hosts to evacuate", + Summary: "DRS recommends hosts to evacuate", + }, + Key: "ClusterComputeResource.enterMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find Fault Tolerance compatible hosts for placing secondary VM", + Summary: "Find the set of Fault Tolerance compatible hosts for placing secondary of a given primary virtual machine", + }, + Key: "ClusterComputeResource.queryFaultToleranceCompatibleHosts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find Fault Tolerance compatible datastores for a VM", + Summary: "Find the set of Fault Tolerance compatible datastores for a given virtual machine", + }, + Key: "ClusterComputeResource.queryFaultToleranceCompatibleDatastores", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Verify FaultToleranceConfigSpec", + Summary: "Verify whether a given FaultToleranceConfigSpec satisfies the requirements for Fault Tolerance", + }, + Key: "ClusterComputeResource.verifyFaultToleranceConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check Fault Tolerance compatibility for VM", + Summary: "Check whether a VM is compatible for turning on Fault Tolerance", + }, + Key: "ClusterComputeResource.queryCompatibilityForFaultTolerance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Call DRS for cross vMotion placement recommendations", + Summary: "Calls vSphere DRS for placement recommendations when migrating a VM across vCenter Server instances and virtual switches", + }, + Key: "ClusterComputeResource.placeVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find rules for VM", + Summary: "Locates all affinity and anti-affinity rules the specified VM participates in", + }, + Key: "ClusterComputeResource.findRulesForVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "stampAllRulesWithUuid", + Summary: "stampAllRulesWithUuid", + }, + Key: "ClusterComputeResource.stampAllRulesWithUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getResourceUsage", + Summary: "getResourceUsage", + }, + Key: "ClusterComputeResource.getResourceUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryDrmDumpHistory", + Summary: "queryDrmDumpHistory", + }, + Key: "ClusterComputeResource.queryDrmDumpHistory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateDrmBundle", + Summary: "generateDrmBundle", + }, + Key: "ClusterComputeResource.generateDrmBundle", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set datastore cluster custom value", + Summary: "Sets the value of a custom field of a datastore cluster", + }, + Key: "StoragePod.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload datastore cluster", + Summary: "Reloads the datastore cluster", + }, + Key: "StoragePod.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename a datastore cluster", + Summary: "Rename a datastore cluster", + }, + Key: "StoragePod.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove a datastore cluster", + Summary: "Remove a datastore cluster", + }, + Key: "StoragePod.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tags to datastore cluster", + Summary: "Adds a set of tags to a datastore cluster", + }, + Key: "StoragePod.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tags from datastore cluster", + Summary: "Removes a set of tags from a datastore cluster", + }, + Key: "StoragePod.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "StoragePod.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create folder", + Summary: "Creates a new folder", + }, + Key: "StoragePod.createFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move datastores into a datastore cluster", + Summary: "Move datastores into a datastore cluster", + }, + Key: "StoragePod.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a new virtual machine", + }, + Key: "StoragePod.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to this datastore cluster", + }, + Key: "StoragePod.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Creates a new cluster compute-resource in this datastore cluster", + }, + Key: "StoragePod.createCluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Creates a new cluster compute-resource in this datastore cluster", + }, + Key: "StoragePod.createClusterEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host", + Summary: "Creates a new single-host compute-resource", + }, + Key: "StoragePod.addStandaloneHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host and enable lockdown mode", + Summary: "Creates a new single-host compute-resource and enables lockdown mode on the host", + }, + Key: "StoragePod.addStandaloneHostWithAdminDisabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create datacenter", + Summary: "Create a new datacenter with the given name", + }, + Key: "StoragePod.createDatacenter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister and delete", + Summary: "Recursively deletes all child virtual machine folders and unregisters all virtual machines", + }, + Key: "StoragePod.unregisterAndDestroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vSphere Distributed Switch", + Summary: "Creates a vSphere Distributed Switch", + }, + Key: "StoragePod.createDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create datastore cluster", + Summary: "Creates a new datastore cluster", + }, + Key: "StoragePod.createStoragePod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch set custom value", + Summary: "vSphere Distributed Switch set custom value", + }, + Key: "DistributedVirtualSwitch.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch reload", + Summary: "vSphere Distributed Switch reload", + }, + Key: "DistributedVirtualSwitch.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename vSphere Distributed Switch", + Summary: "Rename vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete vSphere Distributed Switch", + Summary: "Delete vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch add tag", + Summary: "vSphere Distributed Switch add tag", + }, + Key: "DistributedVirtualSwitch.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch remove tag", + Summary: "vSphere Distributed Switch remove tag", + }, + Key: "DistributedVirtualSwitch.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "DistributedVirtualSwitch.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPort keys", + Summary: "Retrieve dvPort keys", + }, + Key: "DistributedVirtualSwitch.fetchPortKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPorts", + Summary: "Retrieve dvPorts", + }, + Key: "DistributedVirtualSwitch.fetchPorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSphere Distributed Switch used virtual LAN ID", + Summary: "Query vSphere Distributed Switch used virtual LAN ID", + }, + Key: "DistributedVirtualSwitch.queryUsedVlanId", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere Distributed Switch", + Summary: "Reconfigure vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch product specification operation", + Summary: "vSphere Distributed Switch product specification operation", + }, + Key: "DistributedVirtualSwitch.performProductSpecOperation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Merge vSphere Distributed Switches", + Summary: "Merge vSphere Distributed Switches", + }, + Key: "DistributedVirtualSwitch.merge", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Group", + Summary: "Add Distributed Port Group", + }, + Key: "DistributedVirtualSwitch.addPortgroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move dvPorts", + Summary: "Move dvPorts", + }, + Key: "DistributedVirtualSwitch.movePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch capability", + Summary: "Update vSphere Distributed Switch capability", + }, + Key: "DistributedVirtualSwitch.updateCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure dvPort", + Summary: "Reconfigure dvPort", + }, + Key: "DistributedVirtualSwitch.reconfigurePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh dvPort state", + Summary: "Refresh dvPort state", + }, + Key: "DistributedVirtualSwitch.refreshPortState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rectify host in vSphere Distributed Switch", + Summary: "Rectify host in vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.rectifyHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network resource pools on vSphere Distributed Switch", + Summary: "Update network resource pools on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.updateNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add network resource pools on vSphere Distributed Switch", + Summary: "Add network resource pools on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.addNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove network resource pools on vSphere Distributed Switch", + Summary: "Remove network resource pools on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.removeNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure a network resource pool on a distributed switch", + Summary: "Reconfigures the network resource pool on a distributed switch", + }, + Key: "DistributedVirtualSwitch.reconfigureVmVnicNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network I/O control on vSphere Distributed Switch", + Summary: "Update network I/O control on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.enableNetworkResourceManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get vSphere Distributed Switch configuration spec to rollback", + Summary: "Get vSphere Distributed Switch configuration spec to rollback", + }, + Key: "DistributedVirtualSwitch.rollback", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Group", + Summary: "Add Distributed Port Group", + }, + Key: "DistributedVirtualSwitch.addPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update health check configuration on vSphere Distributed Switch", + Summary: "Update health check configuration on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.updateHealthCheckConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Look up portgroup based on portgroup key", + Summary: "Look up portgroup based on portgroup key", + }, + Key: "DistributedVirtualSwitch.lookupPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set datacenter custom value", + Summary: "Sets the value of a custom field of a datacenter", + }, + Key: "Datacenter.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload datacenter", + Summary: "Reloads the datacenter", + }, + Key: "Datacenter.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename datacenter", + Summary: "Rename the datacenter", + }, + Key: "Datacenter.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datacenter", + Summary: "Deletes the datacenter and removes it from its parent folder (if any)", + }, + Key: "Datacenter.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the datacenter", + }, + Key: "Datacenter.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the datacenter", + }, + Key: "Datacenter.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Datacenter.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query connection information", + Summary: "Gets information of a host that can be used in the connection wizard", + }, + Key: "Datacenter.queryConnectionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryConnectionInfoViaSpec", + Summary: "queryConnectionInfoViaSpec", + }, + Key: "Datacenter.queryConnectionInfoViaSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initialize powering On", + Summary: "Initialize tasks for powering on virtual machines", + }, + Key: "Datacenter.powerOnVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration option descriptor", + Summary: "Retrieve the list of configuration option keys available in this datacenter", + }, + Key: "Datacenter.queryConfigOptionDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure datacenter", + Summary: "Reconfigures the datacenter", + }, + Key: "Datacenter.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual machine custom value", + Summary: "Sets the value of a custom field of a virtual machine", + }, + Key: "VirtualMachine.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload virtual machine", + Summary: "Reloads the virtual machine", + }, + Key: "VirtualMachine.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename virtual machine", + Summary: "Rename the virtual machine", + }, + Key: "VirtualMachine.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual machine", + Summary: "Delete this virtual machine. Deleting this virtual machine also deletes its contents and removes it from its parent folder (if any).", + }, + Key: "VirtualMachine.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Tag", + Summary: "Add a set of tags to the virtual machine", + }, + Key: "VirtualMachine.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the virtual machine", + }, + Key: "VirtualMachine.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "VirtualMachine.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh virtual machine storage information", + Summary: "Refresh storage information for the virtual machine", + }, + Key: "VirtualMachine.refreshStorageInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve virtual machine backup agent", + Summary: "Retrieves the backup agent for the virtual machine", + }, + Key: "VirtualMachine.retrieveBackupAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine snapshot", + Summary: "Create a new snapshot of this virtual machine", + }, + Key: "VirtualMachine.createSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine snapshot", + Summary: "Create a new snapshot of this virtual machine", + }, + Key: "VirtualMachine.createSnapshotEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Revert to current snapshot", + Summary: "Reverts the virtual machine to the current snapshot", + }, + Key: "VirtualMachine.revertToCurrentSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove all snapshots", + Summary: "Remove all the snapshots associated with this virtual machine", + }, + Key: "VirtualMachine.removeAllSnapshots", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Consolidate virtual machine disk files", + Summary: "Consolidate disk files of this virtual machine", + }, + Key: "VirtualMachine.consolidateDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Estimate virtual machine disks consolidation space requirement", + Summary: "Estimate the temporary space required to consolidate disk files.", + }, + Key: "VirtualMachine.estimateStorageRequirementForConsolidate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure virtual machine", + Summary: "Reconfigure this virtual machine", + }, + Key: "VirtualMachine.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade VM compatibility", + Summary: "Upgrade virtual machine compatibility to the latest version", + }, + Key: "VirtualMachine.upgradeVirtualHardware", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extract OVF environment", + Summary: "Returns the XML document that represents the OVF environment", + }, + Key: "VirtualMachine.extractOvfEnvironment", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power On virtual machine", + Summary: "Power On this virtual machine", + }, + Key: "VirtualMachine.powerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power Off virtual machine", + Summary: "Power Off this virtual machine", + }, + Key: "VirtualMachine.powerOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend virtual machine", + Summary: "Suspend virtual machine", + }, + Key: "VirtualMachine.suspend", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset virtual machine", + Summary: "Reset this virtual machine", + }, + Key: "VirtualMachine.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate guest OS shutdown", + Summary: "Issues a command to the guest operating system to perform a clean shutdown of all services", + }, + Key: "VirtualMachine.shutdownGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate guest OS reboot", + Summary: "Issues a command to the guest operating system asking it to perform a reboot", + }, + Key: "VirtualMachine.rebootGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate guest OS standby", + Summary: "Issues a command to the guest operating system to prepare for a suspend operation", + }, + Key: "VirtualMachine.standbyGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Answer virtual machine question", + Summary: "Respond to a question that is blocking this virtual machine", + }, + Key: "VirtualMachine.answer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Customize virtual machine guest OS", + Summary: "Customize a virtual machine's guest operating system", + }, + Key: "VirtualMachine.customize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check customization specification", + Summary: "Check the customization specification against the virtual machine configuration", + }, + Key: "VirtualMachine.checkCustomizationSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Migrate virtual machine", + Summary: "Migrate a virtual machine's execution to a specific resource pool or host", + }, + Key: "VirtualMachine.migrate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate virtual machine", + Summary: "Relocate the virtual machine to a specific location", + }, + Key: "VirtualMachine.relocate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone virtual machine", + Summary: "Creates a clone of this virtual machine", + }, + Key: "VirtualMachine.clone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "instantClone", + Summary: "instantClone", + }, + Key: "VirtualMachine.instantClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveInstantCloneChildren", + Summary: "retrieveInstantCloneChildren", + }, + Key: "VirtualMachine.retrieveInstantCloneChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveInstantCloneParent", + Summary: "retrieveInstantCloneParent", + }, + Key: "VirtualMachine.retrieveInstantCloneParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "markAsInstantCloneParent", + Summary: "markAsInstantCloneParent", + }, + Key: "VirtualMachine.markAsInstantCloneParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unmarkAsInstantCloneParent", + Summary: "unmarkAsInstantCloneParent", + }, + Key: "VirtualMachine.unmarkAsInstantCloneParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "createForkChild", + Summary: "createForkChild", + }, + Key: "VirtualMachine.createForkChild", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "enableForkParent", + Summary: "enableForkParent", + }, + Key: "VirtualMachine.enableForkParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "disableForkParent", + Summary: "disableForkParent", + }, + Key: "VirtualMachine.disableForkParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveForkChildren", + Summary: "retrieveForkChildren", + }, + Key: "VirtualMachine.retrieveForkChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveForkParent", + Summary: "retrieveForkParent", + }, + Key: "VirtualMachine.retrieveForkParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the virtual machine as an OVF template", + }, + Key: "VirtualMachine.exportVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark virtual machine as template", + Summary: "Virtual machine is marked as a template", + }, + Key: "VirtualMachine.markAsTemplate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark as virtual machine", + Summary: "Reassociate a virtual machine with a host or resource pool", + }, + Key: "VirtualMachine.markAsVirtualMachine", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister virtual machine", + Summary: "Removes this virtual machine from the inventory without removing any of the virtual machine files on disk", + }, + Key: "VirtualMachine.unregister", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset guest OS information", + Summary: "Clears cached guest OS information", + }, + Key: "VirtualMachine.resetGuestInformation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiated VMware Tools Installer Mount", + Summary: "Mounts the tools CD installer as a CD-ROM for the guest", + }, + Key: "VirtualMachine.mountToolsInstaller", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Connect VMware Tools CD", + Summary: "Connects the VMware Tools CD image to the guest", + }, + Key: "VirtualMachine.mountToolsInstallerImage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount tools installer", + Summary: "Unmounts the tools installer", + }, + Key: "VirtualMachine.unmountToolsInstaller", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiated VMware Tools install or upgrade", + Summary: "Issues a command to the guest operating system to install VMware Tools or upgrade to the latest revision", + }, + Key: "VirtualMachine.upgradeTools", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiated VMware Tools upgrade", + Summary: "Upgrades VMware Tools in the virtual machine from specified CD image", + }, + Key: "VirtualMachine.upgradeToolsFromImage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire virtual machine Mouse Keyboard Screen Ticket", + Summary: "Establishing a Mouse Keyboard Screen Ticket", + }, + Key: "VirtualMachine.acquireMksTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire virtual machine service ticket", + Summary: "Establishing a specific remote virtual machine connection ticket", + }, + Key: "VirtualMachine.acquireTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set console window screen resolution", + Summary: "Sets the console window's resolution as specified", + }, + Key: "VirtualMachine.setScreenResolution", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Defragment all disks", + Summary: "Defragment all virtual disks attached to this virtual machine", + }, + Key: "VirtualMachine.defragmentAllDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn On Fault Tolerance", + Summary: "Secondary VM created", + }, + Key: "VirtualMachine.createSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn On Fault Tolerance", + Summary: "Creates a secondary VM", + }, + Key: "VirtualMachine.createSecondaryEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn Off Fault Tolerance", + Summary: "Remove all secondaries for this virtual machine and turn off Fault Tolerance", + }, + Key: "VirtualMachine.turnOffFaultTolerance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Test failover", + Summary: "Test Fault Tolerance failover by making a Secondary VM in a Fault Tolerance pair the Primary VM", + }, + Key: "VirtualMachine.makePrimary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Test restarting Secondary VM", + Summary: "Test restart Secondary VM by stopping a Secondary VM in the Fault Tolerance pair", + }, + Key: "VirtualMachine.terminateFaultTolerantVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend Fault Tolerance", + Summary: "Suspend Fault Tolerance on this virtual machine", + }, + Key: "VirtualMachine.disableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resume Fault Tolerance", + Summary: "Resume Fault Tolerance on this virtual machine", + }, + Key: "VirtualMachine.enableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual machine display topology", + Summary: "Set the display topology for the virtual machine", + }, + Key: "VirtualMachine.setDisplayTopology", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start recording", + Summary: "Start a recording session on this virtual machine", + }, + Key: "VirtualMachine.startRecording", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop recording", + Summary: "Stop a currently active recording session on this virtual machine", + }, + Key: "VirtualMachine.stopRecording", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start replaying", + Summary: "Start a replay session on this virtual machine", + }, + Key: "VirtualMachine.startReplaying", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop replaying", + Summary: "Stop a replay session on this virtual machine", + }, + Key: "VirtualMachine.stopReplaying", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Promote virtual machine disks", + Summary: "Promote disks of the virtual machine that have delta disk backings", + }, + Key: "VirtualMachine.promoteDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Take virtual machine screenshot", + Summary: "Take a screenshot of a virtual machine's guest OS console", + }, + Key: "VirtualMachine.createScreenshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Put USB HID scan codes", + Summary: "Injects a sequence of USB HID scan codes into the keyboard", + }, + Key: "VirtualMachine.putUsbScanCodes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine disk changes", + Summary: "Query for changes to the virtual machine's disks since a given point in the past", + }, + Key: "VirtualMachine.queryChangedDiskAreas", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query unowned virtual machine files", + Summary: "Query files of the virtual machine not owned by the datastore principal user", + }, + Key: "VirtualMachine.queryUnownedFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload virtual machine from new configuration", + Summary: "Reloads the virtual machine from a new configuration file", + }, + Key: "VirtualMachine.reloadFromPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query Virtual Machine Fault Tolerance Compatibility", + Summary: "Check if virtual machine is compatible for Fault Tolerance", + }, + Key: "VirtualMachine.queryFaultToleranceCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFaultToleranceCompatibilityEx", + Summary: "queryFaultToleranceCompatibilityEx", + }, + Key: "VirtualMachine.queryFaultToleranceCompatibilityEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend and resume the virtual machine", + Summary: "Suspend and resume the virtual machine", + }, + Key: "VirtualMachine.invokeFSR", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Hard stop virtual machine", + Summary: "Hard stop virtual machine", + }, + Key: "VirtualMachine.terminate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get native clone capability", + Summary: "Check if native clone is supported on the virtual machine", + }, + Key: "VirtualMachine.isNativeSnapshotCapable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure quorum file path prefix", + Summary: "Configures the quorum file path prefix for the virtual machine", + }, + Key: "VirtualMachine.configureQuorumFilePathPrefix", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve quorum file path prefix", + Summary: "Retrieves the quorum file path prefix for the virtual machine", + }, + Key: "VirtualMachine.retrieveQuorumFilePathPrefix", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inject OVF Environment into virtual machine", + Summary: "Specifies the OVF Environments to be injected into and returned for a virtual machine", + }, + Key: "VirtualMachine.injectOvfEnvironment", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Wipe a Flex-SE virtual disk", + Summary: "Wipes a Flex-SE virtual disk", + }, + Key: "VirtualMachine.wipeDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Shrink a Flex-SE virtual disk", + Summary: "Shrinks a Flex-SE virtual disk", + }, + Key: "VirtualMachine.shrinkDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send NMI", + Summary: "Sends a non-maskable interrupt (NMI) to the virtual machine", + }, + Key: "VirtualMachine.sendNMI", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload virtual machine", + Summary: "Reloads the virtual machine", + }, + Key: "VirtualMachine.reloadEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach a virtual disk", + Summary: "Attach an existing virtual disk to the virtual machine", + }, + Key: "VirtualMachine.attachDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach a virtual disk", + Summary: "Detach a virtual disk from the virtual machine", + }, + Key: "VirtualMachine.detachDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply EVC Mode", + Summary: "Apply EVC Mode to a virtual machine", + }, + Key: "VirtualMachine.applyEvcMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set vApp custom value", + Summary: "Sets the value of a custom field on a vApp", + }, + Key: "VirtualApp.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload vApp", + Summary: "Reload the vApp", + }, + Key: "VirtualApp.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename vApp", + Summary: "Rename the vApp", + }, + Key: "VirtualApp.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete vApp", + Summary: "Delete the vApp, including all child vApps and virtual machines", + }, + Key: "VirtualApp.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the vApp", + }, + Key: "VirtualApp.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the vApp", + }, + Key: "VirtualApp.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "VirtualApp.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vApp resource configuration", + Summary: "Updates the resource configuration for the vApp", + }, + Key: "VirtualApp.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move into vApp", + Summary: "Moves a set of entities into this vApp", + }, + Key: "VirtualApp.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update child resource configuration", + Summary: "Change resource configuration of a set of children of the vApp", + }, + Key: "VirtualApp.updateChildResourceConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create resource pool", + Summary: "Creates a new resource pool", + }, + Key: "VirtualApp.createResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete vApp children", + Summary: "Deletes all child resource pools recursively", + }, + Key: "VirtualApp.destroyChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vApp", + Summary: "Creates a child vApp of this vApp", + }, + Key: "VirtualApp.createVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a virtual machine in this vApp", + }, + Key: "VirtualApp.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to this vApp", + }, + Key: "VirtualApp.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys a virtual machine or vApp", + }, + Key: "VirtualApp.importVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query Virtual App resource configuration options", + Summary: "Returns configuration options for a set of resources for a Virtual App", + }, + Key: "VirtualApp.queryResourceConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh Virtual App runtime information", + Summary: "Refreshes the resource usage runtime information for a Virtual App", + }, + Key: "VirtualApp.refreshRuntime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vApp Configuration", + Summary: "Updates the vApp configuration", + }, + Key: "VirtualApp.updateVAppConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update linked children", + Summary: "Updates the list of linked children", + }, + Key: "VirtualApp.updateLinkedChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone vApp", + Summary: "Clone the vApp, including all child entities", + }, + Key: "VirtualApp.clone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the vApp as an OVF template", + }, + Key: "VirtualApp.exportVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start vApp", + Summary: "Starts the vApp", + }, + Key: "VirtualApp.powerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop vApp", + Summary: "Stops the vApp", + }, + Key: "VirtualApp.powerOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend vApp", + Summary: "Suspends the vApp", + }, + Key: "VirtualApp.suspend", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister vApp", + Summary: "Unregister all child virtual machines and remove the vApp", + }, + Key: "VirtualApp.unregister", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set a custom property to an opaque network", + Summary: "Sets the value of a custom field of an opaque network", + }, + Key: "OpaqueNetwork.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload an opaque network", + Summary: "Reloads the information about the opaque network", + }, + Key: "OpaqueNetwork.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename an opaque network", + Summary: "Renames an opaque network", + }, + Key: "OpaqueNetwork.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete opaque network", + Summary: "Deletes an opaque network if it is not used by any host or virtual machine", + }, + Key: "OpaqueNetwork.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add a tag to an opaque network", + Summary: "Adds a set of tags to the opaque network", + }, + Key: "OpaqueNetwork.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove a tag from an opaque network", + Summary: "Removes a set of tags from the opaque network", + }, + Key: "OpaqueNetwork.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "OpaqueNetwork.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove an opaque network", + Summary: "Removes an opaque network", + }, + Key: "OpaqueNetwork.destroyNetwork", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set network custom Value", + Summary: "Sets the value of a custom field of a network", + }, + Key: "Network.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload network", + Summary: "Reload information about the network", + }, + Key: "Network.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename network", + Summary: "Rename network", + }, + Key: "Network.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete network", + Summary: "Deletes a network if it is not used by any host or virtual machine", + }, + Key: "Network.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the network", + }, + Key: "Network.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the network", + }, + Key: "Network.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Network.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove network", + Summary: "Remove network", + }, + Key: "Network.destroyNetwork", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add role", + Summary: "Add a new role", + }, + Key: "AuthorizationManager.addRole", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove role", + Summary: "Remove a role", + }, + Key: "AuthorizationManager.removeRole", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update role", + Summary: "Update a role's name and/or privileges", + }, + Key: "AuthorizationManager.updateRole", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reassign permissions", + Summary: "Reassign all permissions of a role to another role", + }, + Key: "AuthorizationManager.mergePermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get role permissions", + Summary: "Gets all the permissions that use a particular role", + }, + Key: "AuthorizationManager.retrieveRolePermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get entity permissions", + Summary: "Get permissions defined on an entity", + }, + Key: "AuthorizationManager.retrieveEntityPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get permissions", + Summary: "Get the permissions defined for all users", + }, + Key: "AuthorizationManager.retrieveAllPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrievePermissions", + Summary: "retrievePermissions", + }, + Key: "AuthorizationManager.retrievePermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set entity permission rules", + Summary: "Define or update permission rules on an entity", + }, + Key: "AuthorizationManager.setEntityPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset entity permission rules", + Summary: "Reset permission rules on an entity to the provided set", + }, + Key: "AuthorizationManager.resetEntityPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove entity permission", + Summary: "Remove a permission rule from the entity", + }, + Key: "AuthorizationManager.removeEntityPermission", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query disabled methods", + Summary: "Get the list of source objects that have been disabled on the target entity", + }, + Key: "AuthorizationManager.queryDisabledMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable authorization methods", + Summary: "Gets the set of method names to be disabled", + }, + Key: "AuthorizationManager.disableMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable authorization methods", + Summary: "Gets the set of method names to be enabled", + }, + Key: "AuthorizationManager.enableMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check privileges on a managed entity", + Summary: "Checks whether a session holds a set of privileges on a managed entity", + }, + Key: "AuthorizationManager.hasPrivilegeOnEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check privileges on a set of managed entities", + Summary: "Checks whether a session holds a set of privileges on a set of managed entities", + }, + Key: "AuthorizationManager.hasPrivilegeOnEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "hasUserPrivilegeOnEntities", + Summary: "hasUserPrivilegeOnEntities", + }, + Key: "AuthorizationManager.hasUserPrivilegeOnEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "fetchUserPrivilegeOnEntities", + Summary: "fetchUserPrivilegeOnEntities", + }, + Key: "AuthorizationManager.fetchUserPrivilegeOnEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check method invocation privileges", + Summary: "Checks whether a session holds a set of privileges required to invoke a specified method", + }, + Key: "AuthorizationManager.checkMethodInvocation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query required permissions", + Summary: "Get the permission requirements for the specified request", + }, + Key: "AuthorizationManager.queryPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "performUpgradePreflightCheck", + Summary: "performUpgradePreflightCheck", + }, + Key: "VsanUpgradeSystem.performUpgradePreflightCheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryUpgradeStatus", + Summary: "queryUpgradeStatus", + }, + Key: "VsanUpgradeSystem.queryUpgradeStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "performUpgrade", + Summary: "performUpgrade", + }, + Key: "VsanUpgradeSystem.performUpgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual disk", + Summary: "Create the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.createVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual disk", + Summary: "Delete the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.deleteVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk information", + Summary: "Queries information about a virtual disk", + }, + Key: "VirtualDiskManager.queryVirtualDiskInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move virtual disk", + Summary: "Move the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.moveVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy virtual disk", + Summary: "Copy the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.copyVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend virtual disk", + Summary: "Expand the capacity of a virtual disk to the new capacity", + }, + Key: "VirtualDiskManager.extendVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk fragmentation", + Summary: "Return the percentage of fragmentation of the sparse virtual disk", + }, + Key: "VirtualDiskManager.queryVirtualDiskFragmentation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Defragment virtual disk", + Summary: "Defragment a sparse virtual disk", + }, + Key: "VirtualDiskManager.defragmentVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Shrink virtual disk", + Summary: "Shrink a sparse virtual disk", + }, + Key: "VirtualDiskManager.shrinkVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inflate virtual disk", + Summary: "Inflate a sparse virtual disk up to the full size", + }, + Key: "VirtualDiskManager.inflateVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Zero out virtual disk", + Summary: "Explicitly zero out the virtual disk.", + }, + Key: "VirtualDiskManager.eagerZeroVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fill virtual disk", + Summary: "Overwrite all blocks of the virtual disk with zeros", + }, + Key: "VirtualDiskManager.zeroFillVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Optimally eager zero the virtual disk", + Summary: "Optimally eager zero a VMFS thick virtual disk.", + }, + Key: "VirtualDiskManager.optimizeEagerZeroVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual disk UUID", + Summary: "Set the UUID for the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.setVirtualDiskUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk UUID", + Summary: "Get the virtual disk SCSI inquiry page data", + }, + Key: "VirtualDiskManager.queryVirtualDiskUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk geometry", + Summary: "Get the disk geometry information for the virtual disk", + }, + Key: "VirtualDiskManager.queryVirtualDiskGeometry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reparent disks", + Summary: "Reparent disks", + }, + Key: "VirtualDiskManager.reparentDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a child disk", + Summary: "Create a new disk and attach it to the end of disk chain specified", + }, + Key: "VirtualDiskManager.createChildDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "revertToChildDisk", + Summary: "revertToChildDisk", + }, + Key: "VirtualDiskManager.revertToChildDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Consolidate disks", + Summary: "Consolidate a list of disks to the parent most disk", + }, + Key: "VirtualDiskManager.consolidateDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "importUnmanagedSnapshot", + Summary: "importUnmanagedSnapshot", + }, + Key: "VirtualDiskManager.importUnmanagedSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "releaseManagedSnapshot", + Summary: "releaseManagedSnapshot", + }, + Key: "VirtualDiskManager.releaseManagedSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "enableUPIT", + Summary: "enableUPIT", + }, + Key: "VirtualDiskManager.enableUPIT", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "disableUPIT", + Summary: "disableUPIT", + }, + Key: "VirtualDiskManager.disableUPIT", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryObjectInfo", + Summary: "queryObjectInfo", + }, + Key: "VirtualDiskManager.queryObjectInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryObjectTypes", + Summary: "queryObjectTypes", + }, + Key: "VirtualDiskManager.queryObjectTypes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure Storage I/O Control on datastore", + Summary: "Configure Storage I/O Control on datastore", + }, + Key: "StorageResourceManager.ConfigureDatastoreIORM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure Storage I/O Control on datastore", + Summary: "Configure Storage I/O Control on datastore", + }, + Key: "StorageResourceManager.ConfigureDatastoreIORMOnHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query Storage I/O Control configuration options", + Summary: "Query Storage I/O Control configuration options", + }, + Key: "StorageResourceManager.QueryIORMConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get storage I/O resource management device model", + Summary: "Returns the device model computed for a given datastore by storage DRS", + }, + Key: "StorageResourceManager.GetStorageIORMDeviceModel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore performance summary", + Summary: "Query datastore performance metrics in summary form", + }, + Key: "StorageResourceManager.queryDatastorePerformanceSummary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply a Storage DRS recommendation", + Summary: "Apply a Storage DRS recommendation", + }, + Key: "StorageResourceManager.applyRecommendationToPod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply Storage DRS recommendations", + Summary: "Apply Storage DRS recommendations", + }, + Key: "StorageResourceManager.applyRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel storage DRS recommendation", + Summary: "Cancels a storage DRS recommendation", + }, + Key: "StorageResourceManager.cancelRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh storage DRS recommendation", + Summary: "Refreshes the storage DRS recommendations on the specified datastore cluster", + }, + Key: "StorageResourceManager.refreshRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "refreshRecommendationsForPod", + Summary: "refreshRecommendationsForPod", + }, + Key: "StorageResourceManager.refreshRecommendationsForPod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure Storage DRS", + Summary: "Configure Storage DRS on a datastore cluster", + }, + Key: "StorageResourceManager.configureStorageDrsForPod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Invoke storage DRS for placement recommendations", + Summary: "Invokes storage DRS for placement recommendations", + }, + Key: "StorageResourceManager.recommendDatastores", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rankForPlacement", + Summary: "rankForPlacement", + }, + Key: "StorageResourceManager.rankForPlacement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryStorageStatisticsByProfile", + Summary: "queryStorageStatisticsByProfile", + }, + Key: "StorageResourceManager.queryStorageStatisticsByProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute client service", + Summary: "Execute the client service", + }, + Key: "SimpleCommand.Execute", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update global message", + Summary: "Updates the system global message", + }, + Key: "SessionManager.updateMessage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by token", + Summary: "Logs on to the server through token representing principal identity", + }, + Key: "SessionManager.loginByToken", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login", + Summary: "Create a login session", + }, + Key: "SessionManager.login", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by SSPI", + Summary: "Log on to the server using SSPI passthrough authentication", + }, + Key: "SessionManager.loginBySSPI", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by SSL thumbprint", + Summary: "Log on to the server using SSL thumbprint authentication", + }, + Key: "SessionManager.loginBySSLThumbprint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by session ticket", + Summary: "Log on to the server using a session ticket", + }, + Key: "SessionManager.loginBySessionTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire session ticket", + Summary: "Acquire a ticket for authenticating to a remote service", + }, + Key: "SessionManager.acquireSessionTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Logout", + Summary: "Logout and end the current session", + }, + Key: "SessionManager.logout", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire local ticket", + Summary: "Acquire one-time ticket for authenticating server-local client", + }, + Key: "SessionManager.acquireLocalTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire generic service ticket", + Summary: "Acquire a one-time credential that may be used to make the specified request", + }, + Key: "SessionManager.acquireGenericServiceTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Terminate session", + Summary: "Logout and end the provided list of sessions", + }, + Key: "SessionManager.terminate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set locale", + Summary: "Set the session locale for determining the languages used for messages and formatting data", + }, + Key: "SessionManager.setLocale", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login extension", + Summary: "Creates a privileged login session for an extension", + }, + Key: "SessionManager.loginExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login extension", + Summary: "Invalid subject name", + }, + Key: "SessionManager.loginExtensionBySubjectName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login extension by certificate", + Summary: "Login extension by certificate", + }, + Key: "SessionManager.loginExtensionByCertificate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Impersonate user", + Summary: "Convert session to impersonate specified user", + }, + Key: "SessionManager.impersonateUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Session active query", + Summary: "Validates that a currently active session exists", + }, + Key: "SessionManager.sessionIsActive", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire clone ticket", + Summary: "Acquire a session-specific ticket string that can be used to clone the current session", + }, + Key: "SessionManager.acquireCloneTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone session", + Summary: "Clone the specified session and associate it with the current connection", + }, + Key: "SessionManager.cloneSession", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add end point", + Summary: "Add a service whose connections are to be proxied", + }, + Key: "ProxyService.addEndpoint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove end point", + Summary: "End point to be detached", + }, + Key: "ProxyService.removeEndpoint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate host for OVF package compatibility", + Summary: "Validates if a host is compatible with the requirements in an OVF package", + }, + Key: "OvfManager.validateHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Parse OVF descriptor", + Summary: "Parses and validates an OVF descriptor", + }, + Key: "OvfManager.parseDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert OVF descriptor", + Summary: "Convert OVF descriptor to entity specification", + }, + Key: "OvfManager.createImportSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create an OVF descriptor", + Summary: "Creates an OVF descriptor from either a VM or vApp", + }, + Key: "OvfManager.createDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Parse OVF Descriptor at URL", + Summary: "Parses and validates an OVF descriptor at a given URL", + }, + Key: "OvfManager.parseDescriptorAtUrl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys an OVF template from a URL", + }, + Key: "OvfManager.importOvfAtUrl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export as OVF template", + Summary: "Uploads OVF template to a remote server", + }, + Key: "OvfManager.exportOvfToUrl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download overhead computation script", + Summary: "Download overhead computation scheme script", + }, + Key: "OverheadService.downloadScript", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download host configuration", + Summary: "Download host configuration consumed by overhead computation script", + }, + Key: "OverheadService.downloadHostConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download VM configuration", + Summary: "Download VM configuration consumed by overhead computation script", + }, + Key: "OverheadService.downloadVMXConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "lookupVmOverheadMemory", + Summary: "lookupVmOverheadMemory", + }, + Key: "OverheadMemoryManager.lookupVmOverheadMemory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open remote disk for read/write", + Summary: "Opens a disk on a virtual machine for read/write access", + }, + Key: "NfcService.randomAccessOpen", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open remote disk for read", + Summary: "Opens a disk on a virtual machine for read access", + }, + Key: "NfcService.randomAccessOpenReadonly", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "randomAccessFileOpen", + Summary: "randomAccessFileOpen", + }, + Key: "NfcService.randomAccessFileOpen", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read virtual machine files", + Summary: "Read files associated with a virtual machine", + }, + Key: "NfcService.getVmFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Write virtual machine files", + Summary: "Write files associated with a virtual machine", + }, + Key: "NfcService.putVmFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Manipulate file paths", + Summary: "Permission to manipulate file paths", + }, + Key: "NfcService.fileManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Manipulate system-related file paths", + Summary: "Permission to manipulate all system related file paths", + }, + Key: "NfcService.systemManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getServerNfcLibVersion", + Summary: "getServerNfcLibVersion", + }, + Key: "NfcService.getServerNfcLibVersion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve associated License Data objects", + Summary: "Retrieves all the associated License Data objects", + }, + Key: "LicenseDataManager.queryEntityLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve license data associated with managed entity", + Summary: "Retrieves the license data associated with a specified managed entity", + }, + Key: "LicenseDataManager.queryAssociatedLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update entity license container", + Summary: "Updates the license container associated with a specified managed entity", + }, + Key: "LicenseDataManager.updateAssociatedLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply associated license data to managed entity", + Summary: "Applies associated license data to a managed entity", + }, + Key: "LicenseDataManager.applyAssociatedLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query network protocol profiles", + Summary: "Queries the list of network protocol profiles for a datacenter", + }, + Key: "IpPoolManager.queryIpPools", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create network protocol profile", + Summary: "Creates a new network protocol profile", + }, + Key: "IpPoolManager.createIpPool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network protocol profile", + Summary: "Updates a network protocol profile on a datacenter", + }, + Key: "IpPoolManager.updateIpPool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Destroy network protocol profile", + Summary: "Destroys a network protocol profile on the given datacenter", + }, + Key: "IpPoolManager.destroyIpPool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Allocates an IPv4 address", + Summary: "Allocates an IPv4 address from an IP pool", + }, + Key: "IpPoolManager.allocateIpv4Address", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Allocates an IPv6 address", + Summary: "Allocates an IPv6 address from an IP pool", + }, + Key: "IpPoolManager.allocateIpv6Address", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Releases an IP allocation", + Summary: "Releases an IP allocation back to an IP pool", + }, + Key: "IpPoolManager.releaseIpAllocation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query IP allocations", + Summary: "Query IP allocations by IP pool and extension key", + }, + Key: "IpPoolManager.queryIPAllocations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install IO Filter", + Summary: "Installs an IO Filter on a compute resource", + }, + Key: "IoFilterManager.installIoFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall IO Filter", + Summary: "Uninstalls an IO Filter from a compute resource", + }, + Key: "IoFilterManager.uninstallIoFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade IO Filter", + Summary: "Upgrades an IO Filter on a compute resource", + }, + Key: "IoFilterManager.upgradeIoFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query IO Filter installation issues", + Summary: "Queries IO Filter installation issues on a compute resource", + }, + Key: "IoFilterManager.queryIssue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryIoFilterInfo", + Summary: "queryIoFilterInfo", + }, + Key: "IoFilterManager.queryIoFilterInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve IO Filter installation errors on host", + Summary: "Resolves IO Filter installation errors on a host", + }, + Key: "IoFilterManager.resolveInstallationErrorsOnHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve IO Filter installation errors on cluster", + Summary: "Resolves IO Filter installation errors on a cluster", + }, + Key: "IoFilterManager.resolveInstallationErrorsOnCluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query information about virtual disks using IO Filter", + Summary: "Queries information about virtual disks that use an IO Filter installed on a compute resource", + }, + Key: "IoFilterManager.queryDisksUsingFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IO Filter policy", + Summary: "Updates the policy to IO Filter mapping in vCenter Server", + }, + Key: "IoFilterManager.updateIoFilterPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add an image library", + Summary: "Register an image library server with vCenter", + }, + Key: "ImageLibraryManager.addLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update image library", + Summary: "Update image library information", + }, + Key: "ImageLibraryManager.updateLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove an image library", + Summary: "Unregister an image library server from vCenter", + }, + Key: "ImageLibraryManager.removeLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import from image library", + Summary: "Import files from the image library", + }, + Key: "ImageLibraryManager.importLibraryMedia", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export to image library", + Summary: "Export files to the image library", + }, + Key: "ImageLibraryManager.exportMediaToLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Publish to image library", + Summary: "Publish files from datastore to image library", + }, + Key: "ImageLibraryManager.publishMediaToLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get lease download manifest", + Summary: "Gets the download manifest for this lease", + }, + Key: "HttpNfcLease.getManifest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Complete the lease", + Summary: "The lease completed successfully", + }, + Key: "HttpNfcLease.complete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "End the lease", + Summary: "The lease has ended", + }, + Key: "HttpNfcLease.abort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update lease progress", + Summary: "Updates lease progress", + }, + Key: "HttpNfcLease.progress", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set latest page size", + Summary: "Set the last page viewed size and contain at most maxCount items in the page", + }, + Key: "HistoryCollector.setLatestPageSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rewind", + Summary: "Move the scroll position to the oldest item", + }, + Key: "HistoryCollector.rewind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset", + Summary: "Move the scroll position to the item just above the last page viewed", + }, + Key: "HistoryCollector.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove collector", + Summary: "Remove the collector from server", + }, + Key: "HistoryCollector.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable replication of virtual machine", + Summary: "Enable replication of virtual machine", + }, + Key: "HbrManager.enableReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable replication of virtual machine", + Summary: "Disable replication of virtual machine", + }, + Key: "HbrManager.disableReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure replication for virtual machine", + Summary: "Reconfigure replication for virtual machine", + }, + Key: "HbrManager.reconfigureReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve replication configuration of virtual machine", + Summary: "Retrieve replication configuration of virtual machine", + }, + Key: "HbrManager.retrieveReplicationConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Pause replication of virtual machine", + Summary: "Pause replication of virtual machine", + }, + Key: "HbrManager.pauseReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resume replication of virtual machine", + Summary: "Resume replication of virtual machine", + }, + Key: "HbrManager.resumeReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start a replication resynchronization for virtual machine", + Summary: "Start a replication resynchronization for virtual machine", + }, + Key: "HbrManager.fullSync", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start new replication instance for virtual machine", + Summary: "Start extraction and transfer of a new replication instance for virtual machine", + }, + Key: "HbrManager.createInstance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replicate powered-off virtual machine", + Summary: "Transfer a replication instance for powered-off virtual machine", + }, + Key: "HbrManager.startOfflineInstance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop replication of powered-off virtual machine", + Summary: "Stop replication of powered-off virtual machine", + }, + Key: "HbrManager.stopOfflineInstance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine replication state", + Summary: "Qureies the current state of a replicated virtual machine", + }, + Key: "HbrManager.queryReplicationState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryReplicationCapabilities", + Summary: "queryReplicationCapabilities", + }, + Key: "HbrManager.queryReplicationCapabilities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister extension", + Summary: "Unregisters an extension", + }, + Key: "ExtensionManager.unregisterExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find extension", + Summary: "Find an extension", + }, + Key: "ExtensionManager.findExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register extension", + Summary: "Registers an extension", + }, + Key: "ExtensionManager.registerExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update extension", + Summary: "Updates extension information", + }, + Key: "ExtensionManager.updateExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get server public key", + Summary: "Get vCenter Server's public key", + }, + Key: "ExtensionManager.getPublicKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set extension public key", + Summary: "Set public key of the extension", + }, + Key: "ExtensionManager.setPublicKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set extension certificate", + Summary: "Update the stored authentication certificate for a specified extension", + }, + Key: "ExtensionManager.setCertificate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update extension data", + Summary: "Updates extension-specific data associated with an extension", + }, + Key: "ExtensionManager.updateExtensionData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query extension data", + Summary: "Retrieves extension-specific data associated with an extension", + }, + Key: "ExtensionManager.queryExtensionData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query extension data keys", + Summary: "Retrieves extension-specific data keys associated with an extension", + }, + Key: "ExtensionManager.queryExtensionDataKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear extension data", + Summary: "Clears extension-specific data associated with an extension", + }, + Key: "ExtensionManager.clearExtensionData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query extension data usage", + Summary: "Retrieves statistics about the amount of data being stored by extensions registered with vCenter Server", + }, + Key: "ExtensionManager.queryExtensionDataUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query entities managed by extension", + Summary: "Finds entities managed by an extension", + }, + Key: "ExtensionManager.queryManagedBy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query statistics about IP allocation usage", + Summary: "Query statistics about IP allocation usage, system-wide or for specified extensions", + }, + Key: "ExtensionManager.queryExtensionIpAllocationUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create directory", + Summary: "Creates a top-level directory on the specified datastore", + }, + Key: "DatastoreNamespaceManager.CreateDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete directory", + Summary: "Deletes the specified top-level directory from the datastore", + }, + Key: "DatastoreNamespaceManager.DeleteDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "ConvertNamespacePathToUuidPath", + Summary: "ConvertNamespacePathToUuidPath", + }, + Key: "DatastoreNamespaceManager.ConvertNamespacePathToUuidPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual disk digest", + Summary: "Controls the configuration of the digests for the virtual disks", + }, + Key: "CbrcManager.configureDigest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Recompute virtual disk digest", + Summary: "Recomputes the digest for the given virtual disks, if necessary", + }, + Key: "CbrcManager.recomputeDigest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk digest configuration", + Summary: "Returns the current configuration of the digest for the given digest-enabled virtual disks", + }, + Key: "CbrcManager.queryDigestInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk digest runtime information", + Summary: "Returns the status of runtime digest usage for the given digest-enabled virtual disks", + }, + Key: "CbrcManager.queryDigestRuntimeInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare to upgrade", + Summary: "Deletes the content of the temporary directory on the host", + }, + Key: "AgentManager.prepareToUpgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade", + Summary: "Validates and executes the installer/uninstaller executable uploaded to the temporary directory", + }, + Key: "AgentManager.upgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Estimate database size", + Summary: "Estimates the database size required to store VirtualCenter data", + }, + Key: "ResourcePlanningManager.estimateDatabaseSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "registerProvider", + Summary: "registerProvider", + }, + Key: "HealthUpdateManager.registerProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unregisterProvider", + Summary: "unregisterProvider", + }, + Key: "HealthUpdateManager.unregisterProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryProviderList", + Summary: "queryProviderList", + }, + Key: "HealthUpdateManager.queryProviderList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "hasProvider", + Summary: "hasProvider", + }, + Key: "HealthUpdateManager.hasProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryProviderName", + Summary: "queryProviderName", + }, + Key: "HealthUpdateManager.queryProviderName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryHealthUpdateInfos", + Summary: "queryHealthUpdateInfos", + }, + Key: "HealthUpdateManager.queryHealthUpdateInfos", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addMonitoredEntities", + Summary: "addMonitoredEntities", + }, + Key: "HealthUpdateManager.addMonitoredEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeMonitoredEntities", + Summary: "removeMonitoredEntities", + }, + Key: "HealthUpdateManager.removeMonitoredEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryMonitoredEntities", + Summary: "queryMonitoredEntities", + }, + Key: "HealthUpdateManager.queryMonitoredEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "hasMonitoredEntity", + Summary: "hasMonitoredEntity", + }, + Key: "HealthUpdateManager.hasMonitoredEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryUnmonitoredHosts", + Summary: "queryUnmonitoredHosts", + }, + Key: "HealthUpdateManager.queryUnmonitoredHosts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "postHealthUpdates", + Summary: "postHealthUpdates", + }, + Key: "HealthUpdateManager.postHealthUpdates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryHealthUpdates", + Summary: "queryHealthUpdates", + }, + Key: "HealthUpdateManager.queryHealthUpdates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addFilter", + Summary: "addFilter", + }, + Key: "HealthUpdateManager.addFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterList", + Summary: "queryFilterList", + }, + Key: "HealthUpdateManager.queryFilterList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterName", + Summary: "queryFilterName", + }, + Key: "HealthUpdateManager.queryFilterName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterInfoIds", + Summary: "queryFilterInfoIds", + }, + Key: "HealthUpdateManager.queryFilterInfoIds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterEntities", + Summary: "queryFilterEntities", + }, + Key: "HealthUpdateManager.queryFilterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addFilterEntities", + Summary: "addFilterEntities", + }, + Key: "HealthUpdateManager.addFilterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeFilterEntities", + Summary: "removeFilterEntities", + }, + Key: "HealthUpdateManager.removeFilterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeFilter", + Summary: "removeFilter", + }, + Key: "HealthUpdateManager.removeFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by UUID", + Summary: "Finds a virtual machine or host by UUID", + }, + Key: "SearchIndex.findByUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find virtual machine by datastore path", + Summary: "Finds a virtual machine by its location on a datastore", + }, + Key: "SearchIndex.findByDatastorePath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by DNS", + Summary: "Finds a virtual machine or host by its DNS name", + }, + Key: "SearchIndex.findByDnsName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by IP", + Summary: "Finds a virtual machine or host by IP address", + }, + Key: "SearchIndex.findByIp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by inventory path", + Summary: "Finds a virtual machine or host based on its location in the inventory", + }, + Key: "SearchIndex.findByInventoryPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find folder child", + Summary: "Finds an immediate child of a folder", + }, + Key: "SearchIndex.findChild", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find by UUID", + Summary: "Find entities based on their UUID", + }, + Key: "SearchIndex.findAllByUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find by DNS name", + Summary: "Find by DNS name", + }, + Key: "SearchIndex.findAllByDnsName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find by IP address", + Summary: "Find entities based on their IP address", + }, + Key: "SearchIndex.findAllByIp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "findAllInstantCloneParentInGroup", + Summary: "findAllInstantCloneParentInGroup", + }, + Key: "SearchIndex.findAllInstantCloneParentInGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "findAllInstantCloneChildrenOfGroup", + Summary: "findAllInstantCloneChildrenOfGroup", + }, + Key: "SearchIndex.findAllInstantCloneChildrenOfGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "fetchRelocatedMACAddress", + Summary: "fetchRelocatedMACAddress", + }, + Key: "NetworkManager.fetchRelocatedMACAddress", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check MAC addresses in use", + Summary: "Checks the MAC addresses used by this vCenter Server instance", + }, + Key: "NetworkManager.checkIfMACAddressInUse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reclaim MAC addresses", + Summary: "Reclaims the MAC addresses that are not used by remote vCenter Server instances", + }, + Key: "NetworkManager.reclaimMAC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check group membership", + Summary: "Check whether a user is a member of a given list of groups", + }, + Key: "UserDirectory.checkGroupMembership", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get user groups", + Summary: "Searches for users and groups", + }, + Key: "UserDirectory.retrieveUserGroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set task custom value", + Summary: "Sets the value of a custom field of a task", + }, + Key: "Task.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel", + Summary: "Cancels a running/queued task", + }, + Key: "Task.cancel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update progress", + Summary: "Update task progress", + }, + Key: "Task.UpdateProgress", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set task state", + Summary: "Sets task state", + }, + Key: "Task.setState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update task description", + Summary: "Updates task description with the current phase of the task", + }, + Key: "Task.UpdateDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration option descriptor", + Summary: "Get the list of configuration option keys available in this browser", + }, + Key: "EnvironmentBrowser.queryConfigOptionDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure option query", + Summary: "Search for a specific configuration option", + }, + Key: "EnvironmentBrowser.queryConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryConfigOptionEx", + Summary: "queryConfigOptionEx", + }, + Key: "EnvironmentBrowser.queryConfigOptionEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration target", + Summary: "Search for a specific configuration target", + }, + Key: "EnvironmentBrowser.queryConfigTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query target capabilities", + Summary: "Query for compute-resource capabilities associated with this browser", + }, + Key: "EnvironmentBrowser.queryTargetCapabilities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine provisioning operation policy", + Summary: "Query environment browser for information about the virtual machine provisioning operation policy", + }, + Key: "EnvironmentBrowser.queryProvisioningPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryConfigTargetSpec", + Summary: "queryConfigTargetSpec", + }, + Key: "EnvironmentBrowser.queryConfigTargetSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set snapshot custom value", + Summary: "Sets the value of a custom field of a virtual machine snapshot", + }, + Key: "vm.Snapshot.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Revert snapshot", + Summary: "Change the execution state of the virtual machine to the state of this snapshot", + }, + Key: "vm.Snapshot.revert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove snapshot", + Summary: "Remove snapshot and delete its associated storage", + }, + Key: "vm.Snapshot.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename snapshot", + Summary: "Rename the snapshot", + }, + Key: "vm.Snapshot.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Linked Clone", + Summary: "Create a linked clone from this snapshot", + }, + Key: "vm.Snapshot.createLinkedClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Export the snapshot as an OVF template", + }, + Key: "vm.Snapshot.exportSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Pause", + Summary: "Pauses a virtual machine", + }, + Key: "vm.PauseManager.pause", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unpause", + Summary: "Unpauses a virtual machine", + }, + Key: "vm.PauseManager.unpause", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power on and pause", + Summary: "Powers on a virtual machine and pauses it immediately", + }, + Key: "vm.PauseManager.powerOnPaused", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create namespace", + Summary: "Create a virtual machine namespace", + }, + Key: "vm.NamespaceManager.createNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete namespace", + Summary: "Delete the virtual machine namespace", + }, + Key: "vm.NamespaceManager.deleteNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete all namespaces", + Summary: "Delete all namespaces associated with the virtual machine", + }, + Key: "vm.NamespaceManager.deleteAllNamespaces", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update namespace", + Summary: "Reconfigure the virtual machine namespace", + }, + Key: "vm.NamespaceManager.updateNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query namespace", + Summary: "Retrieve detailed information about the virtual machine namespace", + }, + Key: "vm.NamespaceManager.queryNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List namespaces", + Summary: "Retrieve the list of all namespaces for a virtual machine", + }, + Key: "vm.NamespaceManager.listNamespaces", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send event to the virtual machine", + Summary: "Queue event for delivery to the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.sendEventToGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch events from the virtual machine", + Summary: "Retrieve events sent by the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.fetchEventsFromGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update data", + Summary: "Update key/value pairs accessible by the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.updateData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve data", + Summary: "Retrieve key/value pairs set by the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.retrieveData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "", + Summary: "", + }, + Key: "ServiceDirectory.queryServiceEndpointList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register service endpoint", + Summary: "Registers a service endpoint", + }, + Key: "ServiceDirectory.registerService", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister service endpoint", + Summary: "Unregisters a service endpoint", + }, + Key: "ServiceDirectory.unregisterService", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Annotate OVF section tree", + Summary: "Annotates the given OVF section tree with configuration choices for this OVF consumer", + }, + Key: "OvfConsumer.annotateOst", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate instantiation OVF section tree", + Summary: "Validates that this OVF consumer can accept an instantiation OVF section tree", + }, + Key: "OvfConsumer.validateInstantiationOst", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Request registration of OVF section tree nodes", + Summary: "Notifies the OVF consumer that the specified OVF section tree nodes should be registered", + }, + Key: "OvfConsumer.registerEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Request managed entities unregistration from OVF consumer", + Summary: "Notifies the OVF consumer that the specified managed entities should be unregistered", + }, + Key: "OvfConsumer.unregisterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify OVF consumer for cloned entities", + Summary: "Notifies the OVF consumer that the specified entities have been cloned", + }, + Key: "OvfConsumer.cloneEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Populate entity OVF section tree", + Summary: "Create OVF sections for the given managed entities and populate the entity OVF section tree", + }, + Key: "OvfConsumer.populateEntityOst", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve public OVF environment sections for virtual machine ", + Summary: "Retrieves the public OVF environment sections that this OVF consumer has for a given virtual machine", + }, + Key: "OvfConsumer.retrievePublicOvfEnvironmentSections", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify OVF consumer for virtual machine power on", + Summary: "Notifies the OVF consumer that a virtual machine is about to be powered on", + }, + Key: "OvfConsumer.notifyPowerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Specification exists", + Summary: "Check the existence of a specification", + }, + Key: "CustomizationSpecManager.exists", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get specification", + Summary: "Gets a specification", + }, + Key: "CustomizationSpecManager.get", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create new specification", + Summary: "Create a new specification", + }, + Key: "CustomizationSpecManager.create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Overwrite specification", + Summary: "Overwrite an existing specification", + }, + Key: "CustomizationSpecManager.overwrite", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete specification", + Summary: "Delete a specification", + }, + Key: "CustomizationSpecManager.delete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Duplicate specification", + Summary: "Duplicate a specification", + }, + Key: "CustomizationSpecManager.duplicate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename specification", + Summary: "Rename a specification", + }, + Key: "CustomizationSpecManager.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert specification item", + Summary: "Convert a specification item to XML text", + }, + Key: "CustomizationSpecManager.specItemToXml", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert XML item", + Summary: "Convert an XML string to a specification item", + }, + Key: "CustomizationSpecManager.xmlToSpecItem", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate required resources", + Summary: "Validate that required resources are available on the server to customize a particular guest operating system", + }, + Key: "CustomizationSpecManager.checkResources", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query supported features", + Summary: "Searches the current license source for licenses available from this system", + }, + Key: "LicenseManager.querySupportedFeatures", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query license source", + Summary: "Searches the current license source for licenses available for each feature known to this system", + }, + Key: "LicenseManager.querySourceAvailability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query license usage", + Summary: "Returns the list of features and the number of licenses that have been reserved", + }, + Key: "LicenseManager.queryUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set product edition", + Summary: "Defines the product edition", + }, + Key: "LicenseManager.setEdition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check feature", + Summary: "Checks if a feature is enabled", + }, + Key: "LicenseManager.checkFeature", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable license", + Summary: "Enable a feature that is marked as user-configurable", + }, + Key: "LicenseManager.enable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable license", + Summary: "Release licenses for a user-configurable feature", + }, + Key: "LicenseManager.disable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure license source", + Summary: "Allows reconfiguration of the License Manager license source", + }, + Key: "LicenseManager.configureSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Installing license", + Summary: "Installing license", + }, + Key: "LicenseManager.updateLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add license", + Summary: "Adds a new license to the license inventory", + }, + Key: "LicenseManager.addLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove license", + Summary: "Removes a license from the license inventory", + }, + Key: "LicenseManager.removeLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Decode license", + Summary: "Decodes the license to return the properties of that license key", + }, + Key: "LicenseManager.decodeLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update license label", + Summary: "Update a license's label", + }, + Key: "LicenseManager.updateLabel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove license label", + Summary: "Removes a license's label", + }, + Key: "LicenseManager.removeLabel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get License Data Manager", + Summary: "Gets the License Data Manager", + }, + Key: "LicenseManager.queryLicenseDataManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Activate remote hard enforcement", + Summary: "Activates the remote hard enforcement", + }, + Key: "LicenseManager.activateRemoteHardEnforcement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set datastore custom value", + Summary: "Sets the value of a custom field of a datastore", + }, + Key: "Datastore.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload datastore", + Summary: "Reload information about the datastore", + }, + Key: "Datastore.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename datastore", + Summary: "Renames a datastore", + }, + Key: "Datastore.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datastore", + Summary: "Removes a datastore if it is not used by any host or virtual machine", + }, + Key: "Datastore.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Tag", + Summary: "Add a set of tags to the datastore", + }, + Key: "Datastore.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the datastore", + }, + Key: "Datastore.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Datastore.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh datastore", + Summary: "Refreshes free space on this datastore", + }, + Key: "Datastore.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh storage information", + Summary: "Refresh the storage information of the datastore", + }, + Key: "Datastore.refreshStorageInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update virtual machine files", + Summary: "Update virtual machine files on the datastore", + }, + Key: "Datastore.updateVirtualMachineFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename datastore", + Summary: "Rename the datastore", + }, + Key: "Datastore.renameDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete datastore", + Summary: "Delete datastore", + }, + Key: "Datastore.destroyDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replace embedded file paths", + Summary: "Replace embedded file paths on the datastore", + }, + Key: "Datastore.replaceEmbeddedFilePaths", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter SDRS maintenance mode", + Summary: "Virtual machine evacuation recommendations from the selected datastore are generated for SDRS maintenance mode", + }, + Key: "Datastore.enterMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit SDRS maintenance mode", + Summary: "Exit SDRS maintenance mode", + }, + Key: "Datastore.exitMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get native clone capability", + Summary: "Check if the datastore supports native clone", + }, + Key: "Datastore.isNativeCloneCapable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cleanup locks", + Summary: "Cleanup lock files on NFSV3 datastore", + }, + Key: "Datastore.cleanupLocks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateVVolVirtualMachineFiles", + Summary: "updateVVolVirtualMachineFiles", + }, + Key: "Datastore.updateVVolVirtualMachineFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get current time", + Summary: "Returns the current time on the server", + }, + Key: "ServiceInstance.currentTime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve content", + Summary: "Get the properties of the service instance", + }, + Key: "ServiceInstance.retrieveContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve internal properties", + Summary: "Retrieves the internal properties of the service instance", + }, + Key: "ServiceInstance.retrieveInternalContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate migration", + Summary: "Checks for errors and warnings of virtual machines migrated from one host to another", + }, + Key: "ServiceInstance.validateMigration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vMotion compatibility", + Summary: "Validates the vMotion compatibility of a set of hosts", + }, + Key: "ServiceInstance.queryVMotionCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve product components", + Summary: "Component information for bundled products", + }, + Key: "ServiceInstance.retrieveProductComponents", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh the CA certificates on the host", + Summary: "Refreshes the CA certificates on the host", + }, + Key: "CertificateManager.refreshCACertificatesAndCRLs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh the subject certificate on the host", + Summary: "Refreshes the subject certificate on the host", + }, + Key: "CertificateManager.refreshCertificates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Revoke the subject certificate of a host", + Summary: "Revokes the subject certificate of a host", + }, + Key: "CertificateManager.revokeCertificates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query service list", + Summary: "Location information that needs to match a service", + }, + Key: "ServiceManager.queryServiceList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Creates a registry key", + Summary: "Creates a registry key in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.createRegistryKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Lists all registry subkeys for a specified registry key", + Summary: "Lists all registry subkeys for a specified registry key in the Windows guest operating system.", + }, + Key: "vm.guest.WindowsRegistryManager.listRegistryKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deletes a registry key", + Summary: "Deletes a registry key in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.deleteRegistryKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Sets and creates a registry value", + Summary: "Sets and creates a registry value in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.setRegistryValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Lists all registry values for a specified registry key", + Summary: "Lists all registry values for a specified registry key in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.listRegistryValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deletes a registry value", + Summary: "Deletes a registry value in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.deleteRegistryValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start a program in the guest", + Summary: "Start a program in the guest operating system", + }, + Key: "vm.guest.ProcessManager.startProgram", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List processes in the guest", + Summary: "List processes in the guest operating system", + }, + Key: "vm.guest.ProcessManager.listProcesses", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Terminate a process in the guest", + Summary: "Terminate a process in the guest operating system", + }, + Key: "vm.guest.ProcessManager.terminateProcess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read an environment variable in the guest", + Summary: "Read an environment variable in the guest operating system", + }, + Key: "vm.guest.ProcessManager.readEnvironmentVariable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query disabled guest operations", + Summary: "Returns a list of guest operations not supported by a virtual machine", + }, + Key: "vm.guest.GuestOperationsManager.queryDisabledMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a directory in the guest", + Summary: "Create a directory in the guest operating system", + }, + Key: "vm.guest.FileManager.makeDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a file in the guest", + Summary: "Delete a file in the guest operating system", + }, + Key: "vm.guest.FileManager.deleteFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a directory in the guest", + Summary: "Delete a directory in the guest operating system", + }, + Key: "vm.guest.FileManager.deleteDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move or rename a directory in the guest", + Summary: "Move or rename a directory in the guest operating system", + }, + Key: "vm.guest.FileManager.moveDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move or rename a file in the guest", + Summary: "Move or rename a file in the guest operating system", + }, + Key: "vm.guest.FileManager.moveFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a temporary file in the guest", + Summary: "Create a temporary file in the guest operating system", + }, + Key: "vm.guest.FileManager.createTemporaryFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a temporary directory in the guest", + Summary: "Create a temporary directory in the guest operating system", + }, + Key: "vm.guest.FileManager.createTemporaryDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List files or directories in the guest", + Summary: "List files or directories in the guest operating system", + }, + Key: "vm.guest.FileManager.listFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change the attributes of a file in the guest", + Summary: "Change the attributes of a file in the guest operating system", + }, + Key: "vm.guest.FileManager.changeFileAttributes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiates an operation to transfer a file from the guest", + Summary: "Initiates an operation to transfer a file from the guest operating system", + }, + Key: "vm.guest.FileManager.initiateFileTransferFromGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiates an operation to transfer a file to the guest", + Summary: "Initiates an operation to transfer a file to the guest operating system", + }, + Key: "vm.guest.FileManager.initiateFileTransferToGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add an alias to the alias store in the guest", + Summary: "Add an alias to the alias store in the guest operating system", + }, + Key: "vm.guest.AliasManager.addAlias", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove an alias from the alias store in the guest", + Summary: "Remove an alias from the alias store in the guest operating system", + }, + Key: "vm.guest.AliasManager.removeAlias", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove all aliases associated with a SSO Server certificate from the guest", + Summary: "Remove all aliases associated with a SSO Server certificate from the guest operating system", + }, + Key: "vm.guest.AliasManager.removeAliasByCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List all aliases for a user in the guest", + Summary: "List all aliases for a user in the guest operating system", + }, + Key: "vm.guest.AliasManager.listAliases", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List all mapped aliases in the guest", + Summary: "List all mapped aliases in the guest operating system", + }, + Key: "vm.guest.AliasManager.listMappedAliases", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure workload model calculation parameters for datastore", + Summary: "Configures calculation parameters used for computation of workload model for a datastore", + }, + Key: "DrsStatsManager.configureWorkloadCharacterization", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query current workload model calculation parameters", + Summary: "Queries a host for the current workload model calculation parameters", + }, + Key: "DrsStatsManager.queryWorkloadCharacterization", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure datastore correlation detector", + Summary: "Configures datastore correlation detector with datastore to datastore cluster mappings", + }, + Key: "DrsStatsManager.configureCorrelationDetector", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore correlation result", + Summary: "Queries correlation detector for a list of datastores correlated to a given datastore", + }, + Key: "DrsStatsManager.queryCorrelationResult", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set firewall custom value", + Summary: "Sets the value of a custom field of a host firewall system", + }, + Key: "host.FirewallSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update default firewall policy", + Summary: "Updates the default firewall policy", + }, + Key: "host.FirewallSystem.updateDefaultPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open firewall ports", + Summary: "Open the firewall ports belonging to the specified ruleset", + }, + Key: "host.FirewallSystem.enableRuleset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Block firewall ports", + Summary: "Block the firewall ports belonging to the specified ruleset", + }, + Key: "host.FirewallSystem.disableRuleset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update allowed IP list of the firewall ruleset", + Summary: "Update the allowed IP list of the specified ruleset", + }, + Key: "host.FirewallSystem.updateRuleset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh firewall information", + Summary: "Refresh the firewall information and settings to detect any changes made directly on the host", + }, + Key: "host.FirewallSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update local swap datastore", + Summary: "Changes the datastore for virtual machine swap files", + }, + Key: "host.DatastoreSystem.updateLocalSwapDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve disks for VMFS datastore", + Summary: "Retrieves the list of disks that can be used to contain VMFS datastore extents", + }, + Key: "host.DatastoreSystem.queryAvailableDisksForVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore create options", + Summary: "Queries options for creating a new VMFS datastore for a disk", + }, + Key: "host.DatastoreSystem.queryVmfsDatastoreCreateOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create VMFS datastore", + Summary: "Creates a new VMFS datastore", + }, + Key: "host.DatastoreSystem.createVmfsDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore extend options", + Summary: "Queries options for extending an existing VMFS datastore for a disk", + }, + Key: "host.DatastoreSystem.queryVmfsDatastoreExtendOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query VMFS datastore expand options", + Summary: "Query the options available for expanding the extents of a VMFS datastore", + }, + Key: "host.DatastoreSystem.queryVmfsDatastoreExpandOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend datastore", + Summary: "Extends an existing VMFS datastore", + }, + Key: "host.DatastoreSystem.extendVmfsDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Expand VMFS datastore", + Summary: "Expand the capacity of a VMFS datastore extent", + }, + Key: "host.DatastoreSystem.expandVmfsDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "processVmfsDatastoreUpdate", + Summary: "processVmfsDatastoreUpdate", + }, + Key: "host.DatastoreSystem.processVmfsDatastoreUpdate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create NAS datastore", + Summary: "Creates a new Network Attached Storage (NAS) datastore", + }, + Key: "host.DatastoreSystem.createNasDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create local datastore", + Summary: "Creates a new local datastore", + }, + Key: "host.DatastoreSystem.createLocalDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Virtual Volume datastore", + Summary: "Updates the Virtual Volume datastore configuration according to the provided settings", + }, + Key: "host.DatastoreSystem.UpdateVvolDatastoreInternal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Virtual Volume datastore", + Summary: "Creates a datastore backed by a Virtual Volume storage container", + }, + Key: "host.DatastoreSystem.createVvolDatastoreInternal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Virtual Volume datastore", + Summary: "Creates a Virtuial Volume datastore", + }, + Key: "host.DatastoreSystem.createVvolDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datastore", + Summary: "Removes a datastore from a host", + }, + Key: "host.DatastoreSystem.removeDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datastores", + Summary: "Removes one or more datastores from a host", + }, + Key: "host.DatastoreSystem.removeDatastoreEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure datastore principal", + Summary: "Configures datastore principal user for the host", + }, + Key: "host.DatastoreSystem.configureDatastorePrincipal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query unbound VMFS volumes", + Summary: "Gets the list of unbound VMFS volumes", + }, + Key: "host.DatastoreSystem.queryUnresolvedVmfsVolumes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resignature unresolved VMFS volume", + Summary: "Resignature unresolved VMFS volume with new VMFS identifier", + }, + Key: "host.DatastoreSystem.resignatureUnresolvedVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "NotifyDatastore", + Summary: "NotifyDatastore", + }, + Key: "host.DatastoreSystem.NotifyDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check accessibility", + Summary: "Check if the file objects for the specified virtual machine IDs are accessible", + }, + Key: "host.DatastoreSystem.checkVmFileAccessibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Join Windows Domain", + Summary: "Enables ActiveDirectory authentication on the host", + }, + Key: "host.ActiveDirectoryAuthentication.joinDomain", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Join Windows Domain through vSphere Authentication Proxy service", + Summary: "Enables Active Directory authentication on the host using a vSphere Authentication Proxy server", + }, + Key: "host.ActiveDirectoryAuthentication.joinDomainWithCAM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import the certificate of vSphere Authentication Proxy server", + Summary: "Import the certificate of vSphere Authentication Proxy server to ESXi's authentication store", + }, + Key: "host.ActiveDirectoryAuthentication.importCertificateForCAM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Leave Windows Domain", + Summary: "Disables ActiveDirectory authentication on the host", + }, + Key: "host.ActiveDirectoryAuthentication.leaveCurrentDomain", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable Smart Card Authentication", + Summary: "Enables smart card authentication of ESXi Direct Console UI users", + }, + Key: "host.ActiveDirectoryAuthentication.enableSmartCardAuthentication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install a Smart Card Trust Anchor", + Summary: "Installs a smart card trust anchor on the host", + }, + Key: "host.ActiveDirectoryAuthentication.installSmartCardTrustAnchor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "replaceSmartCardTrustAnchors", + Summary: "replaceSmartCardTrustAnchors", + }, + Key: "host.ActiveDirectoryAuthentication.replaceSmartCardTrustAnchors", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove a Smart Card Trust Anchor", + Summary: "Removes an installed smart card trust anchor from the host", + }, + Key: "host.ActiveDirectoryAuthentication.removeSmartCardTrustAnchor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Smart Card Trust Anchor", + Summary: "Removes the installed smart card trust anchor from the host", + }, + Key: "host.ActiveDirectoryAuthentication.removeSmartCardTrustAnchorByFingerprint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List Smart Card Trust Anchors", + Summary: "Lists the smart card trust anchors installed on the host", + }, + Key: "host.ActiveDirectoryAuthentication.listSmartCardTrustAnchors", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable Smart Card Authentication", + Summary: "Disables smart card authentication of ESXi Direct Console UI users", + }, + Key: "host.ActiveDirectoryAuthentication.disableSmartCardAuthentication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update VMCI access rights", + Summary: "Updates VMCI (Virtual Machine Communication Interface) access rights for one or more virtual machines", + }, + Key: "host.VmciAccessManager.updateAccess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve VMCI service rights granted to virtual machine", + Summary: "Retrieve VMCI (Virtual Machine Communication Interface) service rights granted to a VM", + }, + Key: "host.VmciAccessManager.retrieveGrantedServices", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machines with access to VMCI service", + Summary: "Gets the VMs with granted access to a service", + }, + Key: "host.VmciAccessManager.queryAccessToService", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create new identity binding", + Summary: "Creates a new identity binding between the host and vCenter Server", + }, + Key: "host.TpmManager.requestIdentity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Verify authenticity of credential", + Summary: "Verifies the authenticity and correctness of the supplied attestation credential", + }, + Key: "host.TpmManager.verifyCredential", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate integrity report", + Summary: "Generates an integrity report for the selected components", + }, + Key: "host.TpmManager.generateReport", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure SNMP agent", + Summary: "Reconfigure the SNMP agent", + }, + Key: "host.SnmpSystem.reconfigureSnmpAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send test notification", + Summary: "Send test notification", + }, + Key: "host.SnmpSystem.sendTestNotification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set service custom value", + Summary: "Sets the value of a custom field of a host service system.", + }, + Key: "host.ServiceSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update service activation policy", + Summary: "Updates the activation policy of the service", + }, + Key: "host.ServiceSystem.updatePolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start service", + Summary: "Starts the service", + }, + Key: "host.ServiceSystem.start", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop service", + Summary: "Stops the service", + }, + Key: "host.ServiceSystem.stop", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Restart service", + Summary: "Restarts the service", + }, + Key: "host.ServiceSystem.restart", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall service", + Summary: "Uninstalls the service", + }, + Key: "host.ServiceSystem.uninstall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh service information", + Summary: "Refresh the service information and settings to detect any changes made directly on the host", + }, + Key: "host.ServiceSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check", + Summary: "Check for dependencies, conflicts, and obsolete updates", + }, + Key: "host.PatchManager.Check", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scan", + Summary: "Scan the host for patch status", + }, + Key: "host.PatchManager.Scan", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scan", + Summary: "Scan the host for patch status", + }, + Key: "host.PatchManager.ScanV2", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stage", + Summary: "Stage the updates to the host", + }, + Key: "host.PatchManager.Stage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install", + Summary: "Install the patch", + }, + Key: "host.PatchManager.Install", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install", + Summary: "Install the patch", + }, + Key: "host.PatchManager.InstallV2", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall", + Summary: "Uninstall the patch", + }, + Key: "host.PatchManager.Uninstall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query", + Summary: "Query the host for installed bulletins", + }, + Key: "host.PatchManager.Query", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "createEntry", + Summary: "createEntry", + }, + Key: "host.OperationCleanupManager.createEntry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateEntry", + Summary: "updateEntry", + }, + Key: "host.OperationCleanupManager.updateEntry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryEntry", + Summary: "queryEntry", + }, + Key: "host.OperationCleanupManager.queryEntry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set memory manager custom value", + Summary: "Sets the value of a custom field of a host memory manager system", + }, + Key: "host.MemoryManagerSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set console memory reservation", + Summary: "Set the configured service console memory reservation", + }, + Key: "host.MemoryManagerSystem.reconfigureServiceConsoleReservation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure virtual machine reservation", + Summary: "Updates the virtual machine reservation information", + }, + Key: "host.MemoryManagerSystem.reconfigureVirtualMachineReservation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "promoteDisks", + Summary: "promoteDisks", + }, + Key: "host.LowLevelProvisioningManager.promoteDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a virtual machine on disk", + }, + Key: "host.LowLevelProvisioningManager.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual machine", + Summary: "Deletes a virtual machine on disk", + }, + Key: "host.LowLevelProvisioningManager.deleteVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual machine without deleting its virtual disks", + Summary: "Deletes a virtual machine from its storage, all virtual machine files are deleted except its associated virtual disks", + }, + Key: "host.LowLevelProvisioningManager.deleteVmExceptDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve virtual machine recovery information", + Summary: "Retrieves virtual machine recovery information", + }, + Key: "host.LowLevelProvisioningManager.retrieveVmRecoveryInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve last virtual machine migration status", + Summary: "Retrieves the last virtual machine migration status if available", + }, + Key: "host.LowLevelProvisioningManager.retrieveLastVmMigrationStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure virtual machine", + Summary: "Reconfigures the virtual machine", + }, + Key: "host.LowLevelProvisioningManager.reconfigVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload disks", + Summary: "Reloads virtual disk information", + }, + Key: "host.LowLevelProvisioningManager.reloadDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Consolidate disks", + Summary: "Consolidates virtual disks", + }, + Key: "host.LowLevelProvisioningManager.consolidateDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update snapshot layout information", + Summary: "Updates the snapshot layout information of a virtual machine and reloads its snapshots", + }, + Key: "host.LowLevelProvisioningManager.relayoutSnapshots", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reserve files for provisioning", + Summary: "Reserves files or directories on a datastore to be used for a provisioning", + }, + Key: "host.LowLevelProvisioningManager.reserveFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete files", + Summary: "Deletes a list of files from a datastore", + }, + Key: "host.LowLevelProvisioningManager.deleteFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extract NVRAM content", + Summary: "Extracts the NVRAM content from a checkpoint file", + }, + Key: "host.LowLevelProvisioningManager.extractNvramContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set resource pool custom value", + Summary: "Sets the value of a custom field of a resource pool of physical resources", + }, + Key: "ResourcePool.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload resource pool", + Summary: "Reload the resource pool", + }, + Key: "ResourcePool.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename resource pool", + Summary: "Rename the resource pool", + }, + Key: "ResourcePool.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete resource pool", + Summary: "Delete the resource pool, which also deletes its contents and removes it from its parent folder (if any)", + }, + Key: "ResourcePool.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the resource pool", + }, + Key: "ResourcePool.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the resource pool", + }, + Key: "ResourcePool.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ResourcePool.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update resource pool configuration", + Summary: "Updates the resource pool configuration", + }, + Key: "ResourcePool.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move into resource pool", + Summary: "Moves a set of resource pools or virtual machines into this pool", + }, + Key: "ResourcePool.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update child resource configuration", + Summary: "Change the resource configuration of a set of children of the resource pool", + }, + Key: "ResourcePool.updateChildResourceConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create resource pool", + Summary: "Creates a new resource pool", + }, + Key: "ResourcePool.createResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete resource pool children", + Summary: "Removes all child resource pools recursively", + }, + Key: "ResourcePool.destroyChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vApp", + Summary: "Creates a child vApp of this resource pool", + }, + Key: "ResourcePool.createVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a virtual machine in this resource pool", + }, + Key: "ResourcePool.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to this resource pool", + }, + Key: "ResourcePool.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys a virtual machine or vApp", + }, + Key: "ResourcePool.importVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query resource pool resource configuration options", + Summary: "Returns configuration options for a set of resources for a resource pool", + }, + Key: "ResourcePool.queryResourceConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh resource runtime information", + Summary: "Refreshes the resource usage runtime information", + }, + Key: "ResourcePool.refreshRuntime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create user", + Summary: "Creates a local user account", + }, + Key: "host.LocalAccountManager.createUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update user", + Summary: "Updates a local user account", + }, + Key: "host.LocalAccountManager.updateUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create group", + Summary: "Creates a local group account", + }, + Key: "host.LocalAccountManager.createGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete user", + Summary: "Removes a local user account", + }, + Key: "host.LocalAccountManager.removeUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove group", + Summary: "Removes a local group account", + }, + Key: "host.LocalAccountManager.removeGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Assign user to group", + Summary: "Assign user to group", + }, + Key: "host.LocalAccountManager.assignUserToGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unassign user from group", + Summary: "Unassigns a user from a group", + }, + Key: "host.LocalAccountManager.unassignUserFromGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query whether virtual NIC is used by iSCSI multi-pathing", + Summary: "Query whether virtual NIC is used by iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryVnicStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query whether physical NIC is used by iSCSI multi-pathing", + Summary: "Query whether physical NIC is used by iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryPnicStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query all the virtual NICs used by iSCSI multi-pathing", + Summary: "Query all the virtual NICs used by iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryBoundVnics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query candidate virtual NICs that can be used for iSCSI multi-pathing", + Summary: "Query candidate virtual NICs that can be used for iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryCandidateNics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add virtual NIC to iSCSI Adapter", + Summary: "Add virtual NIC to iSCSI Adapter", + }, + Key: "host.IscsiManager.bindVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual NIC from iSCSI Adapter", + Summary: "Remove virtual NIC from iSCSI Adapter", + }, + Key: "host.IscsiManager.unbindVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query migration dependencies for migrating the physical and virtual NICs", + Summary: "Query migration dependencies for migrating the physical and virtual NICs", + }, + Key: "host.IscsiManager.queryMigrationDependencies", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get acceptance level for host image configuration", + Summary: "Get acceptance level settings for host image configuration", + }, + Key: "host.ImageConfigManager.queryHostAcceptanceLevel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host image profile", + Summary: "Queries the current host image profile information", + }, + Key: "host.ImageConfigManager.queryHostImageProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update acceptance level", + Summary: "Updates the acceptance level of a host", + }, + Key: "host.ImageConfigManager.updateAcceptanceLevel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "fetchSoftwarePackages", + Summary: "fetchSoftwarePackages", + }, + Key: "host.ImageConfigManager.fetchSoftwarePackages", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "installDate", + Summary: "installDate", + }, + Key: "host.ImageConfigManager.installDate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve access entries", + Summary: "Retrieves the access mode for each user or group with access permissions on the host", + }, + Key: "host.HostAccessManager.retrieveAccessEntries", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change access mode", + Summary: "Changes the access mode for a user or group on the host", + }, + Key: "host.HostAccessManager.changeAccessMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve special DCUI access users", + Summary: "Retrieves the list of users with special access to DCUI", + }, + Key: "host.HostAccessManager.queryDcuiAccess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update special DCUI access users", + Summary: "Updates the list of users with special access to DCUI", + }, + Key: "host.HostAccessManager.updateDcuiAccess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve system users", + Summary: "Retrieve the list of special system users on the host", + }, + Key: "host.HostAccessManager.querySystemUsers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update system users", + Summary: "Updates the list of special system users on the host", + }, + Key: "host.HostAccessManager.updateSystemUsers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query lockdown exceptions", + Summary: "Queries the current list of user exceptions for lockdown mode", + }, + Key: "host.HostAccessManager.queryLockdownExceptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update lockdown exceptions", + Summary: "Updates the current list of user exceptions for lockdown mode", + }, + Key: "host.HostAccessManager.updateLockdownExceptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change lockdown mode", + Summary: "Changes lockdown mode on the host", + }, + Key: "host.HostAccessManager.changeLockdownMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset to factory default", + Summary: "Reset the configuration to factory default", + }, + Key: "host.FirmwareSystem.resetToFactoryDefaults", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Backup configuration", + Summary: "Backup the configuration of the host", + }, + Key: "host.FirmwareSystem.backupConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration upload URL", + Summary: "Host configuration must be uploaded for a restore operation", + }, + Key: "host.FirmwareSystem.queryConfigUploadURL", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Restore configuration", + Summary: "Restore configuration of the host", + }, + Key: "host.FirmwareSystem.restoreConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Flush firmware configuration", + Summary: "Writes the configuration of the firmware system to persistent storage", + }, + Key: "host.FirmwareSystem.syncConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryQuantumMinutes", + Summary: "queryQuantumMinutes", + }, + Key: "host.FirmwareSystem.queryQuantumMinutes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "querySyncsPerQuantum", + Summary: "querySyncsPerQuantum", + }, + Key: "host.FirmwareSystem.querySyncsPerQuantum", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update ESX agent configuration", + Summary: "Updates the ESX agent configuration of a host", + }, + Key: "host.EsxAgentHostManager.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Renew disk lease", + Summary: "Renew a lease to prevent it from timing out", + }, + Key: "host.DiskManager.Lease.renew", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Release disk lease", + Summary: "End the lease if it is still active", + }, + Key: "host.DiskManager.Lease.release", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Allocate blocks", + Summary: "Prepare for writing to blocks", + }, + Key: "host.DiskManager.Lease.allocateBlocks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear lazy zero", + Summary: "Honor the contents of a block range", + }, + Key: "host.DiskManager.Lease.clearLazyZero", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Map disk region", + Summary: "Mapping a specified region of a virtual disk", + }, + Key: "host.DiskManager.Lease.MapDiskRegion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire disk lease", + Summary: "Acquire a lease for the files associated with the virtual disk referenced by the given datastore path", + }, + Key: "host.DiskManager.acquireLease", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire lease extension", + Summary: "Acquires a lease for the files associated with the virtual disk of a virtual machine", + }, + Key: "host.DiskManager.acquireLeaseExt", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Renew all leases", + Summary: "Resets the watchdog timer and confirms that all the locks for all the disks managed by this watchdog are still valid", + }, + Key: "host.DiskManager.renewAllLeases", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update configuration", + Summary: "Update the date and time on the host", + }, + Key: "host.DateTimeSystem.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query available time zones", + Summary: "Retrieves the list of available time zones on the host", + }, + Key: "host.DateTimeSystem.queryAvailableTimeZones", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query date and time", + Summary: "Get the current date and time on the host", + }, + Key: "host.DateTimeSystem.queryDateTime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update date or time", + Summary: "Update the date/time on the host", + }, + Key: "host.DateTimeSystem.updateDateTime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh", + Summary: "Refresh the date and time settings", + }, + Key: "host.DateTimeSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Search datastore", + Summary: "Returns the information for the files that match the given search criteria", + }, + Key: "host.DatastoreBrowser.search", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Search datastore subfolders", + Summary: "Returns the information for the files that match the given search criteria", + }, + Key: "host.DatastoreBrowser.searchSubFolders", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete datastore file", + Summary: "Deletes the specified files from the datastore", + }, + Key: "host.DatastoreBrowser.deleteFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set CPU scheduler system custom value", + Summary: "Sets the value of a custom field of a host CPU scheduler", + }, + Key: "host.CpuSchedulerSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable hyperthreading", + Summary: "Enable hyperthreads as schedulable resources", + }, + Key: "host.CpuSchedulerSystem.enableHyperThreading", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable hyperthreading", + Summary: "Disable hyperthreads as schedulable resources", + }, + Key: "host.CpuSchedulerSystem.disableHyperThreading", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate a certificate signing request", + Summary: "Generates a certificate signing request (CSR) for the host", + }, + Key: "host.CertificateManager.generateCertificateSigningRequest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate a certificate signing request using the specified Distinguished Name", + Summary: "Generates a certificate signing request (CSR) for the host using the specified Distinguished Name", + }, + Key: "host.CertificateManager.generateCertificateSigningRequestByDn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install a server certificate", + Summary: "Installs a server certificate for the host", + }, + Key: "host.CertificateManager.installServerCertificate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replace CA certificates and certificate revocation lists", + Summary: "Replaces the CA certificates and certificate revocation lists (CRLs) on the host", + }, + Key: "host.CertificateManager.replaceCACertificatesAndCRLs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify services affected by SSL credentials change", + Summary: "Notifies the host services affected by SSL credentials change", + }, + Key: "host.CertificateManager.notifyAffectedServices", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List CA certificates", + Summary: "Lists the CA certificates on the host", + }, + Key: "host.CertificateManager.listCACertificates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List CA certificate revocation lists", + Summary: "Lists the CA certificate revocation lists (CRLs) on the host", + }, + Key: "host.CertificateManager.listCACertificateRevocationLists", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get boot devices", + Summary: "Get available boot devices for the host system", + }, + Key: "host.BootDeviceSystem.queryBootDevices", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update boot device", + Summary: "Update the boot device on the host system", + }, + Key: "host.BootDeviceSystem.updateBootDevice", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set latest page size", + Summary: "Set the last page viewed size and contain at most maxCount items in the page", + }, + Key: "TaskHistoryCollector.setLatestPageSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rewind", + Summary: "Move the scroll position to the oldest item", + }, + Key: "TaskHistoryCollector.rewind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset", + Summary: "Move the scroll position to the item just above the last page viewed", + }, + Key: "TaskHistoryCollector.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove collector", + Summary: "Remove the collector from server", + }, + Key: "TaskHistoryCollector.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read next", + Summary: "The scroll position is moved to the next new page after the read", + }, + Key: "TaskHistoryCollector.readNext", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read previous", + Summary: "The scroll position is moved to the next older page after the read", + }, + Key: "TaskHistoryCollector.readPrev", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "waitForChanges", + Summary: "waitForChanges", + }, + Key: "cdc.ChangeLogCollector.waitForChanges", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "initializeSequence", + Summary: "initializeSequence", + }, + Key: "cdc.ChangeLogCollector.initializeSequence", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "exchangeSequence", + Summary: "exchangeSequence", + }, + Key: "cdc.ChangeLogCollector.exchangeSequence", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set alarm custom value", + Summary: "Sets the value of a custom field of an alarm", + }, + Key: "alarm.Alarm.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove alarm", + Summary: "Remove the alarm", + }, + Key: "alarm.Alarm.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure alarm", + Summary: "Reconfigure the alarm", + }, + Key: "alarm.Alarm.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove managed object", + Summary: "Remove the managed objects", + }, + Key: "view.ManagedObjectView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create scheduled task", + Summary: "Create a scheduled task", + }, + Key: "scheduler.ScheduledTaskManager.create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve scheduled task", + Summary: "Available scheduled tasks defined on the entity", + }, + Key: "scheduler.ScheduledTaskManager.retrieveEntityScheduledTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create scheduled task", + Summary: "Create a scheduled task", + }, + Key: "scheduler.ScheduledTaskManager.createObjectScheduledTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve scheduled task", + Summary: "Available scheduled tasks defined on the object", + }, + Key: "scheduler.ScheduledTaskManager.retrieveObjectScheduledTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set scheduled task custom value", + Summary: "Sets the value of a custom field of a scheduled task", + }, + Key: "scheduler.ScheduledTask.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove scheduled task", + Summary: "Remove the scheduled task", + }, + Key: "scheduler.ScheduledTask.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure scheduled task", + Summary: "Reconfigure the scheduled task properties", + }, + Key: "scheduler.ScheduledTask.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Run scheduled task", + Summary: "Run the scheduled task immediately", + }, + Key: "scheduler.ScheduledTask.run", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create inventory view", + Summary: "Create a view for browsing the inventory and tracking changes to open folders", + }, + Key: "view.ViewManager.createInventoryView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create container view", + Summary: "Create a view for monitoring the contents of a single container", + }, + Key: "view.ViewManager.createContainerView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create list view", + Summary: "Create a view for getting updates", + }, + Key: "view.ViewManager.createListView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create list view", + Summary: "Create a list view from an existing view", + }, + Key: "view.ViewManager.createListViewFromView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove view", + Summary: "Remove view", + }, + Key: "view.View.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vSphere Distributed Switch", + Summary: "Create vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.createDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove vSphere Distributed Switch", + Summary: "Remove vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.removeDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere Distributed Switch", + Summary: "Reconfigure vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.reconfigureDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update dvPort", + Summary: "Update dvPort", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.updatePorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete ports", + Summary: "Delete ports", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.deletePorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve port state", + Summary: "Retrieve port state", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.fetchPortState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone port", + Summary: "Clone port", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.clonePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve vSphere Distributed Switch configuration specification", + Summary: "Retrieve vSphere Distributed Switch configuration specification", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDvsConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Distributed Port Groups", + Summary: "Update Distributed Port Group", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.updateDVPortgroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve port group keys for vSphere Distributed Switch", + Summary: "Retrieve the list of port group keys on a given vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDVPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve distributed virtual port group specification", + Summary: "Retrievs the configuration specification for distributed virtual port groups", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDVPortgroupConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Load port", + Summary: "Load port", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.loadDVPort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve the list of port keys on the given vSphere Distributed Switch", + Summary: "Retrieve the list of port keys on the given vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDVPort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update dvPorts", + Summary: "Update dvPort", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Distributed Port Groups", + Summary: "Update Distributed Port Group", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch", + Summary: "Update vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDvs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch list", + Summary: "Update vSphere Distributed Switch list", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDvsList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Distributed Port Group list", + Summary: "Update Distributed Port Group list", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPortgroupList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update dvPort list", + Summary: "Update dvPort list", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPortList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute opaque command", + Summary: "Execute opaque command", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.executeOpaqueCommand", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set compute-resource custom value", + Summary: "Sets the value of a custom field for a unified compute resource", + }, + Key: "ComputeResource.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload resource", + Summary: "Reloads the resource", + }, + Key: "ComputeResource.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename compute-resource", + Summary: "Rename the compute-resource", + }, + Key: "ComputeResource.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove host", + Summary: "Removes the host resource", + }, + Key: "ComputeResource.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to this object", + }, + Key: "ComputeResource.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Removes a set of tags from this object", + }, + Key: "ComputeResource.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ComputeResource.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure compute-resource", + Summary: "Reconfigures a compute-resource", + }, + Key: "ComputeResource.reconfigureEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch set custom value", + Summary: "vSphere Distributed Switch set custom value", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload vSphere Distributed Switch", + Summary: "Reload vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename vSphere Distributed Switch", + Summary: "Rename vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove vSphere Distributed Switch", + Summary: "Remove vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch add tag", + Summary: "vSphere Distributed Switch add tag", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch remove tag", + Summary: "vSphere Distributed Switch remove tag", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPort keys", + Summary: "Retrieve dvPort keys", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.fetchPortKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPorts", + Summary: "Retrieve dvPorts", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.fetchPorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query used virtual LAN ID", + Summary: "Query used virtual LAN ID", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.queryUsedVlanId", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere Distributed Switch", + Summary: "Reconfigure vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch product specification operation", + Summary: "vSphere Distributed Switch product specification operation", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.performProductSpecOperation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Merge vSphere Distributed Switch", + Summary: "Merge vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.merge", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Groups", + Summary: "Add Distributed Port Groups", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addPortgroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move dvPort", + Summary: "Move dvPort", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.movePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch capability", + Summary: "Update vSphere Distributed Switch capability", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure dvPort", + Summary: "Reconfigure dvPort", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reconfigurePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh dvPort state", + Summary: "Refresh dvPort state", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.refreshPortState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rectify vSphere Distributed Switch host", + Summary: "Rectify vSphere Distributed Switch host", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.rectifyHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network resource pools on vSphere Distributed Switch", + Summary: "Update network resource pools on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add network resource pools on vSphere Distributed Switch", + Summary: "Add network resource pools on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove network resource pools on vSphere Distributed Switch", + Summary: "Remove network resource pools on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.removeNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure a network resource pool on a distributed switch", + Summary: "Reconfigures a network resource pool on a distributed switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reconfigureVmVnicNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network I/O control on vSphere Distributed Switch", + Summary: "Update network I/O control on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.enableNetworkResourceManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get vSphere Distributed Switch configuration spec to rollback", + Summary: "Get vSphere Distributed Switch configuration spec to rollback", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.rollback", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Group", + Summary: "Add Distributed Port Group", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update health check configuration on vSphere Distributed Switch", + Summary: "Update health check configuration on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateHealthCheckConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Look up portgroup based on portgroup key", + Summary: "Look up portgroup based on portgroup key", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.lookupPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Link Aggregation Control Protocol groups on vSphere Distributed Switch", + Summary: "Update Link Aggregation Control Protocol groups on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateLacpGroupConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare vMotion send operation", + Summary: "Prepare a vMotion send operation", + }, + Key: "host.VMotionManager.prepareSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare VMotion send operation asynchronously", + Summary: "Prepares a VMotion send operation asynchronously", + }, + Key: "host.VMotionManager.prepareSourceEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare vMotion receive operation", + Summary: "Prepare a vMotion receive operation", + }, + Key: "host.VMotionManager.prepareDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare vMotion receive operation asynchronously", + Summary: "Prepares a vMotion receive operation asynchronously", + }, + Key: "host.VMotionManager.prepareDestinationEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate vMotion receive operation", + Summary: "Initiate a vMotion receive operation", + }, + Key: "host.VMotionManager.initiateDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate vMotion send operation", + Summary: "Initiate a vMotion send operation", + }, + Key: "host.VMotionManager.initiateSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate VMotion send operation", + Summary: "Initiates a VMotion send operation", + }, + Key: "host.VMotionManager.initiateSourceEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Complete vMotion source notification", + Summary: "Tell the source that vMotion migration is complete (success or failure)", + }, + Key: "host.VMotionManager.completeSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Complete vMotion receive notification", + Summary: "Tell the destination that vMotion migration is complete (success or failure)", + }, + Key: "host.VMotionManager.completeDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Commit vMotion destination upgrade", + Summary: "Reparent the disks at destination and commit the redo logs at the end of a vMotion migration", + }, + Key: "host.VMotionManager.upgradeDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update VMotionManager memory mirror migrate flag", + Summary: "Enables or disables VMotionManager memory mirror migrate", + }, + Key: "host.VMotionManager.updateMemMirrorFlag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryMigrationIds", + Summary: "queryMigrationIds", + }, + Key: "host.VMotionManager.queryMigrationIds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove list view", + Summary: "Remove the list view object", + }, + Key: "view.ListView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Modify list view", + Summary: "Modify the list view", + }, + Key: "view.ListView.modify", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset list view", + Summary: "Reset the list view", + }, + Key: "view.ListView.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset view", + Summary: "Resets a set of objects in a given view", + }, + Key: "view.ListView.resetFromView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "registerProvider", + Summary: "registerProvider", + }, + Key: "ExternalStatsManager.registerProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unregisterProvider", + Summary: "unregisterProvider", + }, + Key: "ExternalStatsManager.unregisterProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "isRegistered", + Summary: "isRegistered", + }, + Key: "ExternalStatsManager.isRegistered", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getRegisteredProviders", + Summary: "getRegisteredProviders", + }, + Key: "ExternalStatsManager.getRegisteredProviders", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getEnabledClusters", + Summary: "getEnabledClusters", + }, + Key: "ExternalStatsManager.getEnabledClusters", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateStats", + Summary: "updateStats", + }, + Key: "ExternalStatsManager.updateStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set vMotion custom value", + Summary: "Sets the value of a custom field of a host vMotion system", + }, + Key: "host.VMotionSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IP configuration", + Summary: "Update the IP configuration of the vMotion virtual NIC", + }, + Key: "host.VMotionSystem.updateIpConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Select vMotion virtual NIC", + Summary: "Select the virtual NIC to be used for vMotion", + }, + Key: "host.VMotionSystem.selectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deselect vMotion virtual NIC", + Summary: "Deselect the virtual NIC to be used for vMotion", + }, + Key: "host.VMotionSystem.deselectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance of host or cluster against a profile", + }, + Key: "profile.ComplianceManager.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compliance status", + Summary: "Query compliance status", + }, + Key: "profile.ComplianceManager.queryComplianceStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryEntitiesByComplianceStatus", + Summary: "queryEntitiesByComplianceStatus", + }, + Key: "profile.ComplianceManager.queryEntitiesByComplianceStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear compliance history", + Summary: "Clear historical compliance data", + }, + Key: "profile.ComplianceManager.clearComplianceStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query expression metadata", + Summary: "Query expression metadata", + }, + Key: "profile.ComplianceManager.queryExpressionMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.ContentLibrary.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.ContentLibrary.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.ContentLibrary.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.ContentLibrary.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.ContentLibrary.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.ContentLibrary.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.ContentLibrary.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query entity provider summary", + Summary: "Get information about the performance statistics that can be queried for a particular entity", + }, + Key: "PerformanceManager.queryProviderSummary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query available metrics", + Summary: "Gets available performance statistic metrics for the specified managed entity between begin and end times", + }, + Key: "PerformanceManager.queryAvailableMetric", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query counter", + Summary: "Get counter information for the list of counter IDs passed in", + }, + Key: "PerformanceManager.queryCounter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query counter by level", + Summary: "All performance data over 1 year old are deleted from the vCenter database", + }, + Key: "PerformanceManager.queryCounterByLevel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query performance statistics", + Summary: "Gets the performance statistics for the entity", + }, + Key: "PerformanceManager.queryStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get composite statistics", + Summary: "Get performance statistics for the entity and the breakdown across its child entities", + }, + Key: "PerformanceManager.queryCompositeStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Summarizes performance statistics", + Summary: "Summarizes performance statistics at the specified interval", + }, + Key: "PerformanceManager.summarizeStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create historical interval", + Summary: "Add a new historical interval configuration", + }, + Key: "PerformanceManager.createHistoricalInterval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove historical interval", + Summary: "Remove a historical interval configuration", + }, + Key: "PerformanceManager.removeHistoricalInterval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update historical interval", + Summary: "Update a historical interval configuration if it exists", + }, + Key: "PerformanceManager.updateHistoricalInterval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update counter level mapping", + Summary: "Update counter to level mapping", + }, + Key: "PerformanceManager.updateCounterLevelMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset counter level mapping", + Summary: "Reset counter to level mapping to the default values", + }, + Key: "PerformanceManager.resetCounterLevelMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query internal performance counters", + Summary: "Queries all internal counters, supported by this performance manager", + }, + Key: "PerformanceManager.queryPerfCounterInt", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable performance counters", + Summary: "Enable a counter or a set of counters in the counters collection of this performance manager", + }, + Key: "PerformanceManager.enableStat", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable performance counters", + Summary: "Exclude a counter or a set of counters from the counters collection of this performance manager", + }, + Key: "PerformanceManager.disableStat", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "CreateVRP", + Summary: "CreateVRP", + }, + Key: "VRPResourceManager.CreateVRP", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "UpdateVRP", + Summary: "UpdateVRP", + }, + Key: "VRPResourceManager.UpdateVRP", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DeleteVRP", + Summary: "DeleteVRP", + }, + Key: "VRPResourceManager.DeleteVRP", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DeployVM", + Summary: "DeployVM", + }, + Key: "VRPResourceManager.DeployVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "UndeployVM", + Summary: "UndeployVM", + }, + Key: "VRPResourceManager.UndeployVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "SetManagedByVDC", + Summary: "SetManagedByVDC", + }, + Key: "VRPResourceManager.SetManagedByVDC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetAllVRPIds", + Summary: "GetAllVRPIds", + }, + Key: "VRPResourceManager.GetAllVRPIds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetRPSettings", + Summary: "GetRPSettings", + }, + Key: "VRPResourceManager.GetRPSettings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetVRPSettings", + Summary: "GetVRPSettings", + }, + Key: "VRPResourceManager.GetVRPSettings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetVRPUsage", + Summary: "GetVRPUsage", + }, + Key: "VRPResourceManager.GetVRPUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetVRPofVM", + Summary: "GetVRPofVM", + }, + Key: "VRPResourceManager.GetVRPofVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetChildRPforHub", + Summary: "GetChildRPforHub", + }, + Key: "VRPResourceManager.GetChildRPforHub", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set PCI passthrough system custom value", + Summary: "Set PCI Passthrough system custom value", + }, + Key: "host.PciPassthruSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh PCI passthrough device information", + Summary: "Refresh the available PCI passthrough device information", + }, + Key: "host.PciPassthruSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update PCI passthrough configuration", + Summary: "Update PCI passthrough device configuration", + }, + Key: "host.PciPassthruSystem.updatePassthruConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check virtual machine's compatibility on host", + Summary: "Checks whether a virtual machine is compatible on a host", + }, + Key: "vm.check.CompatibilityChecker.checkCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compatibility of a VM specification on a host", + Summary: "Checks compatibility of a VM specification on a host", + }, + Key: "vm.check.CompatibilityChecker.checkVMCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance of host against profile", + Summary: "Checks compliance of a host against a profile", + }, + Key: "profile.host.profileEngine.ComplianceManager.checkHostCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query expression metadata", + Summary: "Queries the metadata for the given expression names", + }, + Key: "profile.host.profileEngine.ComplianceManager.queryExpressionMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get the default compliance from host configuration subprofiles", + Summary: "Get the default compliance from host configuration subprofiles", + }, + Key: "profile.host.profileEngine.ComplianceManager.getDefaultCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update specific metadata", + Summary: "Update specific metadata for the given owner and list of virtual machine IDs", + }, + Key: "vm.MetadataManager.updateMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve specific metadata", + Summary: "Retrieve specific metadata for the given owner and list of virtual machine IDs", + }, + Key: "vm.MetadataManager.retrieveMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve all metadata", + Summary: "Retrieve all metadata for the given owner and datastore", + }, + Key: "vm.MetadataManager.retrieveAllMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear metadata", + Summary: "Clear all metadata for the given owner and datastore", + }, + Key: "vm.MetadataManager.clearMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.AntiAffinityGroup.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.AntiAffinityGroup.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.AntiAffinityGroup.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.AntiAffinityGroup.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.AntiAffinityGroup.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.AntiAffinityGroup.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.AntiAffinityGroup.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "validate", + Summary: "validate", + }, + Key: "vdcs.NicManager.validate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "bind", + Summary: "bind", + }, + Key: "vdcs.NicManager.bind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unbind", + Summary: "unbind", + }, + Key: "vdcs.NicManager.unbind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "executeStep", + Summary: "executeStep", + }, + Key: "modularity.WorkflowStepHandler.executeStep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "undoStep", + Summary: "undoStep", + }, + Key: "modularity.WorkflowStepHandler.undoStep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "finalizeStep", + Summary: "finalizeStep", + }, + Key: "modularity.WorkflowStepHandler.finalizeStep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add key", + Summary: "Add the specified key to the current host", + }, + Key: "encryption.CryptoManager.addKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add keys", + Summary: "Add the specified keys to the current host", + }, + Key: "encryption.CryptoManager.addKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove key", + Summary: "Remove the specified key from the current host", + }, + Key: "encryption.CryptoManager.removeKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove keys", + Summary: "Remove the specified keys from the current host", + }, + Key: "encryption.CryptoManager.removeKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List all keys", + Summary: "List all the keys registered on the current host", + }, + Key: "encryption.CryptoManager.listKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set vCenter HA cluster mode", + Summary: "Set vCenter HA cluster mode", + }, + Key: "vcha.FailoverClusterManager.setClusterMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getClusterMode", + Summary: "getClusterMode", + }, + Key: "vcha.FailoverClusterManager.getClusterMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getClusterHealth", + Summary: "getClusterHealth", + }, + Key: "vcha.FailoverClusterManager.getClusterHealth", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate failover", + Summary: "Initiate a failover from active vCenter Server node to the passive node", + }, + Key: "vcha.FailoverClusterManager.initiateFailover", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query proxy information", + Summary: "Query the common message bus proxy service information", + }, + Key: "host.MessageBusProxy.retrieveInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure proxy", + Summary: "Configure the common message bus proxy service", + }, + Key: "host.MessageBusProxy.configure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove proxy configuration", + Summary: "Remove the common message proxy service configuration and disable the service", + }, + Key: "host.MessageBusProxy.unconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start proxy", + Summary: "Start the common message bus proxy service", + }, + Key: "host.MessageBusProxy.start", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop proxy", + Summary: "Stop the common message bus proxy service", + }, + Key: "host.MessageBusProxy.stop", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload proxy", + Summary: "Reload the common message bus proxy service and enable any configuration changes", + }, + Key: "host.MessageBusProxy.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a virtual disk object", + Summary: "Create a virtual disk object", + }, + Key: "vslm.host.VStorageObjectManager.createDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register a legacy disk to be a virtual disk object", + Summary: "Register a legacy disk to be a virtual disk object", + }, + Key: "vslm.host.VStorageObjectManager.registerDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend a virtual disk to the new capacity", + Summary: "Extend a virtual disk to the new capacity", + }, + Key: "vslm.host.VStorageObjectManager.extendDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inflate a thin virtual disk", + Summary: "Inflate a thin virtual disk", + }, + Key: "vslm.host.VStorageObjectManager.inflateDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename a virtual storage object", + Summary: "Rename a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.renameVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update storage policy on a virtual storage object", + Summary: "Update storage policy on a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.updateVStorageObjectPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a virtual storage object", + Summary: "Delete a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.deleteVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve a virtual storage object", + Summary: "Retrieve a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.retrieveVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveVStorageObjectState", + Summary: "retrieveVStorageObjectState", + }, + Key: "vslm.host.VStorageObjectManager.retrieveVStorageObjectState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List virtual storage objects on a datastore", + Summary: "List virtual storage objects on a datastore", + }, + Key: "vslm.host.VStorageObjectManager.listVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone a virtual storage object", + Summary: "Clone a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.cloneVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate a virtual storage object", + Summary: "Relocate a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.relocateVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconcile datastore inventory", + Summary: "Reconcile datastore inventory", + }, + Key: "vslm.host.VStorageObjectManager.reconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Schedule reconcile datastore inventory", + Summary: "Schedule reconcile datastore inventory", + }, + Key: "vslm.host.VStorageObjectManager.scheduleReconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve cluster profile description", + Summary: "Retrieve cluster profile description", + }, + Key: "profile.cluster.ClusterProfile.retrieveDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete cluster profile", + Summary: "Delete cluster profile", + }, + Key: "profile.cluster.ClusterProfile.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach cluster profile", + Summary: "Attach cluster profile to cluster", + }, + Key: "profile.cluster.ClusterProfile.associateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach cluster profile", + Summary: "Detach cluster profile from cluster", + }, + Key: "profile.cluster.ClusterProfile.dissociateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance of a cluster against a cluster profile", + }, + Key: "profile.cluster.ClusterProfile.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export cluster profile", + Summary: "Export cluster profile to a file", + }, + Key: "profile.cluster.ClusterProfile.exportProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update cluster profile", + Summary: "Update configuration of cluster profile", + }, + Key: "profile.cluster.ClusterProfile.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create task collector", + Summary: "Creates a task collector to retrieve all tasks that have executed on the server based on a filter", + }, + Key: "TaskManager.createCollector", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create task", + Summary: "Create a task", + }, + Key: "TaskManager.createTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "createTaskWithEntityName", + Summary: "createTaskWithEntityName", + }, + Key: "TaskManager.createTaskWithEntityName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query disks for use in vSAN cluster", + Summary: "Queries disk eligibility for use in the vSAN cluster", + }, + Key: "host.VsanSystem.queryDisksForVsan", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add disks to vSAN", + Summary: "Adds the selected disks to the vSAN cluster", + }, + Key: "host.VsanSystem.addDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initialize disks in the vSAN cluster", + Summary: "Initializes the selected disks to be used in the vSAN cluster", + }, + Key: "host.VsanSystem.initializeDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove disk from vSAN", + Summary: "Removes the disks that are used in the vSAN cluster", + }, + Key: "host.VsanSystem.removeDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove disk group from vSAN", + Summary: "Removes the selected disk group from the vSAN cluster", + }, + Key: "host.VsanSystem.removeDiskMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unmountDiskMapping", + Summary: "unmountDiskMapping", + }, + Key: "host.VsanSystem.unmountDiskMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSAN configuration", + Summary: "Updates the vSAN configuration for this host", + }, + Key: "host.VsanSystem.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve vSAN runtime information", + Summary: "Retrieves the current vSAN runtime information for this host", + }, + Key: "host.VsanSystem.queryHostStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evacuate this host from vSAN cluster", + Summary: "Evacuates the specified host from the vSAN cluster", + }, + Key: "host.VsanSystem.evacuateNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Recommission this host back to vSAN cluster", + Summary: "Recommissions the host back to vSAN cluster", + }, + Key: "host.VsanSystem.recommissionNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve a ticket to register the vSAN VASA Provider", + Summary: "Retrieves a ticket to register the VASA Provider for vSAN in the Storage Monitoring Service", + }, + Key: "host.VsanSystem.fetchVsanSharedSecret", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.TagPolicy.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.TagPolicy.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.TagPolicy.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.TagPolicy.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.TagPolicy.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.TagPolicy.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.TagPolicy.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create alarm", + Summary: "Create a new alarm", + }, + Key: "alarm.AlarmManager.create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve alarm", + Summary: "Get available alarms defined on the entity", + }, + Key: "alarm.AlarmManager.getAlarm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get alarm actions enabled", + Summary: "Checks if alarm actions are enabled for an entity", + }, + Key: "alarm.AlarmManager.getAlarmActionsEnabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set alarm actions enabled", + Summary: "Enables or disables firing alarm actions for an entity", + }, + Key: "alarm.AlarmManager.setAlarmActionsEnabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get alarm state", + Summary: "The state of instantiated alarms on the entity", + }, + Key: "alarm.AlarmManager.getAlarmState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acknowledge alarm", + Summary: "Stops alarm actions from firing until the alarm next triggers on an entity", + }, + Key: "alarm.AlarmManager.acknowledgeAlarm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set alarm status", + Summary: "Sets the status of an alarm for an entity", + }, + Key: "alarm.AlarmManager.setAlarmStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "clearTriggeredAlarms", + Summary: "clearTriggeredAlarms", + }, + Key: "alarm.AlarmManager.clearTriggeredAlarms", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "testSMTPSetup", + Summary: "testSMTPSetup", + }, + Key: "alarm.AlarmManager.testSMTPSetup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create private alarm on managed entity", + Summary: "Creates a Private (trigger-only) Alarm on a managed entity", + }, + Key: "alarm.AlarmManager.createPrivateAlarm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query private alarms on managed entity", + Summary: "Retrieves all of the Private (trigger-only) Alarms defined on the specified managed entity", + }, + Key: "alarm.AlarmManager.queryPrivateAlarms", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Sync triggered alarms list", + Summary: "Retrieves the full list of currently-triggered Alarms, as a list of triggers", + }, + Key: "alarm.AlarmManager.syncTriggeredAlarms", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve queued-up alarm triggers", + Summary: "Retrieves any queued-up alarm triggers representing Alarm state changes since the last time this method was called", + }, + Key: "alarm.AlarmManager.retrieveTriggers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Distributed Port Group set custom value", + Summary: "Distributed Port Group set custom value", + }, + Key: "dvs.DistributedVirtualPortgroup.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload Distributed Port Group", + Summary: "Reload Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename Distributed Port Group", + Summary: "Rename Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete Distributed Port Group", + Summary: "Delete Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag to Distributed Port Group", + Summary: "Add tag to Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Distributed Port Group remove tag", + Summary: "Distributed Port Group remove tag", + }, + Key: "dvs.DistributedVirtualPortgroup.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "dvs.DistributedVirtualPortgroup.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Distributed Port Group delete network", + Summary: "Distributed Port Group delete network", + }, + Key: "dvs.DistributedVirtualPortgroup.destroyNetwork", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure Distributed Port Group", + Summary: "Reconfigure Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get Distributed Port Group configuration spec to rollback", + Summary: "Get Distributed Port Group configuration spec to rollback", + }, + Key: "dvs.DistributedVirtualPortgroup.rollback", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query CMMDS", + Summary: "Queries CMMDS contents in the vSAN cluster", + }, + Key: "host.VsanInternalSystem.queryCmmds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query physical vSAN disks", + Summary: "Queries the physical vSAN disks", + }, + Key: "host.VsanInternalSystem.queryPhysicalVsanDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN objects", + Summary: "Queries the vSAN objects in the cluster", + }, + Key: "host.VsanInternalSystem.queryVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN objects on physical disks", + Summary: "Queries the vSAN objects that have at least one component on the current set of physical disks", + }, + Key: "host.VsanInternalSystem.queryObjectsOnPhysicalVsanDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Drop ownership of DOM objects", + Summary: "Drop ownership of the DOM objects that are owned by this host", + }, + Key: "host.VsanInternalSystem.abdicateDomOwnership", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN statistics", + Summary: "Gathers low level statistic counters from the vSAN cluster", + }, + Key: "host.VsanInternalSystem.queryVsanStatistics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigures vSAN objects", + Summary: "Reconfigures the vSAN objects in the cluster", + }, + Key: "host.VsanInternalSystem.reconfigureDomObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN objects that are currently synchronizing data", + Summary: "Queries vSAN objects that are updating stale components or synchronizing new replicas", + }, + Key: "host.VsanInternalSystem.querySyncingVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Run diagnostics on vSAN disks", + Summary: "Runs diagnostic tests on vSAN physical disks and verifies if objects are successfully created on the disks", + }, + Key: "host.VsanInternalSystem.runVsanPhysicalDiskDiagnostics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attributes of vSAN objects", + Summary: "Shows the extended attributes of the vSAN objects", + }, + Key: "host.VsanInternalSystem.getVsanObjExtAttrs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configurable vSAN objects", + Summary: "Identifies the vSAN objects that can be reconfigured using the assigned storage policy in the current cluster", + }, + Key: "host.VsanInternalSystem.reconfigurationSatisfiable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN objects available for provisioning", + Summary: "Identifies the vSAN objects that are available for provisioning using the assigned storage policy in the current cluster", + }, + Key: "host.VsanInternalSystem.canProvisionObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteVsanObjects", + Summary: "deleteVsanObjects", + }, + Key: "host.VsanInternalSystem.deleteVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vSAN object format", + Summary: "Upgrade vSAN object format, to fit in vSAN latest features", + }, + Key: "host.VsanInternalSystem.upgradeVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryVsanObjectUuidsByFilter", + Summary: "queryVsanObjectUuidsByFilter", + }, + Key: "host.VsanInternalSystem.queryVsanObjectUuidsByFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN entities available for decommissioning", + Summary: "Identifies the vSAN entities that are available for decommissioning in the current cluster", + }, + Key: "host.VsanInternalSystem.canDecommission", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getNetworkIpSettings", + Summary: "getNetworkIpSettings", + }, + Key: "vdcs.IpManager.getNetworkIpSettings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "allocate", + Summary: "allocate", + }, + Key: "vdcs.IpManager.allocate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "release", + Summary: "release", + }, + Key: "vdcs.IpManager.release", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "releaseAll", + Summary: "releaseAll", + }, + Key: "vdcs.IpManager.releaseAll", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryAll", + Summary: "queryAll", + }, + Key: "vdcs.IpManager.queryAll", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve profile description", + Summary: "Retrieve profile description", + }, + Key: "profile.Profile.retrieveDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove profile", + Summary: "Remove profile", + }, + Key: "profile.Profile.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Associate entities", + Summary: "Associate entities with the profile", + }, + Key: "profile.Profile.associateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Dissociate entities", + Summary: "Dissociate entities from the profile", + }, + Key: "profile.Profile.dissociateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance against the profile", + }, + Key: "profile.Profile.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export profile", + Summary: "Export profile to a file", + }, + Key: "profile.Profile.exportProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Authenticate credentials in guest", + Summary: "Authenticate credentials in the guest operating system", + }, + Key: "vm.guest.AuthManager.validateCredentials", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire credentials in guest", + Summary: "Acquire credentials in the guest operating system", + }, + Key: "vm.guest.AuthManager.acquireCredentials", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Release credentials in guest", + Summary: "Release credentials in the guest operating system", + }, + Key: "vm.guest.AuthManager.releaseCredentials", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.TagPolicyOption.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.TagPolicyOption.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.TagPolicyOption.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.TagPolicyOption.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.TagPolicyOption.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.TagPolicyOption.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.TagPolicyOption.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update assigned license", + Summary: "Updates the license assigned to an entity", + }, + Key: "LicenseAssignmentManager.updateAssignedLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove assigned license", + Summary: "Removes an assignment of a license to an entity", + }, + Key: "LicenseAssignmentManager.removeAssignedLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query assigned licenses", + Summary: "Queries for all the licenses assigned to an entity or all entities", + }, + Key: "LicenseAssignmentManager.queryAssignedLicenses", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check feature availability", + Summary: "Checks if the corresponding features are licensed for a list of entities", + }, + Key: "LicenseAssignmentManager.isFeatureAvailable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update in-use status of a licensed feature", + Summary: "Updates in-use status of a licensed feature", + }, + Key: "LicenseAssignmentManager.updateFeatureInUse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register licenseable entity", + Summary: "Registers a licenseable entity", + }, + Key: "LicenseAssignmentManager.registerEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister licenseable entity", + Summary: "Unregisters an existing licenseable entity and releases any serial numbers assigned to it.", + }, + Key: "LicenseAssignmentManager.unregisterEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update license entity usage count", + Summary: "Updates the usage count of a license entity", + }, + Key: "LicenseAssignmentManager.updateUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upload license file", + Summary: "Uploads a license file to vCenter Server", + }, + Key: "LicenseAssignmentManager.uploadLicenseFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryAssignedLicensesEx", + Summary: "queryAssignedLicensesEx", + }, + Key: "LicenseAssignmentManager.queryAssignedLicensesEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateEntity", + Summary: "updateEntity", + }, + Key: "LicenseAssignmentManager.updateEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateEntitiesProperties", + Summary: "updateEntitiesProperties", + }, + Key: "LicenseAssignmentManager.updateEntitiesProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.VirtualDatacenter.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.VirtualDatacenter.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.VirtualDatacenter.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.VirtualDatacenter.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.VirtualDatacenter.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.VirtualDatacenter.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.VirtualDatacenter.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query options view", + Summary: "Returns nodes in the option hierarchy", + }, + Key: "option.OptionManager.queryView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update option values", + Summary: "Updates one or more properties", + }, + Key: "option.OptionManager.updateValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get diagnostic files", + Summary: "Gets the list of diagnostic files for a given system", + }, + Key: "DiagnosticManager.queryDescriptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Browse diagnostic manager", + Summary: "Returns part of a log file", + }, + Key: "DiagnosticManager.browse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate system logs bundles", + Summary: "Instructs the server to generate system logs bundles", + }, + Key: "DiagnosticManager.generateLogBundles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query file hash", + Summary: "Queries file integrity information", + }, + Key: "DiagnosticManager.queryFileHash", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.ContentLibraryItem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.ContentLibraryItem.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.ContentLibraryItem.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.ContentLibraryItem.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.ContentLibraryItem.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.ContentLibraryItem.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.ContentLibraryItem.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a host profile", + Summary: "Create a host profile", + }, + Key: "profile.host.ProfileManager.createProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query policy metadata", + Summary: "Query policy metadata", + }, + Key: "profile.host.ProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find associated profile", + Summary: "Find associated profile", + }, + Key: "profile.host.ProfileManager.findAssociatedProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply host configuration", + Summary: "Apply host configuration", + }, + Key: "profile.host.ProfileManager.applyHostConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryMetadata", + Summary: "queryMetadata", + }, + Key: "profile.host.ProfileManager.queryMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate configuration task list for host profile", + Summary: "Generates a list of configuration tasks to be performed when applying a host profile", + }, + Key: "profile.host.ProfileManager.generateConfigTaskList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate task list", + Summary: "Generate task list", + }, + Key: "profile.host.ProfileManager.generateTaskList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile metadata", + Summary: "Query profile metadata", + }, + Key: "profile.host.ProfileManager.queryProfileMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query metadata for profile categories", + Summary: "Retrieves the metadata for a set of profile categories", + }, + Key: "profile.host.ProfileManager.queryProfileCategoryMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query metadata for profile components", + Summary: "Retrieves the metadata for a set of profile components", + }, + Key: "profile.host.ProfileManager.queryProfileComponentMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile structure", + Summary: "Gets information about the structure of a profile", + }, + Key: "profile.host.ProfileManager.queryProfileStructure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create default profile", + Summary: "Create default profile", + }, + Key: "profile.host.ProfileManager.createDefaultProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host customizations", + Summary: "Update host customizations for host", + }, + Key: "profile.host.ProfileManager.updateAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate host customizations", + Summary: "Validate host customizations for host", + }, + Key: "profile.host.ProfileManager.validateAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve host customizations", + Summary: "Returns the host customization data associated with a particular host", + }, + Key: "profile.host.ProfileManager.retrieveAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveAnswerFileForProfile", + Summary: "retrieveAnswerFileForProfile", + }, + Key: "profile.host.ProfileManager.retrieveAnswerFileForProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export host customizations", + Summary: "Export host customizations for host", + }, + Key: "profile.host.ProfileManager.exportAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check host customizations status", + Summary: "Check the status of the host customizations against associated profile", + }, + Key: "profile.host.ProfileManager.checkAnswerFileStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host customization status", + Summary: "Returns the status of the host customization data associated with the specified hosts", + }, + Key: "profile.host.ProfileManager.queryAnswerFileStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host customizations", + Summary: "Update host customizations", + }, + Key: "profile.host.ProfileManager.updateHostCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "validateHostCustomizations", + Summary: "validateHostCustomizations", + }, + Key: "profile.host.ProfileManager.validateHostCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostCustomizations", + Summary: "retrieveHostCustomizations", + }, + Key: "profile.host.ProfileManager.retrieveHostCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostCustomizationsForProfile", + Summary: "retrieveHostCustomizationsForProfile", + }, + Key: "profile.host.ProfileManager.retrieveHostCustomizationsForProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export host customizations", + Summary: "Export host customizations", + }, + Key: "profile.host.ProfileManager.exportCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import host customizations", + Summary: "Import host customizations", + }, + Key: "profile.host.ProfileManager.importCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Pre-check Remediation", + Summary: "Checks customization data and host state is valid for remediation", + }, + Key: "profile.host.ProfileManager.generateHostConfigTaskSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Batch apply host configuration", + Summary: "Batch apply host configuration", + }, + Key: "profile.host.ProfileManager.applyEntitiesConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare validation of settings to be copied", + Summary: "Generate differences between source and target host profile to validate settings to be copied", + }, + Key: "profile.host.ProfileManager.validateComposition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy settings to host profiles", + Summary: "Copy settings to host profiles", + }, + Key: "profile.host.ProfileManager.compositeProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update the VASA provider state", + Summary: "Updates the VASA provider state for the specified datastores", + }, + Key: "VasaVvolManager.updateVasaProviderState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Virtual Volume datastore", + Summary: "Creates a new Virtual Volume datastore", + }, + Key: "VasaVvolManager.createVVolDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Virtual Volume datastore", + Summary: "Remove Virtual Volume datastore from specified hosts", + }, + Key: "VasaVvolManager.removeVVolDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update the VASA client context", + Summary: "Updates the VASA client context on the host", + }, + Key: "VasaVvolManager.updateVasaClientContext", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate vMotion migration of VMs to hosts", + Summary: "Checks whether the specified VMs can be migrated with vMotion to all the specified hosts", + }, + Key: "vm.check.ProvisioningChecker.queryVMotionCompatibilityEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate migration of VM to destination", + Summary: "Checks whether the VM can be migrated to the specified destination host, resource pool, and datastores", + }, + Key: "vm.check.ProvisioningChecker.checkMigrate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate relocation of VM to destination", + Summary: "Checks whether the VM can be relocated to the specified destination host, resource pool, and datastores", + }, + Key: "vm.check.ProvisioningChecker.checkRelocate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate cloning VM to destination", + Summary: "Checks whether the VM can be cloned to the specified destination host, resource pool, and datastores", + }, + Key: "vm.check.ProvisioningChecker.checkClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "checkInstantClone", + Summary: "checkInstantClone", + }, + Key: "vm.check.ProvisioningChecker.checkInstantClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove inventory view", + Summary: "Remove the inventory view object", + }, + Key: "view.InventoryView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open inventory view folder", + Summary: "Adds the child objects of a given managed entity to the view", + }, + Key: "view.InventoryView.openFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Close inventory view", + Summary: "Notify the server that folders have been closed", + }, + Key: "view.InventoryView.closeFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete container view", + Summary: "Remove a list view object from current contents of this view", + }, + Key: "view.ContainerView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create profile", + Summary: "Create profile", + }, + Key: "profile.ProfileManager.createProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query policy metadata", + Summary: "Query policy metadata", + }, + Key: "profile.ProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find associated profile", + Summary: "Find associated profile", + }, + Key: "profile.ProfileManager.findAssociatedProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set event history latest page size", + Summary: "Set the last page viewed size of event history", + }, + Key: "event.EventHistoryCollector.setLatestPageSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rewind event history", + Summary: "Moves view to the oldest item of event history", + }, + Key: "event.EventHistoryCollector.rewind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset event history", + Summary: "Moves view to the newest item of event history", + }, + Key: "event.EventHistoryCollector.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove event history", + Summary: "Removes the event history collector", + }, + Key: "event.EventHistoryCollector.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read next event history", + Summary: "Reads view from current position of event history, and then the position is moved to the next newer page", + }, + Key: "event.EventHistoryCollector.readNext", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read previous event history", + Summary: "Reads view from current position of event history and moves the position to the next older page", + }, + Key: "event.EventHistoryCollector.readPrev", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSubSpecificationByFile", + Summary: "updateHostSubSpecificationByFile", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.updateHostSubSpecificationByFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSubSpecificationByData", + Summary: "updateHostSubSpecificationByData", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.updateHostSubSpecificationByData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostSpecification", + Summary: "retrieveHostSpecification", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.retrieveHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteHostSubSpecification", + Summary: "deleteHostSubSpecification", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.deleteHostSubSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual NIC custom value", + Summary: "Set the value of a custom filed of a host's virtual NIC manager", + }, + Key: "host.VirtualNicManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query network configuration", + Summary: "Gets the network configuration for the specified NIC type", + }, + Key: "host.VirtualNicManager.queryNetConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Select virtual NIC", + Summary: "Select the virtual NIC to be used for the specified NIC type", + }, + Key: "host.VirtualNicManager.selectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deselect virtual NIC", + Summary: "Deselect the virtual NIC used for the specified NIC type", + }, + Key: "host.VirtualNicManager.deselectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query latest statistics for a virtual machine", + Summary: "Queries the latest values of performance statistics of a virtual machine", + }, + Key: "InternalStatsCollector.queryLatestVmStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure host power management policy", + Summary: "Configure host power management policy", + }, + Key: "host.PowerSystem.configurePolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set a custom value for EVC manager", + Summary: "Sets a value in the custom field for Enhanced vMotion Compatibility manager", + }, + Key: "cluster.EVCManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable/reconfigure EVC", + Summary: "Enable/reconfigure Enhanced vMotion Compatibility in a cluster", + }, + Key: "cluster.EVCManager.configureEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable cluster EVC", + Summary: "Disable Enhanced vMotion Compatibility in a cluster", + }, + Key: "cluster.EVCManager.disableEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate EVC configuration", + Summary: "Validates the configuration of Enhanced vMotion Compatibility mode in the managed cluster", + }, + Key: "cluster.EVCManager.checkConfigureEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate hosts in EVC", + Summary: "Validates new hosts in the Enhanced vMotion Compatibility cluster", + }, + Key: "cluster.EVCManager.checkAddHostEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual flash resource", + Summary: "Configures virtual flash resource on a list of SSD devices", + }, + Key: "host.VFlashManager.configureVFlashResourceEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual flash resource", + Summary: "Configures virtual flash resource on a host", + }, + Key: "host.VFlashManager.configureVFlashResource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual flash resource", + Summary: "Removes virtual flash resource from a host", + }, + Key: "host.VFlashManager.removeVFlashResource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual flash host swap cache", + Summary: "Configures virtual flash host swap cache", + }, + Key: "host.VFlashManager.configureHostVFlashCache", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve virtual flash module configuration options from a host", + Summary: "Retrieves virtual flash module configuration options from a host", + }, + Key: "host.VFlashManager.getVFlashModuleDefaultConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set managed entity custom value", + Summary: "Sets the value of a custom field of a managed entity", + }, + Key: "ManagedEntity.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload managed entity", + Summary: "Reload the entity state", + }, + Key: "ManagedEntity.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename managed entity", + Summary: "Rename this entity", + }, + Key: "ManagedEntity.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove entity", + Summary: "Deletes the entity and removes it from parent folder", + }, + Key: "ManagedEntity.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the entity", + }, + Key: "ManagedEntity.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the entity", + }, + Key: "ManagedEntity.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ManagedEntity.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve host profile description", + Summary: "Retrieve host profile description", + }, + Key: "profile.host.HostProfile.retrieveDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete host profile", + Summary: "Delete host profile", + }, + Key: "profile.host.HostProfile.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach host profile", + Summary: "Attach host profile to host or cluster", + }, + Key: "profile.host.HostProfile.associateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach host profile", + Summary: "Detach host profile from host or cluster", + }, + Key: "profile.host.HostProfile.dissociateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance of a host or cluster against a host profile", + }, + Key: "profile.host.HostProfile.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export host profile", + Summary: "Export host profile to a file", + }, + Key: "profile.host.HostProfile.exportProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update reference host", + Summary: "Update reference host", + }, + Key: "profile.host.HostProfile.updateReferenceHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host profile", + Summary: "Update host profile", + }, + Key: "profile.host.HostProfile.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "validate", + Summary: "validate", + }, + Key: "profile.host.HostProfile.validate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute profile", + Summary: "Execute profile", + }, + Key: "profile.host.HostProfile.execute", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure AutoStart Manager", + Summary: "Changes the power on or power off sequence", + }, + Key: "host.AutoStartManager.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Auto power On", + Summary: "Powers On virtual machines according to the current AutoStart configuration", + }, + Key: "host.AutoStartManager.autoPowerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Auto power Off", + Summary: "Powers Off virtual machines according to the current AutoStart configuration", + }, + Key: "host.AutoStartManager.autoPowerOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register Fault Tolerant Secondary VM", + Summary: "Registers a Secondary VM with a Fault Tolerant Primary VM", + }, + Key: "host.FaultToleranceManager.registerSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister Fault Tolerant Secondary VM", + Summary: "Unregister a Secondary VM from the associated Primary VM", + }, + Key: "host.FaultToleranceManager.unregisterSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Make Primary VM", + Summary: "Test Fault Tolerance failover by making a Secondary VM in a Fault Tolerance pair the Primary VM", + }, + Key: "host.FaultToleranceManager.makePrimary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Make peer VM primary", + Summary: "Makes the peer VM primary and terminates the local virtual machine", + }, + Key: "host.FaultToleranceManager.goLivePeerVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop Fault Tolerant virtual machine", + Summary: "Stop a specified virtual machine in a Fault Tolerant pair", + }, + Key: "host.FaultToleranceManager.terminateFaultTolerantVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable Secondary VM", + Summary: "Disable Fault Tolerance on a specified Secondary VM", + }, + Key: "host.FaultToleranceManager.disableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable Secondary VM", + Summary: "Enable Fault Tolerance on a specified Secondary VM", + }, + Key: "host.FaultToleranceManager.enableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start Fault Tolerant Secondary VM", + Summary: "Start Fault Tolerant Secondary VM on remote host", + }, + Key: "host.FaultToleranceManager.startSecondaryOnRemoteHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister Fault Tolerance", + Summary: "Unregister the Fault Tolerance service", + }, + Key: "host.FaultToleranceManager.unregister", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set local VM component health", + Summary: "Sets the component health information of the specified local virtual machine", + }, + Key: "host.FaultToleranceManager.setLocalVMComponentHealth", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get peer VM component health", + Summary: "Gets component health information of the FT peer of the specified local virtual machine", + }, + Key: "host.FaultToleranceManager.getPeerVMComponentHealth", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add custom field", + Summary: "Creates a new custom property", + }, + Key: "CustomFieldsManager.addFieldDefinition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove custom field", + Summary: "Removes a custom property", + }, + Key: "CustomFieldsManager.removeFieldDefinition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename custom property", + Summary: "Renames a custom property", + }, + Key: "CustomFieldsManager.renameFieldDefinition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set custom field", + Summary: "Assigns a value to a custom property", + }, + Key: "CustomFieldsManager.setField", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get ManagedEntities", + Summary: "Get the list of ManagedEntities that the name is a Substring of the custom field name and the value is a Substring of the field value.", + }, + Key: "CustomFieldsManager.getEntitiesWithCustomFieldAndValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomFields", + Summary: "retrieveCustomFields", + }, + Key: "CustomFieldsManager.retrieveCustomFields", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update agent virtual machine information", + Summary: "Updates agent virtual machine information", + }, + Key: "EsxAgentConfigManager.updateAgentVmInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query agent virtual machine information", + Summary: "Returns the state for each of the specified agent virtual machines", + }, + Key: "EsxAgentConfigManager.queryAgentVmInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update compute resource agent information", + Summary: "Updates the number of required agent virtual machines for one or more compute resources", + }, + Key: "EsxAgentConfigManager.updateComputeResourceAgentInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compute resource agent information", + Summary: "Retrieves the agent information for one or more compute resources", + }, + Key: "EsxAgentConfigManager.queryComputeResourceAgentInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set folder custom value", + Summary: "Sets the value of a custom field of a folder", + }, + Key: "Folder.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload folder", + Summary: "Reloads the folder", + }, + Key: "Folder.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename folder", + Summary: "Rename the folder", + }, + Key: "Folder.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete folder", + Summary: "Delete this object, deleting its contents and removing it from its parent folder (if any)", + }, + Key: "Folder.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the folder", + }, + Key: "Folder.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the folder", + }, + Key: "Folder.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Folder.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create folder", + Summary: "Creates a new folder", + }, + Key: "Folder.createFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move entities", + Summary: "Moves a set of managed entities into this folder", + }, + Key: "Folder.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Create a new virtual machine", + }, + Key: "Folder.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to the folder", + }, + Key: "Folder.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Create a new cluster compute-resource in this folder", + }, + Key: "Folder.createCluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Create a new cluster compute-resource in this folder", + }, + Key: "Folder.createClusterEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host", + Summary: "Create a new single-host compute-resource", + }, + Key: "Folder.addStandaloneHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host and enable lockdown", + Summary: "Create a new single-host compute-resource and enable lockdown mode on the host", + }, + Key: "Folder.addStandaloneHostWithAdminDisabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create datacenter", + Summary: "Create a new datacenter with the given name", + }, + Key: "Folder.createDatacenter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister and Delete", + Summary: "Recursively deletes all child virtual machine folders and unregisters all virtual machines", + }, + Key: "Folder.unregisterAndDestroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a vSphere Distributed Switch", + Summary: "Create a vSphere Distributed Switch", + }, + Key: "Folder.createDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a datastore cluster", + Summary: "Create a datastore cluster", + }, + Key: "Folder.createStoragePod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSpecification", + Summary: "updateHostSpecification", + }, + Key: "profile.host.HostSpecificationManager.updateHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSubSpecification", + Summary: "updateHostSubSpecification", + }, + Key: "profile.host.HostSpecificationManager.updateHostSubSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostSpecification", + Summary: "retrieveHostSpecification", + }, + Key: "profile.host.HostSpecificationManager.retrieveHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteHostSubSpecification", + Summary: "deleteHostSubSpecification", + }, + Key: "profile.host.HostSpecificationManager.deleteHostSubSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteHostSpecification", + Summary: "deleteHostSpecification", + }, + Key: "profile.host.HostSpecificationManager.deleteHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getUpdatedHosts", + Summary: "getUpdatedHosts", + }, + Key: "profile.host.HostSpecificationManager.getUpdatedHosts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster profile", + Summary: "Create cluster profile", + }, + Key: "profile.cluster.ProfileManager.createProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query policy metadata", + Summary: "Query policy metadata", + }, + Key: "profile.cluster.ProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find associated profile", + Summary: "Find associated profile", + }, + Key: "profile.cluster.ProfileManager.findAssociatedProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host kernel modules", + Summary: "Retrieves information about the kernel modules on the host", + }, + Key: "host.KernelModuleSystem.queryModules", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update kernel module option", + Summary: "Specifies the options to be passed to the kernel module when loaded", + }, + Key: "host.KernelModuleSystem.updateModuleOptionString", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query kernel module options", + Summary: "Retrieves the options configured to be passed to a kernel module when loaded", + }, + Key: "host.KernelModuleSystem.queryConfiguredModuleOptionString", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set storage custom value", + Summary: "Sets the value of a custom field of a host storage system", + }, + Key: "host.StorageSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve disk partition information", + Summary: "Gets the partition information for the disks named by the device names", + }, + Key: "host.StorageSystem.retrieveDiskPartitionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Compute disk partition information", + Summary: "Computes the disk partition information given the desired disk layout", + }, + Key: "host.StorageSystem.computeDiskPartitionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Compute disk partition information for resize", + Summary: "Compute disk partition information for resizing a partition", + }, + Key: "host.StorageSystem.computeDiskPartitionInfoForResize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update disk partitions", + Summary: "Change the partitions on the disk by supplying a partition specification and the device name", + }, + Key: "host.StorageSystem.updateDiskPartitions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Format VMFS", + Summary: "Formats a new VMFS on a disk partition", + }, + Key: "host.StorageSystem.formatVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mount VMFS volume", + Summary: "Mounts an unmounted VMFS volume", + }, + Key: "host.StorageSystem.mountVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount VMFS volume", + Summary: "Unmount a mounted VMFS volume", + }, + Key: "host.StorageSystem.unmountVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount VMFS volumes", + Summary: "Unmounts one or more mounted VMFS volumes", + }, + Key: "host.StorageSystem.unmountVmfsVolumeEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "mountVmfsVolumeEx", + Summary: "mountVmfsVolumeEx", + }, + Key: "host.StorageSystem.mountVmfsVolumeEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unmapVmfsVolumeEx", + Summary: "unmapVmfsVolumeEx", + }, + Key: "host.StorageSystem.unmapVmfsVolumeEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete state information for unmounted VMFS volume", + Summary: "Removes the state information for a previously unmounted VMFS volume", + }, + Key: "host.StorageSystem.deleteVmfsVolumeState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan VMFS", + Summary: "Rescan for new VMFS volumes", + }, + Key: "host.StorageSystem.rescanVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend VMFS", + Summary: "Extend a VMFS by attaching a disk partition", + }, + Key: "host.StorageSystem.attachVmfsExtent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Expand VMFS extent", + Summary: "Expand the capacity of the VMFS extent", + }, + Key: "host.StorageSystem.expandVmfsExtent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade VMFS", + Summary: "Upgrade the VMFS to the current VMFS version", + }, + Key: "host.StorageSystem.upgradeVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate virtual machine disks", + Summary: "Relocate the disks for all virtual machines into directories if stored in the ROOT", + }, + Key: "host.StorageSystem.upgradeVmLayout", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query unbound VMFS volumes", + Summary: "Query for the list of unbound VMFS volumes", + }, + Key: "host.StorageSystem.queryUnresolvedVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve VMFS volumes", + Summary: "Resolve the detected copies of VMFS volumes", + }, + Key: "host.StorageSystem.resolveMultipleUnresolvedVmfsVolumes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve VMFS volumes", + Summary: "Resolves the detected copies of VMFS volumes", + }, + Key: "host.StorageSystem.resolveMultipleUnresolvedVmfsVolumesEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount force mounted VMFS", + Summary: "Unmounts a force mounted VMFS volume", + }, + Key: "host.StorageSystem.unmountForceMountedVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan HBA", + Summary: "Rescan a specific storage adapter for new storage devices", + }, + Key: "host.StorageSystem.rescanHba", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan all HBAs", + Summary: "Rescan all storage adapters for new storage devices", + }, + Key: "host.StorageSystem.rescanAllHba", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change Software Internet SCSI Status", + Summary: "Enables or disables Software Internet SCSI", + }, + Key: "host.StorageSystem.updateSoftwareInternetScsiEnabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI discovery properties", + Summary: "Updates the discovery properties for an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiDiscoveryProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI authentication properties", + Summary: "Updates the authentication properties for an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiAuthenticationProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI digest properties", + Summary: "Update the digest properties of an Internet SCSI host bus adapter or target", + }, + Key: "host.StorageSystem.updateInternetScsiDigestProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI advanced options", + Summary: "Update the advanced options of an Internet SCSI host bus adapter or target", + }, + Key: "host.StorageSystem.updateInternetScsiAdvancedOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI IP properties", + Summary: "Updates the IP properties for an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiIPProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI name", + Summary: "Updates the name of an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI alias", + Summary: "Updates the alias of an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiAlias", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Internet SCSI send targets", + Summary: "Adds send target entries to the host bus adapter discovery list", + }, + Key: "host.StorageSystem.addInternetScsiSendTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Internet SCSI send targets", + Summary: "Removes send target entries from the host bus adapter discovery list", + }, + Key: "host.StorageSystem.removeInternetScsiSendTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Internet SCSI static targets ", + Summary: "Adds static target entries to the host bus adapter discovery list", + }, + Key: "host.StorageSystem.addInternetScsiStaticTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Internet SCSI static targets", + Summary: "Removes static target entries from the host bus adapter discovery list", + }, + Key: "host.StorageSystem.removeInternetScsiStaticTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable multiple path", + Summary: "Enable a path for a logical unit", + }, + Key: "host.StorageSystem.enableMultipathPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable multiple path", + Summary: "Disable a path for a logical unit", + }, + Key: "host.StorageSystem.disableMultipathPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set logical unit policy", + Summary: "Set the multipath policy for a logical unit ", + }, + Key: "host.StorageSystem.setMultipathLunPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query path selection policy options", + Summary: "Queries the set of path selection policy options", + }, + Key: "host.StorageSystem.queryPathSelectionPolicyOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query storage array type policy options", + Summary: "Queries the set of storage array type policy options", + }, + Key: "host.StorageSystem.queryStorageArrayTypePolicyOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update SCSI LUN display name", + Summary: "Updates the display name of a SCSI LUN", + }, + Key: "host.StorageSystem.updateScsiLunDisplayName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach SCSI LUN", + Summary: "Blocks I/O operations to the attached SCSI LUN", + }, + Key: "host.StorageSystem.detachScsiLun", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach SCSI LUNs", + Summary: "Blocks I/O operations to one or more attached SCSI LUNs", + }, + Key: "host.StorageSystem.detachScsiLunEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete state information for detached SCSI LUN", + Summary: "Removes the state information for a previously detached SCSI LUN", + }, + Key: "host.StorageSystem.deleteScsiLunState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach SCSI LUN", + Summary: "Allow I/O issue to the specified detached SCSI LUN", + }, + Key: "host.StorageSystem.attachScsiLun", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach SCSI LUNs", + Summary: "Enables I/O operations to one or more detached SCSI LUNs", + }, + Key: "host.StorageSystem.attachScsiLunEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh host storage system", + Summary: "Refresh the storage information and settings to pick up any changes that have occurred", + }, + Key: "host.StorageSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Discover FCOE storage", + Summary: "Discovers new storage using FCOE", + }, + Key: "host.StorageSystem.discoverFcoeHbas", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update FCOE HBA state", + Summary: "Mark or unmark the specified FCOE HBA for removal from the host system", + }, + Key: "host.StorageSystem.markForRemoval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Format VFFS", + Summary: "Formats a new VFFS on a SSD disk", + }, + Key: "host.StorageSystem.formatVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend VFFS", + Summary: "Extends a VFFS by attaching a SSD disk", + }, + Key: "host.StorageSystem.extendVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete VFFS", + Summary: "Deletes a VFFS from the host", + }, + Key: "host.StorageSystem.destroyVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mounts VFFS volume", + Summary: "Mounts an unmounted VFFS volume", + }, + Key: "host.StorageSystem.mountVffsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmounts VFFS volume", + Summary: "Unmounts a mounted VFFS volume", + }, + Key: "host.StorageSystem.unmountVffsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete state information for unmounted VFFS volume", + Summary: "Removes the state information for a previously unmounted VFFS volume", + }, + Key: "host.StorageSystem.deleteVffsVolumeState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan VFFS", + Summary: "Rescans for new VFFS volumes", + }, + Key: "host.StorageSystem.rescanVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query available SSD disks", + Summary: "Queries available SSD disks", + }, + Key: "host.StorageSystem.queryAvailableSsds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set NFS user", + Summary: "Sets an NFS user", + }, + Key: "host.StorageSystem.setNFSUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change NFS user password", + Summary: "Changes the password of an NFS user", + }, + Key: "host.StorageSystem.changeNFSUserPassword", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query NFS user", + Summary: "Queries an NFS user", + }, + Key: "host.StorageSystem.queryNFSUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear NFS user", + Summary: "Deletes an NFS user", + }, + Key: "host.StorageSystem.clearNFSUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn on disk locator LEDs", + Summary: "Turns on one or more disk locator LEDs", + }, + Key: "host.StorageSystem.turnDiskLocatorLedOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn off locator LEDs", + Summary: "Turns off one or more disk locator LEDs", + }, + Key: "host.StorageSystem.turnDiskLocatorLedOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a flash disk", + Summary: "Marks the disk as a flash disk", + }, + Key: "host.StorageSystem.markAsSsd", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a HDD disk", + Summary: "Marks the disk as a HDD disk", + }, + Key: "host.StorageSystem.markAsNonSsd", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a local disk", + Summary: "Marks the disk as a local disk", + }, + Key: "host.StorageSystem.markAsLocal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a remote disk", + Summary: "Marks the disk as a remote disk", + }, + Key: "host.StorageSystem.markAsNonLocal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "QueryIoFilterProviderId", + Summary: "QueryIoFilterProviderId", + }, + Key: "host.StorageSystem.QueryIoFilterProviderId", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "FetchIoFilterSharedSecret", + Summary: "FetchIoFilterSharedSecret", + }, + Key: "host.StorageSystem.FetchIoFilterSharedSecret", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update VMFS unmap priority", + Summary: "Updates the priority of VMFS space reclamation operation", + }, + Key: "host.StorageSystem.updateVmfsUnmapPriority", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query VMFS config option", + Summary: "Query VMFS config option", + }, + Key: "host.StorageSystem.queryVmfsConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set EVC manager custom value", + Summary: "Sets the value of a custom field for an Enhanced vMotion Compatibility manager", + }, + Key: "cluster.TransitionalEVCManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure cluster EVC", + Summary: "Enable/reconfigure Enhanced vMotion Compatibility for a cluster", + }, + Key: "cluster.TransitionalEVCManager.configureEVC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable cluster EVC", + Summary: "Disable Enhanced vMotion Compatibility for a cluster", + }, + Key: "cluster.TransitionalEVCManager.disableEVC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate EVC mode for cluster", + Summary: "Test the validity of configuring Enhanced vMotion Compatibility mode on the managed cluster", + }, + Key: "cluster.TransitionalEVCManager.checkConfigureEVC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate host for EVC cluster", + Summary: "Tests the validity of adding a host into the Enhanced vMotion Compatibility cluster", + }, + Key: "cluster.TransitionalEVCManager.checkAddHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve argument description for event type", + Summary: "Retrieves the argument meta-data for a given event type", + }, + Key: "event.EventManager.retrieveArgumentDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create event collector", + Summary: "Creates an event collector to retrieve all server events based on a filter", + }, + Key: "event.EventManager.createCollector", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Log user event", + Summary: "Logs a user-defined event", + }, + Key: "event.EventManager.logUserEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get events", + Summary: "Provides the events selected by the specified filter", + }, + Key: "event.EventManager.QueryEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query events by IDs", + Summary: "Returns the events specified by a list of IDs", + }, + Key: "event.EventManager.queryEventsById", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Post event", + Summary: "Posts the specified event", + }, + Key: "event.EventManager.postEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query latest events in event filter", + Summary: "Query the latest events in the specified filter", + }, + Key: "event.EventManager.queryLastEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create default host profile of specified type", + Summary: "Creates a default host profile of the specified type", + }, + Key: "profile.host.profileEngine.HostProfileManager.createDefaultProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile policy option metadata", + Summary: "Gets the profile policy option metadata for the specified policy names", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile metadata", + Summary: "Gets the profile metadata for the specified profile names and profile types", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile category metadata", + Summary: "Gets the profile category metadata for the specified category names", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileCategoryMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile component metadata", + Summary: "Gets the profile component metadata for the specified component names", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileComponentMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute host profile manager engine", + Summary: "Executes the host profile manager engine", + }, + Key: "profile.host.profileEngine.HostProfileManager.execute", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Bookkeep host profile", + Summary: "Bookkeep host profile", + }, + Key: "profile.host.profileEngine.HostProfileManager.bookKeep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve profile description", + Summary: "Retrieves description of a profile", + }, + Key: "profile.host.profileEngine.HostProfileManager.retrieveProfileDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update configuration tasks from host configuration", + Summary: "Update configuration tasks from host configuration", + }, + Key: "profile.host.profileEngine.HostProfileManager.updateTaskConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateTaskList", + Summary: "generateTaskList", + }, + Key: "profile.host.profileEngine.HostProfileManager.generateTaskList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateHostConfigTaskSpec", + Summary: "generateHostConfigTaskSpec", + }, + Key: "profile.host.profileEngine.HostProfileManager.generateHostConfigTaskSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve profile from host configuration", + Summary: "Retrieves a profile from the host's configuration", + }, + Key: "profile.host.profileEngine.HostProfileManager.retrieveProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare host profile for export", + Summary: "Prepares a host profile for export", + }, + Key: "profile.host.profileEngine.HostProfileManager.prepareExport", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query user input policy options", + Summary: "Gets a list of policy options that are set to require user inputs", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryUserInputPolicyOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile structure", + Summary: "Gets information about the structure of a profile", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileStructure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply host configuration", + Summary: "Applies the specified host configuration to the host", + }, + Key: "profile.host.profileEngine.HostProfileManager.applyHostConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host profile manager state", + Summary: "Gets the current state of the host profile manager and plug-ins on a host", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set backup agent custom value", + Summary: "Set backup agent custom value", + }, + Key: "vm.BackupAgent.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start virtual machine backup", + Summary: "Start a backup operation inside the virtual machine guest", + }, + Key: "vm.BackupAgent.startBackup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop virtual machine backup", + Summary: "Stop a backup operation in a virtual machine", + }, + Key: "vm.BackupAgent.abortBackup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify virtual machine snapshot completion", + Summary: "Notify the virtual machine when a snapshot operation is complete", + }, + Key: "vm.BackupAgent.notifySnapshotCompletion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Wait for guest event", + Summary: "Wait for an event delivered by the virtual machine guest", + }, + Key: "vm.BackupAgent.waitForEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh hardware information", + Summary: "Refresh hardware information", + }, + Key: "host.HealthStatusSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset system health sensors", + Summary: "Resets the state of the sensors of the IPMI subsystem", + }, + Key: "host.HealthStatusSystem.resetSystemHealthInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear hardware IPMI System Event Log", + Summary: "Clear hardware IPMI System Event Log", + }, + Key: "host.HealthStatusSystem.clearSystemEventLog", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh hardware IPMI System Event Log", + Summary: "Refresh hardware IPMI System Event Log", + }, + Key: "host.HealthStatusSystem.FetchSystemEventLog", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a virtual disk object", + Summary: "Create a virtual disk object", + }, + Key: "vslm.vcenter.VStorageObjectManager.createDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register a legacy disk to be a virtual disk object", + Summary: "Register a legacy disk to be a virtual disk object", + }, + Key: "vslm.vcenter.VStorageObjectManager.registerDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend a virtual disk to the new capacity", + Summary: "Extend a virtual disk to the new capacity", + }, + Key: "vslm.vcenter.VStorageObjectManager.extendDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inflate a thin virtual disk", + Summary: "Inflate a thin virtual disk", + }, + Key: "vslm.vcenter.VStorageObjectManager.inflateDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename a virtual storage object", + Summary: "Rename a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.renameVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update storage policy on a virtual storage object", + Summary: "Update storage policy on a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.updateVStorageObjectPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a virtual storage object", + Summary: "Delete a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.deleteVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve a virtual storage object", + Summary: "Retrieve a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.retrieveVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveVStorageObjectState", + Summary: "retrieveVStorageObjectState", + }, + Key: "vslm.vcenter.VStorageObjectManager.retrieveVStorageObjectState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List virtual storage objects on a datastore", + Summary: "List virtual storage objects on a datastore", + }, + Key: "vslm.vcenter.VStorageObjectManager.listVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone a virtual storage object", + Summary: "Clone a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.cloneVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate a virtual storage object", + Summary: "Relocate a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.relocateVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "attachTagToVStorageObject", + Summary: "attachTagToVStorageObject", + }, + Key: "vslm.vcenter.VStorageObjectManager.attachTagToVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "detachTagFromVStorageObject", + Summary: "detachTagFromVStorageObject", + }, + Key: "vslm.vcenter.VStorageObjectManager.detachTagFromVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listVStorageObjectsAttachedToTag", + Summary: "listVStorageObjectsAttachedToTag", + }, + Key: "vslm.vcenter.VStorageObjectManager.listVStorageObjectsAttachedToTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listTagsAttachedToVStorageObject", + Summary: "listTagsAttachedToVStorageObject", + }, + Key: "vslm.vcenter.VStorageObjectManager.listTagsAttachedToVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconcile datastore inventory", + Summary: "Reconcile datastore inventory", + }, + Key: "vslm.vcenter.VStorageObjectManager.reconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Schedule reconcile datastore inventory", + Summary: "Schedule reconcile datastore inventory", + }, + Key: "vslm.vcenter.VStorageObjectManager.scheduleReconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare a vCenter HA setup", + Summary: "Prepare vCenter HA setup on the local vCenter Server", + }, + Key: "vcha.FailoverClusterConfigurator.prepare", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy a vCenter HA cluster", + Summary: "Deploy and configure vCenter HA on the local vCenter Server", + }, + Key: "vcha.FailoverClusterConfigurator.deploy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure a vCenter HA cluster", + Summary: "Configure vCenter HA on the local vCenter Server", + }, + Key: "vcha.FailoverClusterConfigurator.configure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create passive node", + Summary: "Create a passive node in a vCenter HA Cluster", + }, + Key: "vcha.FailoverClusterConfigurator.createPassiveNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create witness node", + Summary: "Create a witness node in a vCenter HA Cluster", + }, + Key: "vcha.FailoverClusterConfigurator.createWitnessNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getConfig", + Summary: "getConfig", + }, + Key: "vcha.FailoverClusterConfigurator.getConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Destroy the vCenter HA cluster", + Summary: "Destroy the vCenter HA cluster setup and remove all configuration files", + }, + Key: "vcha.FailoverClusterConfigurator.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set graphics manager custom value", + Summary: "Sets the value of a custom field of the graphics manager", + }, + Key: "host.GraphicsManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh graphics information", + Summary: "Refresh graphics device information", + }, + Key: "host.GraphicsManager.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check if shared graphics is active", + Summary: "Check if shared graphics is active on the host", + }, + Key: "host.GraphicsManager.isSharedGraphicsActive", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateGraphicsConfig", + Summary: "updateGraphicsConfig", + }, + Key: "host.GraphicsManager.updateGraphicsConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addKey", + Summary: "addKey", + }, + Key: "encryption.CryptoManagerKmip.addKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addKeys", + Summary: "addKeys", + }, + Key: "encryption.CryptoManagerKmip.addKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeKey", + Summary: "removeKey", + }, + Key: "encryption.CryptoManagerKmip.removeKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeKeys", + Summary: "removeKeys", + }, + Key: "encryption.CryptoManagerKmip.removeKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listKeys", + Summary: "listKeys", + }, + Key: "encryption.CryptoManagerKmip.listKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "registerKmipServer", + Summary: "registerKmipServer", + }, + Key: "encryption.CryptoManagerKmip.registerKmipServer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "markDefault", + Summary: "markDefault", + }, + Key: "encryption.CryptoManagerKmip.markDefault", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateKmipServer", + Summary: "updateKmipServer", + }, + Key: "encryption.CryptoManagerKmip.updateKmipServer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeKmipServer", + Summary: "removeKmipServer", + }, + Key: "encryption.CryptoManagerKmip.removeKmipServer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listKmipServers", + Summary: "listKmipServers", + }, + Key: "encryption.CryptoManagerKmip.listKmipServers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveKmipServersStatus", + Summary: "retrieveKmipServersStatus", + }, + Key: "encryption.CryptoManagerKmip.retrieveKmipServersStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateKey", + Summary: "generateKey", + }, + Key: "encryption.CryptoManagerKmip.generateKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveKmipServerCert", + Summary: "retrieveKmipServerCert", + }, + Key: "encryption.CryptoManagerKmip.retrieveKmipServerCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "uploadKmipServerCert", + Summary: "uploadKmipServerCert", + }, + Key: "encryption.CryptoManagerKmip.uploadKmipServerCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateSelfSignedClientCert", + Summary: "generateSelfSignedClientCert", + }, + Key: "encryption.CryptoManagerKmip.generateSelfSignedClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateClientCsr", + Summary: "generateClientCsr", + }, + Key: "encryption.CryptoManagerKmip.generateClientCsr", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveSelfSignedClientCert", + Summary: "retrieveSelfSignedClientCert", + }, + Key: "encryption.CryptoManagerKmip.retrieveSelfSignedClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveClientCsr", + Summary: "retrieveClientCsr", + }, + Key: "encryption.CryptoManagerKmip.retrieveClientCsr", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveClientCert", + Summary: "retrieveClientCert", + }, + Key: "encryption.CryptoManagerKmip.retrieveClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateSelfSignedClientCert", + Summary: "updateSelfSignedClientCert", + }, + Key: "encryption.CryptoManagerKmip.updateSelfSignedClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateKmsSignedCsrClientCert", + Summary: "updateKmsSignedCsrClientCert", + }, + Key: "encryption.CryptoManagerKmip.updateKmsSignedCsrClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "uploadClientCert", + Summary: "uploadClientCert", + }, + Key: "encryption.CryptoManagerKmip.uploadClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set host custom value", + Summary: "Sets the value of a custom field of an host", + }, + Key: "HostSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload host system", + Summary: "Reloads the host system", + }, + Key: "HostSystem.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename host", + Summary: "Rename this host", + }, + Key: "HostSystem.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove host", + Summary: "Removes the host", + }, + Key: "HostSystem.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the host", + }, + Key: "HostSystem.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the host", + }, + Key: "HostSystem.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "HostSystem.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query TPM attestation information", + Summary: "Provides details of the secure boot and TPM status", + }, + Key: "HostSystem.queryTpmAttestationReport", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query connection information", + Summary: "Connection information about a host", + }, + Key: "HostSystem.queryConnectionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve internal host capabilities", + Summary: "Retrieves vCenter Server-specific internal host capabilities", + }, + Key: "HostSystem.retrieveInternalCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "", + Summary: "", + }, + Key: "HostSystem.retrieveInternalConfigManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update system resources", + Summary: "Update the configuration of the system resource hierarchy", + }, + Key: "HostSystem.updateSystemResources", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update system swap configuration", + Summary: "Update the configuration of the system swap", + }, + Key: "HostSystem.updateSystemSwapConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconnect host", + Summary: "Reconnects to a host", + }, + Key: "HostSystem.reconnect", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disconnect host", + Summary: "Disconnects from a host", + }, + Key: "HostSystem.disconnect", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter maintenance mode", + Summary: "Puts the host in maintenance mode", + }, + Key: "HostSystem.enterMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit maintenance mode", + Summary: "Disables maintenance mode", + }, + Key: "HostSystem.exitMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate host reboot", + Summary: "Initiates a host reboot", + }, + Key: "HostSystem.reboot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate host shutdown", + Summary: "Initiates a host shutdown", + }, + Key: "HostSystem.shutdown", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter standby mode", + Summary: "Puts this host into standby mode", + }, + Key: "HostSystem.enterStandbyMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit standby mode", + Summary: "Brings this host out of standby mode", + }, + Key: "HostSystem.exitStandbyMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host overhead", + Summary: "Determines the amount of memory overhead necessary to power on a virtual machine with the specified characteristics", + }, + Key: "HostSystem.queryOverhead", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query memory overhead", + Summary: "Query memory overhead", + }, + Key: "HostSystem.queryOverheadEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere HA host", + Summary: "Reconfigures the host for vSphere HA", + }, + Key: "HostSystem.reconfigureDAS", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve Patch Manager", + Summary: "Retrieves a reference to Patch Manager", + }, + Key: "HostSystem.retrievePatchManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host system flags", + Summary: "Update the flags of the host system", + }, + Key: "HostSystem.updateFlags", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send Wake-on-LAN packet", + Summary: "Send Wake-on-LAN packets to the physical NICs specified", + }, + Key: "HostSystem.sendWakeOnLanPacket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable lockdown mode", + Summary: "Enable lockdown mode on this host", + }, + Key: "HostSystem.disableAdmin", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable lockdown mode", + Summary: "Disable lockdown mode on this host", + }, + Key: "HostSystem.enableAdmin", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable lockdown mode", + Summary: "Enable lockdown mode on this host", + }, + Key: "HostSystem.enterLockdownMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable lockdown mode", + Summary: "Disable lockdown mode on this host", + }, + Key: "HostSystem.exitLockdownMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update management server IP", + Summary: "Update information about the vCenter Server managing this host", + }, + Key: "HostSystem.updateManagementServerIp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire CIM service", + Summary: "Establish a remote connection to a CIM interface", + }, + Key: "HostSystem.acquireCimServicesTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IPMI or ILO information used by DPM", + Summary: "Update IPMI or ILO information for this host used by DPM", + }, + Key: "HostSystem.updateIpmi", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update SSL thumbprint registry", + Summary: "Updates the SSL thumbprint registry on the host", + }, + Key: "HostSystem.updateSslThumbprintInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve host hardware uptime", + Summary: "Retrieves the hardware uptime for the host in seconds", + }, + Key: "HostSystem.retrieveHardwareUptime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve Dynamic Type Manager", + Summary: "Retrieves a reference to Dynamic Type Manager", + }, + Key: "HostSystem.retrieveDynamicTypeManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve Managed Method Executer", + Summary: "Retrieves a reference to Managed Method Executer", + }, + Key: "HostSystem.retrieveManagedMethodExecuter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine memory overhead", + Summary: "Query memory overhead for a virtual machine power on", + }, + Key: "HostSystem.queryOverheadEx2", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Test EVC mode", + Summary: "Test an EVC mode on a host", + }, + Key: "HostSystem.testEvcMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply EVC mode", + Summary: "Applies an EVC mode to a host", + }, + Key: "HostSystem.applyEvcMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check whether the certificate is trusted by vCenter Server", + Summary: "Checks whether the certificate matches the host certificate that vCenter Server trusts", + }, + Key: "HostSystem.checkCertificateTrusted", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare host", + Summary: "Prepare host for encryption", + }, + Key: "HostSystem.prepareCrypto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable encryption", + Summary: "Enable encryption on the current host", + }, + Key: "HostSystem.enableCrypto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure the host key", + Summary: "Configure the encryption key on the current host", + }, + Key: "HostSystem.configureCryptoKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query supported switch specification", + Summary: "Query supported switch specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.querySupportedSwitchSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compatible hosts for a vSphere Distributed Switch specification", + Summary: "Returns a list of hosts that are compatible with a given vSphere Distributed Switch specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryCompatibleHostForNewDvs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compatible hosts for existing vSphere Distributed Switch", + Summary: "Returns a list of hosts that are compatible with an existing vSphere Distributed Switch", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryCompatibleHostForExistingDvs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compatible host specification", + Summary: "Query compatible host specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryCompatibleHostSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query feature capabilities for vSphere Distributed Switch specification", + Summary: "Queries feature capabilities available for a given vSphere Distributed Switch specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryFeatureCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query switch by UUID", + Summary: "Query switch by UUID", + }, + Key: "dvs.DistributedVirtualSwitchManager.querySwitchByUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration target", + Summary: "Query configuration target", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryDvsConfigTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compatibility of hosts against a vSphere Distributed Switch version", + Summary: "Check compatibility of hosts against a vSphere Distributed Switch version", + }, + Key: "dvs.DistributedVirtualSwitchManager.checkCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update opaque data for set of entities", + Summary: "Update opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.updateOpaqueData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update opaque data for set of entities", + Summary: "Update opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.updateOpaqueDataEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch opaque data for set of entities", + Summary: "Fetch opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.fetchOpaqueData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch opaque data for set of entities", + Summary: "Fetch opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.fetchOpaqueDataEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute opaque command for set of entities", + Summary: "Execute opaque command for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.executeOpaqueCommand", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rectify vNetwork Distributed Switch host", + Summary: "Rectify vNetwork Distributed Switch host", + }, + Key: "dvs.DistributedVirtualSwitchManager.rectifyHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export configuration of the entity", + Summary: "Export configuration of the entity", + }, + Key: "dvs.DistributedVirtualSwitchManager.exportEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import configuration of the entity", + Summary: "Import configuration of the entity", + }, + Key: "dvs.DistributedVirtualSwitchManager.importEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Look up portgroup based on portgroup key", + Summary: "Look up portgroup based on portgroup key", + }, + Key: "dvs.DistributedVirtualSwitchManager.lookupPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query uplink team information", + Summary: "Query uplink team information", + }, + Key: "dvs.DistributedVirtualSwitchManager.QueryDvpgUplinkTeam", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryHostNetworkResource", + Summary: "queryHostNetworkResource", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryHostNetworkResource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryVwirePort", + Summary: "queryVwirePort", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryVwirePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move file", + Summary: "Move the file, folder, or disk from source datacenter to destination datacenter", + }, + Key: "FileManager.move", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move file", + Summary: "Move the source file or folder to destination datacenter", + }, + Key: "FileManager.moveFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy file", + Summary: "Copy the file, folder, or disk from source datacenter to destination datacenter", + }, + Key: "FileManager.copy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy file", + Summary: "Copy the source file or folder to destination datacenter", + }, + Key: "FileManager.copyFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete file", + Summary: "Delete the file, folder, or disk from source datacenter", + }, + Key: "FileManager.delete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete file", + Summary: "Delete the source file or folder from the datastore", + }, + Key: "FileManager.deleteFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Make Directory", + Summary: "Create a directory using the specified name", + }, + Key: "FileManager.makeDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change owner", + Summary: "Change the owner of the specified file to the specified user", + }, + Key: "FileManager.changeOwner", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query process information", + Summary: "Retrieves information regarding processes", + }, + Key: "host.SystemDebugManager.queryProcessInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set network custom value", + Summary: "Sets the value of a custom field of a host network system", + }, + Key: "host.NetworkSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network configuration", + Summary: "Network configuration information", + }, + Key: "host.NetworkSystem.updateNetworkConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update DNS configuration", + Summary: "Update the DNS configuration for the host", + }, + Key: "host.NetworkSystem.updateDnsConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IP route configuration", + Summary: "Update IP route configuration", + }, + Key: "host.NetworkSystem.updateIpRouteConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update console IP route configuration", + Summary: "Update console IP route configuration", + }, + Key: "host.NetworkSystem.updateConsoleIpRouteConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IP route table configuration", + Summary: "Applies the IP route table configuration for the host", + }, + Key: "host.NetworkSystem.updateIpRouteTableConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add virtual switch", + Summary: "Add a new virtual switch to the system", + }, + Key: "host.NetworkSystem.addVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual switch", + Summary: "Remove an existing virtual switch from the system", + }, + Key: "host.NetworkSystem.removeVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update virtual switch", + Summary: "Updates the properties of the virtual switch", + }, + Key: "host.NetworkSystem.updateVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add port group", + Summary: "Add a port group to the virtual switch", + }, + Key: "host.NetworkSystem.addPortGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove port group", + Summary: "Remove a port group from the virtual switch", + }, + Key: "host.NetworkSystem.removePortGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure port group", + Summary: "Reconfigure a port group on the virtual switch", + }, + Key: "host.NetworkSystem.updatePortGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update physical NIC link speed", + Summary: "Configure link speed and duplexity", + }, + Key: "host.NetworkSystem.updatePhysicalNicLinkSpeed", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query network hint", + Summary: "Request network hint information for a physical NIC", + }, + Key: "host.NetworkSystem.queryNetworkHint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add virtual NIC", + Summary: "Add a virtual host or service console NIC", + }, + Key: "host.NetworkSystem.addVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual NIC", + Summary: "Remove a virtual host or service console NIC", + }, + Key: "host.NetworkSystem.removeVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update virtual NIC", + Summary: "Configure virtual host or VMkernel NIC", + }, + Key: "host.NetworkSystem.updateVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add service console virtual NIC", + Summary: "Add a virtual service console NIC", + }, + Key: "host.NetworkSystem.addServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove service console virtual NIC", + Summary: "Remove a virtual service console NIC", + }, + Key: "host.NetworkSystem.removeServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update service console virtual NIC", + Summary: "Update IP configuration for a service console virtual NIC", + }, + Key: "host.NetworkSystem.updateServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Restart virtual network adapter interface", + Summary: "Restart the service console virtual network adapter interface", + }, + Key: "host.NetworkSystem.restartServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh network information", + Summary: "Refresh the network information and settings to detect any changes that have occurred", + }, + Key: "host.NetworkSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Invoke API call on host with transactionId", + Summary: "Invoke API call on host with transactionId", + }, + Key: "host.NetworkSystem.invokeHostTransactionCall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Commit transaction to confirm that host is connected to vCenter Server", + Summary: "Commit transaction to confirm that host is connected to vCenter Server", + }, + Key: "host.NetworkSystem.commitTransaction", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "performHostOpaqueNetworkDataOperation", + Summary: "performHostOpaqueNetworkDataOperation", + }, + Key: "host.NetworkSystem.performHostOpaqueNetworkDataOperation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve available diagnostic partitions", + Summary: "Retrieves a list of available diagnostic partitions", + }, + Key: "host.DiagnosticSystem.queryAvailablePartition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change active diagnostic partition", + Summary: "Changes the active diagnostic partition to a different partition", + }, + Key: "host.DiagnosticSystem.selectActivePartition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve diagnostic partitionable disks", + Summary: "Retrieves a list of disks that can be used to contain a diagnostic partition", + }, + Key: "host.DiagnosticSystem.queryPartitionCreateOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve diagnostic partition creation description", + Summary: "Retrieves the diagnostic partition creation description for a disk", + }, + Key: "host.DiagnosticSystem.queryPartitionCreateDesc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create diagnostic partition", + Summary: "Creates a diagnostic partition according to the provided creation specification", + }, + Key: "host.DiagnosticSystem.createDiagnosticPartition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure host cache performance enhancement", + Summary: "Configures host cache by allocating space on a low latency device (usually a solid state drive) for enhanced system performance", + }, + Key: "host.CacheConfigurationManager.configureCache", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure host update proxy", + Summary: "Reconfigure host update proxy", + }, + Key: "host.HostUpdateProxyManager.reconfigureHostUpdateProxy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve configuration of the host update proxy", + Summary: "Retrieve configuration of the host update proxy", + }, + Key: "host.HostUpdateProxyManager.retrieveHostUpdateProxyConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set extensible custom value", + Summary: "Sets the value of a custom field of an extensible managed object", + }, + Key: "ExtensibleManagedObject.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configuring vSphere HA", + Summary: "Configuring vSphere HA", + }, + Key: "DasConfig.ConfigureHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unconfiguring vSphere HA", + Summary: "Unconfiguring vSphere HA", + }, + Key: "DasConfig.UnconfigureHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Migrate virtual machine", + Summary: "Migrates a virtual machine from one host to another", + }, + Key: "Drm.ExecuteVMotionLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power On virtual machine", + Summary: "Power on this virtual machine", + }, + Key: "Drm.ExecuteVmPowerOnLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter standby mode", + Summary: "Puts this host into standby mode", + }, + Key: "Drm.EnterStandbyLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit standby mode", + Summary: "Brings this host out of standby mode", + }, + Key: "Drm.ExitStandbyLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power On virtual machine", + Summary: "Power On this virtual machine", + }, + Key: "Datacenter.ExecuteVmPowerOnLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vCenter Agent", + Summary: "Upgrade the vCenter Agent", + }, + Key: "Upgrade.UpgradeAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vCenter Agents on cluster hosts", + Summary: "Upgrade the vCenter Agents on all cluster hosts", + }, + Key: "ClusterUpgrade.UpgradeAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys a virtual machine or vApp", + }, + Key: "ResourcePool.ImportVAppLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set cluster suspended state", + Summary: "Set suspended state of the cluster", + }, + Key: "ClusterComputeResource.setSuspendedState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the virtual machine as an OVF template", + }, + Key: "VirtualMachine.ExportVmLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the vApp as an OVF template", + }, + Key: "VirtualApp.ExportVAppLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start Fault Tolerance Secondary VM", + Summary: "Start Secondary VM as the Primary VM is powered on", + }, + Key: "FaultTolerance.PowerOnSecondaryLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute Storage vMotion for Storage DRS", + Summary: "Execute Storage vMotion migrations for Storage DRS", + }, + Key: "Drm.ExecuteStorageVmotionLro", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply recommendations for SDRS maintenance mode", + Summary: "Apply recommendations to enter into SDRS maintenance mode", + }, + Key: "Drm.ExecuteMaintenanceRecommendationsLro", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter SDRS maintenance mode monitor task", + Summary: "Task that monitors the SDRS maintenance mode activity", + }, + Key: "Drm.TrackEnterMaintenanceLro", + }, + }, + State: []types.BaseElementDescription{ + &types.ElementDescription{ + Description: types.Description{ + Label: "Queued", + Summary: "Task is queued", + }, + Key: "queued", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Running", + Summary: "Task is in progress", + }, + Key: "running", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Success", + Summary: "Task completed successfully", + }, + Key: "success", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Error", + Summary: "Task completed with a failure", + }, + Key: "error", + }, + }, + Reason: []types.BaseTypeDescription{ + &types.TypeDescription{ + Description: types.Description{ + Label: "Alarm task", + Summary: "Task started by an alarm", + }, + Key: "TaskReasonAlarm", + }, + &types.TypeDescription{ + Description: types.Description{ + Label: "System task", + Summary: "Task started by the server", + }, + Key: "TaskReasonSystem", + }, + &types.TypeDescription{ + Description: types.Description{ + Label: "User task", + Summary: "Task started by a specific user", + }, + Key: "TaskReasonUser", + }, + &types.TypeDescription{ + Description: types.Description{ + Label: "Scheduled task", + Summary: "Task started by a scheduled task", + }, + Key: "TaskReasonSchedule", + }, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/esx/virtual_device.go b/vendor/github.com/vmware/govmomi/simulator/esx/virtual_device.go new file mode 100644 index 0000000000..a229ddceb8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/esx/virtual_device.go @@ -0,0 +1,243 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package esx + +import "github.com/vmware/govmomi/vim25/types" + +// VirtualDevice is the default set of VirtualDevice types created for a VirtualMachine +// Capture method: +// +// govc vm.create foo +// govc object.collect -s -dump vm/foo config.hardware.device +var VirtualDevice = []types.BaseVirtualDevice{ + &types.VirtualIDEController{ + VirtualController: types.VirtualController{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 200, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "IDE 0", + Summary: "IDE 0", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 0, + UnitNumber: (*int32)(nil), + }, + BusNumber: 0, + Device: nil, + }, + }, + &types.VirtualIDEController{ + VirtualController: types.VirtualController{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 201, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "IDE 1", + Summary: "IDE 1", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 0, + UnitNumber: (*int32)(nil), + }, + BusNumber: 1, + Device: nil, + }, + }, + &types.VirtualPS2Controller{ + VirtualController: types.VirtualController{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 300, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "PS2 controller 0", + Summary: "PS2 controller 0", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 0, + UnitNumber: (*int32)(nil), + }, + BusNumber: 0, + Device: []int32{600, 700}, + }, + }, + &types.VirtualPCIController{ + VirtualController: types.VirtualController{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 100, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "PCI controller 0", + Summary: "PCI controller 0", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 0, + UnitNumber: (*int32)(nil), + }, + BusNumber: 0, + Device: []int32{500, 12000}, + }, + }, + &types.VirtualSIOController{ + VirtualController: types.VirtualController{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 400, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "SIO controller 0", + Summary: "SIO controller 0", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 0, + UnitNumber: (*int32)(nil), + }, + BusNumber: 0, + Device: nil, + }, + }, + &types.VirtualKeyboard{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 600, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "Keyboard ", + Summary: "Keyboard", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 300, + UnitNumber: types.NewInt32(0), + }, + }, + &types.VirtualPointingDevice{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 700, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "Pointing device", + Summary: "Pointing device; Device", + }, + Backing: &types.VirtualPointingDeviceDeviceBackingInfo{ + VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ + VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, + DeviceName: "", + UseAutoDetect: types.NewBool(false), + }, + HostPointingDevice: "autodetect", + }, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 300, + UnitNumber: types.NewInt32(1), + }, + }, + &types.VirtualMachineVideoCard{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 500, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "Video card ", + Summary: "Video card", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 100, + UnitNumber: types.NewInt32(0), + }, + VideoRamSizeInKB: 4096, + NumDisplays: 1, + UseAutoDetect: types.NewBool(false), + Enable3DSupport: types.NewBool(false), + Use3dRenderer: "automatic", + GraphicsMemorySizeInKB: 262144, + }, + &types.VirtualMachineVMCIDevice{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 12000, + DeviceInfo: &types.Description{ + DynamicData: types.DynamicData{}, + Label: "VMCI device", + Summary: "Device on the virtual machine PCI bus that provides support for the virtual machine communication interface", + }, + Backing: nil, + Connectable: (*types.VirtualDeviceConnectInfo)(nil), + SlotInfo: nil, + ControllerKey: 100, + UnitNumber: types.NewInt32(17), + }, + Id: -1, + AllowUnrestrictedCommunication: types.NewBool(false), + FilterEnable: types.NewBool(true), + FilterInfo: (*types.VirtualMachineVMCIDeviceFilterInfo)(nil), + }, +} + +// EthernetCard template for types.VirtualEthernetCard +var EthernetCard = types.VirtualE1000{ + VirtualEthernetCard: types.VirtualEthernetCard{ + VirtualDevice: types.VirtualDevice{ + DynamicData: types.DynamicData{}, + Key: 4000, + Backing: &types.VirtualEthernetCardNetworkBackingInfo{ + VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ + VirtualDeviceBackingInfo: types.VirtualDeviceBackingInfo{}, + DeviceName: "VM Network", + UseAutoDetect: types.NewBool(false), + }, + Network: (*types.ManagedObjectReference)(nil), + InPassthroughMode: types.NewBool(false), + }, + Connectable: &types.VirtualDeviceConnectInfo{ + DynamicData: types.DynamicData{}, + StartConnected: true, + AllowGuestControl: true, + Connected: false, + Status: "untried", + }, + SlotInfo: &types.VirtualDevicePciBusSlotInfo{ + VirtualDeviceBusSlotInfo: types.VirtualDeviceBusSlotInfo{}, + PciSlotNumber: 32, + }, + ControllerKey: 100, + UnitNumber: types.NewInt32(7), + }, + AddressType: "generated", + MacAddress: "", + WakeOnLanEnabled: types.NewBool(true), + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/event_manager.go b/vendor/github.com/vmware/govmomi/simulator/event_manager.go new file mode 100644 index 0000000000..4195af72b8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/event_manager.go @@ -0,0 +1,442 @@ +/* +Copyright (c) 2018-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "bytes" + "container/list" + "log" + "reflect" + "text/template" + "time" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var ( + logEvents = false +) + +type EventManager struct { + mo.EventManager + + history *history + key int32 + templates map[string]*template.Template +} + +func (m *EventManager) init(r *Registry) { + if len(m.Description.EventInfo) == 0 { + m.Description.EventInfo = esx.EventInfo + } + if m.MaxCollector == 0 { + // In real VC this default can be changed via OptionManager "event.maxCollectors" + m.MaxCollector = maxCollectors + } + + m.history = newHistory() + m.templates = make(map[string]*template.Template) +} + +func (m *EventManager) createCollector(ctx *Context, req *types.CreateCollectorForEvents) (*EventHistoryCollector, *soap.Fault) { + size, err := validatePageSize(req.Filter.MaxCount) + if err != nil { + return nil, err + } + + if len(m.history.collectors) >= int(m.MaxCollector) { + return nil, Fault("Too many event collectors to create", new(types.InvalidState)) + } + + collector := &EventHistoryCollector{ + HistoryCollector: newHistoryCollector(ctx, m.history, size), + } + collector.Filter = req.Filter + + return collector, nil +} + +func (m *EventManager) CreateCollectorForEvents(ctx *Context, req *types.CreateCollectorForEvents) soap.HasFault { + body := new(methods.CreateCollectorForEventsBody) + collector, err := m.createCollector(ctx, req) + if err != nil { + body.Fault_ = err + return body + } + + collector.fill = func(x *Context) { m.fillPage(x, collector) } + collector.fill(ctx) + + body.Res = &types.CreateCollectorForEventsResponse{ + Returnval: m.history.add(ctx, collector), + } + + return body +} + +func (m *EventManager) QueryEvents(ctx *Context, req *types.QueryEvents) soap.HasFault { + if ctx.Map.IsESX() { + return &methods.QueryEventsBody{ + Fault_: Fault("", new(types.NotImplemented)), + } + } + + body := new(methods.QueryEventsBody) + collector, err := m.createCollector(ctx, &types.CreateCollectorForEvents{Filter: req.Filter}) + if err != nil { + body.Fault_ = err + return body + } + + m.fillPage(ctx, collector) + + body.Res = &types.QueryEventsResponse{ + Returnval: collector.GetLatestPage(), + } + + return body +} + +// formatMessage applies the EventDescriptionEventDetail.FullFormat template to the given event's FullFormattedMessage field. +func (m *EventManager) formatMessage(event types.BaseEvent) { + id := reflect.ValueOf(event).Elem().Type().Name() + e := event.GetEvent() + + t, ok := m.templates[id] + if !ok { + for _, info := range m.Description.EventInfo { + if info.Key == id { + t = template.Must(template.New(id).Parse(info.FullFormat)) + m.templates[id] = t + break + } + } + } + + if t != nil { + var buf bytes.Buffer + if err := t.Execute(&buf, event); err != nil { + log.Print(err) + } + e.FullFormattedMessage = buf.String() + } + + if logEvents { + log.Printf("[%s] %s", id, e.FullFormattedMessage) + } +} + +func (m *EventManager) PostEvent(ctx *Context, req *types.PostEvent) soap.HasFault { + m.key++ + event := req.EventToPost.GetEvent() + event.Key = m.key + event.ChainId = event.Key + event.CreatedTime = time.Now() + event.UserName = ctx.Session.UserName + + m.formatMessage(req.EventToPost) + + pushHistory(m.history.page, req.EventToPost) + + for _, hc := range m.history.collectors { + c := hc.(*EventHistoryCollector) + ctx.WithLock(c, func() { + if c.eventMatches(ctx, req.EventToPost) { + pushHistory(c.page, req.EventToPost) + ctx.Update(c, []types.PropertyChange{{Name: "latestPage", Val: c.GetLatestPage()}}) + } + }) + } + + if m := ctx.Map.AlarmManager(); m != nil { + ctx.WithLock(m, func() { m.postEvent(ctx, req.EventToPost) }) + } + + return &methods.PostEventBody{ + Res: new(types.PostEventResponse), + } +} + +type EventHistoryCollector struct { + mo.EventHistoryCollector + + *HistoryCollector +} + +// doEntityEventArgument calls f for each entity argument in the event. +// If f returns true, the iteration stops. +func doEntityEventArgument(event types.BaseEvent, f func(types.ManagedObjectReference, *types.EntityEventArgument) bool) bool { + e := event.GetEvent() + + if arg := e.Vm; arg != nil { + if f(arg.Vm, &arg.EntityEventArgument) { + return true + } + } + + if arg := e.Host; arg != nil { + if f(arg.Host, &arg.EntityEventArgument) { + return true + } + } + + if arg := e.ComputeResource; arg != nil { + if f(arg.ComputeResource, &arg.EntityEventArgument) { + return true + } + } + + if arg := e.Ds; arg != nil { + if f(arg.Datastore, &arg.EntityEventArgument) { + return true + } + } + + if arg := e.Net; arg != nil { + if f(arg.Network, &arg.EntityEventArgument) { + return true + } + } + + if arg := e.Dvs; arg != nil { + if f(arg.Dvs, &arg.EntityEventArgument) { + return true + } + } + + if arg := e.Datacenter; arg != nil { + if f(arg.Datacenter, &arg.EntityEventArgument) { + return true + } + } + + return false +} + +// eventFilterSelf returns true if self is one of the entity arguments in the event. +func eventFilterSelf(event types.BaseEvent, self types.ManagedObjectReference) bool { + if x, ok := event.(*types.EventEx); ok { + if self.Type == x.ObjectType && self.Value == x.ObjectId { + return true + } + } + return doEntityEventArgument(event, func(ref types.ManagedObjectReference, _ *types.EntityEventArgument) bool { + return self == ref + }) +} + +// eventFilterChildren returns true if a child of self is one of the entity arguments in the event. +func eventFilterChildren(ctx *Context, root types.ManagedObjectReference, event types.BaseEvent) bool { + return doEntityEventArgument(event, func(ref types.ManagedObjectReference, _ *types.EntityEventArgument) bool { + seen := false + + var match func(types.ManagedObjectReference) + + match = func(child types.ManagedObjectReference) { + if child == ref { + seen = true + return + } + + walk(ctx.Map.Get(child), match) + } + + walk(ctx.Map.Get(root), match) + + return seen + }) +} + +// entityMatches returns true if the spec Entity filter matches the event. +func (c *EventHistoryCollector) entityMatches(ctx *Context, event types.BaseEvent, spec *types.EventFilterSpec) bool { + e := spec.Entity + if e == nil { + return true + } + + isRootFolder := c.root == e.Entity + + switch e.Recursion { + case types.EventFilterSpecRecursionOptionSelf: + return isRootFolder || eventFilterSelf(event, e.Entity) + case types.EventFilterSpecRecursionOptionChildren: + return eventFilterChildren(ctx, e.Entity, event) + case types.EventFilterSpecRecursionOptionAll: + if isRootFolder || eventFilterSelf(event, e.Entity) { + return true + } + return eventFilterChildren(ctx, e.Entity, event) + } + + return false +} + +// chainMatches returns true if spec.EventChainId matches the event. +func (c *EventHistoryCollector) chainMatches(_ *Context, event types.BaseEvent, spec *types.EventFilterSpec) bool { + e := event.GetEvent() + if spec.EventChainId != 0 { + if e.ChainId != spec.EventChainId { + return false + } + } + return true +} + +// typeMatches returns true if one of the spec EventTypeId types matches the event. +func (c *EventHistoryCollector) typeMatches(_ *Context, event types.BaseEvent, spec *types.EventFilterSpec) bool { + if len(spec.EventTypeId) == 0 { + return true + } + + matches := func(name string) bool { + for _, id := range spec.EventTypeId { + if id == name { + return true + } + } + return false + } + + if x, ok := event.(*types.EventEx); ok { + return matches(x.EventTypeId) + } + + kind := reflect.ValueOf(event).Elem().Type() + + if matches(kind.Name()) { + return true // concrete type + } + + field, ok := kind.FieldByNameFunc(matches) + if ok { + return field.Anonymous // base type (embedded field) + } + return false +} + +func (c *EventHistoryCollector) timeMatches(_ *Context, event types.BaseEvent, spec *types.EventFilterSpec) bool { + if spec.Time == nil { + return true + } + + created := event.GetEvent().CreatedTime + + if begin := spec.Time.BeginTime; begin != nil { + if created.Before(*begin) { + return false + } + } + + if end := spec.Time.EndTime; end != nil { + if created.After(*end) { + return false + } + } + + return true +} + +// eventMatches returns true one of the filters matches the event. +func (c *EventHistoryCollector) eventMatches(ctx *Context, event types.BaseEvent) bool { + spec := c.Filter.(types.EventFilterSpec) + + matchers := []func(*Context, types.BaseEvent, *types.EventFilterSpec) bool{ + c.chainMatches, + c.typeMatches, + c.timeMatches, + c.entityMatches, + // TODO: spec.UserName, etc + } + + for _, match := range matchers { + if !match(ctx, event, &spec) { + return false + } + } + + return true +} + +// fillPage copies the manager's latest events into the collector's page with Filter applied. +func (m *EventManager) fillPage(ctx *Context, c *EventHistoryCollector) { + m.history.Lock() + defer m.history.Unlock() + + for e := m.history.page.Front(); e != nil; e = e.Next() { + event := e.Value.(types.BaseEvent) + if c.eventMatches(ctx, event) { + c.page.PushBack(event) + } + } +} + +func (c *EventHistoryCollector) ReadNextEvents(ctx *Context, req *types.ReadNextEvents) soap.HasFault { + body := &methods.ReadNextEventsBody{} + if req.MaxCount <= 0 { + body.Fault_ = Fault("", errInvalidArgMaxCount) + return body + } + body.Res = new(types.ReadNextEventsResponse) + + c.next(req.MaxCount, func(e *list.Element) { + body.Res.Returnval = append(body.Res.Returnval, e.Value.(types.BaseEvent)) + }) + + return body +} + +func (c *EventHistoryCollector) ReadPreviousEvents(ctx *Context, req *types.ReadPreviousEvents) soap.HasFault { + body := &methods.ReadPreviousEventsBody{} + if req.MaxCount <= 0 { + body.Fault_ = Fault("", errInvalidArgMaxCount) + return body + } + body.Res = new(types.ReadPreviousEventsResponse) + + c.prev(req.MaxCount, func(e *list.Element) { + body.Res.Returnval = append(body.Res.Returnval, e.Value.(types.BaseEvent)) + }) + + return body +} + +func (c *EventHistoryCollector) GetLatestPage() []types.BaseEvent { + var latestPage []types.BaseEvent + + e := c.page.Back() + for i := 0; i < c.size; i++ { + if e == nil { + break + } + latestPage = append(latestPage, e.Value.(types.BaseEvent)) + e = e.Prev() + } + + return latestPage +} + +func (c *EventHistoryCollector) Get() mo.Reference { + clone := *c + + clone.LatestPage = clone.GetLatestPage() + + return &clone +} diff --git a/vendor/github.com/vmware/govmomi/simulator/extension_manager.go b/vendor/github.com/vmware/govmomi/simulator/extension_manager.go new file mode 100644 index 0000000000..b8d45461a7 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/extension_manager.go @@ -0,0 +1,170 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "time" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var ExtensionList = []types.Extension{ + { + Description: &types.Description{ + Label: "vcsim", + Summary: "Go vCenter simulator", + }, + Key: "com.vmware.govmomi.simulator", + Company: "VMware, Inc.", + Type: "", + Version: "0.37.0", + SubjectName: "", + Server: nil, + Client: nil, + TaskList: []types.ExtensionTaskTypeInfo{ + { + TaskID: "com.vmware.govmomi.simulator.test", + }, + }, + EventList: nil, + FaultList: nil, + PrivilegeList: nil, + ResourceList: nil, + LastHeartbeatTime: time.Now(), + HealthInfo: (*types.ExtensionHealthInfo)(nil), + OvfConsumerInfo: (*types.ExtensionOvfConsumerInfo)(nil), + ExtendedProductInfo: (*types.ExtExtendedProductInfo)(nil), + ManagedEntityInfo: nil, + ShownInSolutionManager: types.NewBool(false), + SolutionManagerInfo: (*types.ExtSolutionManagerInfo)(nil), + }, +} + +type ExtensionManager struct { + mo.ExtensionManager +} + +func (m *ExtensionManager) init(r *Registry) { + if r.IsVPX() && len(m.ExtensionList) == 0 { + m.ExtensionList = ExtensionList + } +} + +func (m *ExtensionManager) FindExtension(ctx *Context, req *types.FindExtension) soap.HasFault { + body := &methods.FindExtensionBody{ + Res: new(types.FindExtensionResponse), + } + + for _, x := range m.ExtensionList { + if x.Key == req.ExtensionKey { + body.Res.Returnval = &x + break + } + } + + return body +} + +func (m *ExtensionManager) RegisterExtension(ctx *Context, req *types.RegisterExtension) soap.HasFault { + body := &methods.RegisterExtensionBody{} + + for _, x := range m.ExtensionList { + if x.Key == req.Extension.Key { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "extension.key", + }) + return body + } + } + + body.Res = new(types.RegisterExtensionResponse) + m.ExtensionList = append(m.ExtensionList, req.Extension) + + f := mo.Field{Path: "extensionList", Key: req.Extension.Key} + ctx.Update(m, []types.PropertyChange{ + {Name: f.Path, Val: m.ExtensionList}, + {Name: f.String(), Val: req.Extension, Op: types.PropertyChangeOpAdd}, + }) + + return body +} + +func (m *ExtensionManager) UnregisterExtension(ctx *Context, req *types.UnregisterExtension) soap.HasFault { + body := &methods.UnregisterExtensionBody{} + + for i, x := range m.ExtensionList { + if x.Key == req.ExtensionKey { + m.ExtensionList = append(m.ExtensionList[:i], m.ExtensionList[i+1:]...) + + f := mo.Field{Path: "extensionList", Key: req.ExtensionKey} + ctx.Update(m, []types.PropertyChange{ + {Name: f.Path, Val: m.ExtensionList}, + {Name: f.String(), Op: types.PropertyChangeOpRemove}, + }) + + body.Res = new(types.UnregisterExtensionResponse) + return body + } + } + + body.Fault_ = Fault("", new(types.NotFound)) + + return body +} + +func (m *ExtensionManager) UpdateExtension(ctx *Context, req *types.UpdateExtension) soap.HasFault { + body := &methods.UpdateExtensionBody{} + + for i, x := range m.ExtensionList { + if x.Key == req.Extension.Key { + m.ExtensionList[i] = req.Extension + + f := mo.Field{Path: "extensionList", Key: req.Extension.Key} + ctx.Update(m, []types.PropertyChange{ + {Name: f.Path, Val: m.ExtensionList}, + {Name: f.String(), Val: req.Extension}, + }) + + body.Res = new(types.UpdateExtensionResponse) + return body + } + } + + body.Fault_ = Fault("", new(types.NotFound)) + + return body +} + +func (m *ExtensionManager) SetExtensionCertificate(ctx *Context, req *types.SetExtensionCertificate) soap.HasFault { + body := &methods.SetExtensionCertificateBody{} + + for _, x := range m.ExtensionList { + if x.Key == req.ExtensionKey { + // TODO: save req.CertificatePem for use with SessionManager.LoginExtensionByCertificate() + + body.Res = new(types.SetExtensionCertificateResponse) + return body + } + } + + body.Fault_ = Fault("", new(types.NotFound)) + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/file_manager.go b/vendor/github.com/vmware/govmomi/simulator/file_manager.go new file mode 100644 index 0000000000..161ebf73f8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/file_manager.go @@ -0,0 +1,252 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "io" + "os" + "path" + "path/filepath" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type FileManager struct { + mo.FileManager +} + +func (f *FileManager) findDatastore(ref mo.Reference, name string) (*Datastore, types.BaseMethodFault) { + var refs []types.ManagedObjectReference + + if d, ok := asFolderMO(ref); ok { + refs = d.ChildEntity + } + if p, ok := ref.(*StoragePod); ok { + refs = p.ChildEntity + } + + for _, ref := range refs { + obj := Map.Get(ref) + + if ds, ok := obj.(*Datastore); ok && ds.Name == name { + return ds, nil + } + if p, ok := obj.(*StoragePod); ok { + ds, _ := f.findDatastore(p, name) + if ds != nil { + return ds, nil + } + } + if d, ok := asFolderMO(obj); ok { + ds, _ := f.findDatastore(d, name) + if ds != nil { + return ds, nil + } + } + } + + return nil, &types.InvalidDatastore{Name: name} +} + +func (f *FileManager) resolve(dc *types.ManagedObjectReference, name string) (string, types.BaseMethodFault) { + p, fault := parseDatastorePath(name) + if fault != nil { + return "", fault + } + + if dc == nil { + if Map.IsESX() { + dc = &esx.Datacenter.Self + } else { + return "", &types.InvalidArgument{InvalidProperty: "dc"} + } + } + + folder := Map.Get(*dc).(*Datacenter).DatastoreFolder + + ds, fault := f.findDatastore(Map.Get(folder), p.Datastore) + if fault != nil { + return "", fault + } + + dir := ds.Info.GetDatastoreInfo().Url + + return path.Join(dir, p.Path), nil +} + +func (f *FileManager) fault(name string, err error, fault types.BaseFileFault) types.BaseMethodFault { + switch { + case os.IsNotExist(err): + fault = new(types.FileNotFound) + case os.IsExist(err): + fault = new(types.FileAlreadyExists) + } + + fault.GetFileFault().File = name + + return fault.(types.BaseMethodFault) +} + +func (f *FileManager) deleteDatastoreFile(req *types.DeleteDatastoreFile_Task) types.BaseMethodFault { + file, fault := f.resolve(req.Datacenter, req.Name) + if fault != nil { + return fault + } + + _, err := os.Stat(file) + if err != nil { + if os.IsNotExist(err) { + return f.fault(file, err, new(types.CannotDeleteFile)) + } + } + + err = os.RemoveAll(file) + if err != nil { + return f.fault(file, err, new(types.CannotDeleteFile)) + } + + return nil +} + +func (f *FileManager) DeleteDatastoreFileTask(ctx *Context, req *types.DeleteDatastoreFile_Task) soap.HasFault { + task := CreateTask(f, "deleteDatastoreFile", func(*Task) (types.AnyType, types.BaseMethodFault) { + return nil, f.deleteDatastoreFile(req) + }) + + return &methods.DeleteDatastoreFile_TaskBody{ + Res: &types.DeleteDatastoreFile_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (f *FileManager) MakeDirectory(req *types.MakeDirectory) soap.HasFault { + body := &methods.MakeDirectoryBody{} + + name, fault := f.resolve(req.Datacenter, req.Name) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + mkdir := os.Mkdir + + if isTrue(req.CreateParentDirectories) { + mkdir = os.MkdirAll + } + + err := mkdir(name, 0700) + if err != nil { + fault = f.fault(req.Name, err, new(types.CannotCreateFile)) + body.Fault_ = Fault(err.Error(), fault) + return body + } + + body.Res = new(types.MakeDirectoryResponse) + return body +} + +func (f *FileManager) moveDatastoreFile(req *types.MoveDatastoreFile_Task) types.BaseMethodFault { + src, fault := f.resolve(req.SourceDatacenter, req.SourceName) + if fault != nil { + return fault + } + + dst, fault := f.resolve(req.DestinationDatacenter, req.DestinationName) + if fault != nil { + return fault + } + + if !isTrue(req.Force) { + _, err := os.Stat(dst) + if err == nil { + return f.fault(dst, nil, new(types.FileAlreadyExists)) + } + } + + err := os.Rename(src, dst) + if err != nil { + return f.fault(src, err, new(types.CannotAccessFile)) + } + + return nil +} + +func (f *FileManager) MoveDatastoreFileTask(ctx *Context, req *types.MoveDatastoreFile_Task) soap.HasFault { + task := CreateTask(f, "moveDatastoreFile", func(*Task) (types.AnyType, types.BaseMethodFault) { + return nil, f.moveDatastoreFile(req) + }) + + return &methods.MoveDatastoreFile_TaskBody{ + Res: &types.MoveDatastoreFile_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (f *FileManager) copyDatastoreFile(req *types.CopyDatastoreFile_Task) types.BaseMethodFault { + src, fault := f.resolve(req.SourceDatacenter, req.SourceName) + if fault != nil { + return fault + } + + dst, fault := f.resolve(req.DestinationDatacenter, req.DestinationName) + if fault != nil { + return fault + } + + if !isTrue(req.Force) { + _, err := os.Stat(dst) + if err == nil { + return f.fault(dst, nil, new(types.FileAlreadyExists)) + } + } + + r, err := os.Open(filepath.Clean(src)) + if err != nil { + return f.fault(dst, err, new(types.CannotAccessFile)) + } + defer r.Close() + + w, err := os.Create(dst) + if err != nil { + return f.fault(dst, err, new(types.CannotCreateFile)) + } + defer w.Close() + + if _, err = io.Copy(w, r); err != nil { + return f.fault(dst, err, new(types.CannotCreateFile)) + } + + return nil +} + +func (f *FileManager) CopyDatastoreFileTask(ctx *Context, req *types.CopyDatastoreFile_Task) soap.HasFault { + task := CreateTask(f, "copyDatastoreFile", func(*Task) (types.AnyType, types.BaseMethodFault) { + return nil, f.copyDatastoreFile(req) + }) + + return &methods.CopyDatastoreFile_TaskBody{ + Res: &types.CopyDatastoreFile_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/folder.go b/vendor/github.com/vmware/govmomi/simulator/folder.go new file mode 100644 index 0000000000..4d6e96ec40 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/folder.go @@ -0,0 +1,1158 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "errors" + "fmt" + "math/rand" + "net/url" + "path" + "strings" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type Folder struct { + mo.Folder +} + +func asFolderMO(obj mo.Reference) (*mo.Folder, bool) { + if obj == nil { + return nil, false + } + f, ok := getManagedObject(obj).Addr().Interface().(*mo.Folder) + return f, ok +} + +func folderEventArgument(f *mo.Folder) types.FolderEventArgument { + return types.FolderEventArgument{ + Folder: f.Self, + EntityEventArgument: types.EntityEventArgument{Name: f.Name}, + } +} + +// update references when objects are added/removed from a Folder +func folderUpdate(ctx *Context, f *mo.Folder, o mo.Reference, u func(*Context, mo.Reference, *[]types.ManagedObjectReference, types.ManagedObjectReference)) { + ref := o.Reference() + + if f.Parent == nil { + return // this is the root folder + } + + switch ref.Type { + case "Datacenter", "Folder": + return // nothing to update + } + + dc := ctx.Map.getEntityDatacenter(f) + + switch ref.Type { + case "Network", "DistributedVirtualSwitch", "DistributedVirtualPortgroup": + u(ctx, dc, &dc.Network, ref) + case "Datastore": + u(ctx, dc, &dc.Datastore, ref) + } +} + +func networkSummary(n *mo.Network) types.BaseNetworkSummary { + if n.Summary != nil { + return n.Summary + } + return &types.NetworkSummary{ + Network: &n.Self, + Name: n.Name, + Accessible: true, + } +} + +func folderPutChild(ctx *Context, f *mo.Folder, o mo.Entity) { + ctx.WithLock(f, func() { + ctx.WithLock(o, func() { + // Need to update ChildEntity before Map.Put for ContainerView updates to work properly + f.ChildEntity = append(f.ChildEntity, ctx.Map.reference(o)) + ctx.Map.PutEntity(f, o) + + folderUpdate(ctx, f, o, ctx.Map.AddReference) + + switch e := o.(type) { + case *mo.Network: + e.Summary = networkSummary(e) + case *mo.OpaqueNetwork: + e.Summary = networkSummary(&e.Network) + case *DistributedVirtualPortgroup: + e.Summary = networkSummary(&e.Network) + } + }) + }) +} + +func folderRemoveChild(ctx *Context, f *mo.Folder, o mo.Reference) { + ctx.Map.Remove(ctx, o.Reference()) + folderRemoveReference(ctx, f, o) +} + +func folderRemoveReference(ctx *Context, f *mo.Folder, o mo.Reference) { + ctx.WithLock(f, func() { + RemoveReference(&f.ChildEntity, o.Reference()) + + folderUpdate(ctx, f, o, ctx.Map.RemoveReference) + }) +} + +func folderHasChildType(f *mo.Folder, kind string) bool { + for _, t := range f.ChildType { + if t == kind { + return true + } + } + return false +} + +func (f *Folder) typeNotSupported() *soap.Fault { + return Fault(fmt.Sprintf("%s supports types: %#v", f.Self, f.ChildType), &types.NotSupported{}) +} + +// AddOpaqueNetwork adds an OpaqueNetwork type to the inventory, with default backing to that of an nsx.LogicalSwitch. +// The vSphere API does not have a method to add this directly, so it must either be called directly or via Model.OpaqueNetwork setting. +func (f *Folder) AddOpaqueNetwork(ctx *Context, summary types.OpaqueNetworkSummary) error { + if !folderHasChildType(&f.Folder, "Network") { + return errors.New("not a network folder") + } + + if summary.OpaqueNetworkId == "" { + summary.OpaqueNetworkId = uuid.New().String() + } + if summary.OpaqueNetworkType == "" { + summary.OpaqueNetworkType = "nsx.LogicalSwitch" + } + if summary.Name == "" { + summary.Name = summary.OpaqueNetworkType + "-" + summary.OpaqueNetworkId + } + + net := new(mo.OpaqueNetwork) + if summary.Network == nil { + summary.Network = &net.Self + } else { + net.Self = *summary.Network + } + summary.Accessible = true + net.Network.Name = summary.Name + net.Summary = &summary + + folderPutChild(ctx, &f.Folder, net) + + return nil +} + +type addStandaloneHost struct { + *Folder + ctx *Context + req *types.AddStandaloneHost_Task +} + +func (add *addStandaloneHost) Run(task *Task) (types.AnyType, types.BaseMethodFault) { + host, err := CreateStandaloneHost(add.ctx, add.Folder, add.req.Spec) + if err != nil { + return nil, err + } + + if add.req.AddConnected { + host.Runtime.ConnectionState = types.HostSystemConnectionStateConnected + } + + return host.Reference(), nil +} + +func (f *Folder) AddStandaloneHostTask(ctx *Context, a *types.AddStandaloneHost_Task) soap.HasFault { + r := &methods.AddStandaloneHost_TaskBody{} + + if folderHasChildType(&f.Folder, "ComputeResource") && folderHasChildType(&f.Folder, "Folder") { + r.Res = &types.AddStandaloneHost_TaskResponse{ + Returnval: NewTask(&addStandaloneHost{f, ctx, a}).Run(ctx), + } + } else { + r.Fault_ = f.typeNotSupported() + } + + return r +} + +func (f *Folder) CreateFolder(ctx *Context, c *types.CreateFolder) soap.HasFault { + r := &methods.CreateFolderBody{} + + if folderHasChildType(&f.Folder, "Folder") { + name := escapeSpecialCharacters(c.Name) + + if obj := ctx.Map.FindByName(name, f.ChildEntity); obj != nil { + r.Fault_ = Fault("", &types.DuplicateName{ + Name: name, + Object: f.Self, + }) + + return r + } + + folder := &Folder{} + + folder.Name = name + folder.ChildType = f.ChildType + + folderPutChild(ctx, &f.Folder, folder) + + r.Res = &types.CreateFolderResponse{ + Returnval: folder.Self, + } + } else { + r.Fault_ = f.typeNotSupported() + } + + return r +} + +func escapeSpecialCharacters(name string) string { + name = strings.ReplaceAll(name, `%`, strings.ToLower(url.QueryEscape(`%`))) + name = strings.ReplaceAll(name, `/`, strings.ToLower(url.QueryEscape(`/`))) + name = strings.ReplaceAll(name, `\`, strings.ToLower(url.QueryEscape(`\`))) + return name +} + +// StoragePod aka "Datastore Cluster" +type StoragePod struct { + mo.StoragePod +} + +func (f *Folder) CreateStoragePod(ctx *Context, c *types.CreateStoragePod) soap.HasFault { + r := &methods.CreateStoragePodBody{} + + if folderHasChildType(&f.Folder, "StoragePod") { + if obj := ctx.Map.FindByName(c.Name, f.ChildEntity); obj != nil { + r.Fault_ = Fault("", &types.DuplicateName{ + Name: c.Name, + Object: f.Self, + }) + + return r + } + + pod := &StoragePod{} + + pod.Name = c.Name + pod.ChildType = []string{"Datastore"} + pod.Summary = new(types.StoragePodSummary) + pod.PodStorageDrsEntry = new(types.PodStorageDrsEntry) + pod.PodStorageDrsEntry.StorageDrsConfig.PodConfig.Enabled = true + + folderPutChild(ctx, &f.Folder, pod) + + r.Res = &types.CreateStoragePodResponse{ + Returnval: pod.Self, + } + } else { + r.Fault_ = f.typeNotSupported() + } + + return r +} + +func (p *StoragePod) MoveIntoFolderTask(ctx *Context, c *types.MoveIntoFolder_Task) soap.HasFault { + task := CreateTask(p, "moveIntoFolder", func(*Task) (types.AnyType, types.BaseMethodFault) { + f := &Folder{Folder: p.Folder} + id := f.MoveIntoFolderTask(ctx, c).(*methods.MoveIntoFolder_TaskBody).Res.Returnval + ftask := ctx.Map.Get(id).(*Task) + ftask.Wait() + if ftask.Info.Error != nil { + return nil, ftask.Info.Error.Fault + } + p.ChildEntity = append(p.ChildEntity, f.ChildEntity...) + return nil, nil + }) + return &methods.MoveIntoFolder_TaskBody{ + Res: &types.MoveIntoFolder_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (f *Folder) CreateDatacenter(ctx *Context, c *types.CreateDatacenter) soap.HasFault { + r := &methods.CreateDatacenterBody{} + + if folderHasChildType(&f.Folder, "Datacenter") && folderHasChildType(&f.Folder, "Folder") { + dc := NewDatacenter(ctx, &f.Folder) + + ctx.Update(dc, []types.PropertyChange{ + {Name: "name", Val: c.Name}, + }) + + r.Res = &types.CreateDatacenterResponse{ + Returnval: dc.Self, + } + + ctx.postEvent(&types.DatacenterCreatedEvent{ + DatacenterEvent: types.DatacenterEvent{ + Event: types.Event{ + Datacenter: datacenterEventArgument(dc), + }, + }, + Parent: folderEventArgument(&f.Folder), + }) + } else { + r.Fault_ = f.typeNotSupported() + } + + return r +} + +func (f *Folder) CreateClusterEx(ctx *Context, c *types.CreateClusterEx) soap.HasFault { + r := &methods.CreateClusterExBody{} + + if folderHasChildType(&f.Folder, "ComputeResource") && folderHasChildType(&f.Folder, "Folder") { + cluster, err := CreateClusterComputeResource(ctx, f, c.Name, c.Spec) + if err != nil { + r.Fault_ = Fault("", err) + return r + } + + r.Res = &types.CreateClusterExResponse{ + Returnval: cluster.Self, + } + } else { + r.Fault_ = f.typeNotSupported() + } + + return r +} + +type createVM struct { + *Folder + + ctx *Context + req *types.CreateVM_Task + + register bool +} + +// hostsWithDatastore returns hosts that have access to the given datastore path +func hostsWithDatastore(hosts []types.ManagedObjectReference, path string) []types.ManagedObjectReference { + attached := hosts[:0] + var p object.DatastorePath + p.FromString(path) + + for _, host := range hosts { + h := Map.Get(host).(*HostSystem) + if Map.FindByName(p.Datastore, h.Datastore) != nil { + attached = append(attached, host) + } + } + + return attached +} + +func (c *createVM) Run(task *Task) (types.AnyType, types.BaseMethodFault) { + config := &c.req.Config + // escape special characters in vm name + if config.Name != escapeSpecialCharacters(config.Name) { + deepCopy(c.req.Config, config) + config.Name = escapeSpecialCharacters(config.Name) + } + + vm, err := NewVirtualMachine(c.ctx, c.Folder.Self, &c.req.Config) + if err != nil { + return nil, err + } + + vm.ResourcePool = &c.req.Pool + + if c.req.Host == nil { + pool := c.ctx.Map.Get(c.req.Pool).(mo.Entity) + cr := c.ctx.Map.getEntityComputeResource(pool) + + c.ctx.WithLock(cr, func() { + var hosts []types.ManagedObjectReference + switch cr := cr.(type) { + case *mo.ComputeResource: + hosts = cr.Host + case *ClusterComputeResource: + hosts = cr.Host + } + + hosts = hostsWithDatastore(hosts, c.req.Config.Files.VmPathName) + host := hosts[rand.Intn(len(hosts))] + vm.Runtime.Host = &host + }) + } else { + vm.Runtime.Host = c.req.Host + } + + if cryptoSpec, ok := c.req.Config.Crypto.(*types.CryptoSpecEncrypt); ok { + if cryptoSpec.CryptoKeyId.KeyId == "" { + if cryptoSpec.CryptoKeyId.ProviderId == nil { + providerID, keyID := getDefaultProvider(c.ctx, vm, true) + if providerID == "" { + return nil, &types.InvalidVmConfig{Property: "configSpec.crypto"} + } + vm.Config.KeyId = &types.CryptoKeyId{ + KeyId: keyID, + ProviderId: &types.KeyProviderId{ + Id: providerID, + }, + } + } else { + providerID := cryptoSpec.CryptoKeyId.ProviderId.Id + keyID := generateKeyForProvider(c.ctx, providerID) + vm.Config.KeyId = &types.CryptoKeyId{ + KeyId: keyID, + ProviderId: &types.KeyProviderId{ + Id: providerID, + }, + } + } + } + } + + vm.Guest = &types.GuestInfo{ + ToolsStatus: types.VirtualMachineToolsStatusToolsNotInstalled, + ToolsVersion: "0", + ToolsRunningStatus: string(types.VirtualMachineToolsRunningStatusGuestToolsNotRunning), + } + + vm.Summary.Guest = &types.VirtualMachineGuestSummary{ + ToolsStatus: vm.Guest.ToolsStatus, + } + vm.Summary.Config.VmPathName = vm.Config.Files.VmPathName + vm.Summary.Runtime.Host = vm.Runtime.Host + + err = vm.create(c.ctx, &c.req.Config, c.register) + if err != nil { + folderRemoveChild(c.ctx, &c.Folder.Folder, vm) + return nil, err + } + + host := c.ctx.Map.Get(*vm.Runtime.Host).(*HostSystem) + c.ctx.Map.AppendReference(c.ctx, host, &host.Vm, vm.Self) + vm.EnvironmentBrowser = *hostParent(&host.HostSystem).EnvironmentBrowser + + for i := range vm.Datastore { + ds := c.ctx.Map.Get(vm.Datastore[i]).(*Datastore) + c.ctx.Map.AppendReference(c.ctx, ds, &ds.Vm, vm.Self) + } + + pool := c.ctx.Map.Get(*vm.ResourcePool) + // This can be an internal call from VirtualApp.CreateChildVMTask, where pool is already locked. + c.ctx.WithLock(pool, func() { + if rp, ok := asResourcePoolMO(pool); ok { + rp.Vm = append(rp.Vm, vm.Self) + } + if vapp, ok := pool.(*VirtualApp); ok { + vapp.Vm = append(vapp.Vm, vm.Self) + } + }) + + event := vm.event() + c.ctx.postEvent( + &types.VmBeingCreatedEvent{ + VmEvent: event, + ConfigSpec: &c.req.Config, + }, + &types.VmInstanceUuidAssignedEvent{ + VmEvent: event, + InstanceUuid: vm.Config.InstanceUuid, + }, + &types.VmUuidAssignedEvent{ + VmEvent: event, + Uuid: vm.Config.Uuid, + }, + &types.VmCreatedEvent{ + VmEvent: event, + }, + ) + + vm.RefreshStorageInfo(c.ctx, nil) + + c.ctx.Update(vm, []types.PropertyChange{ + {Name: "name", Val: c.req.Config.Name}, + }) + + return vm.Reference(), nil +} + +func (f *Folder) CreateVMTask(ctx *Context, c *types.CreateVM_Task) soap.HasFault { + return &methods.CreateVM_TaskBody{ + Res: &types.CreateVM_TaskResponse{ + Returnval: NewTask(&createVM{f, ctx, c, false}).Run(ctx), + }, + } +} + +type registerVM struct { + *Folder + + ctx *Context + req *types.RegisterVM_Task +} + +func (c *registerVM) Run(task *Task) (types.AnyType, types.BaseMethodFault) { + host := c.req.Host + pool := c.req.Pool + + if c.req.AsTemplate { + if host == nil { + return nil, &types.InvalidArgument{InvalidProperty: "host"} + } else if pool != nil { + return nil, &types.InvalidArgument{InvalidProperty: "pool"} + } + + pool = hostParent(&c.ctx.Map.Get(*host).(*HostSystem).HostSystem).ResourcePool + } else { + if pool == nil { + return nil, &types.InvalidArgument{InvalidProperty: "pool"} + } + } + + if c.req.Path == "" { + return nil, &types.InvalidArgument{InvalidProperty: "path"} + } + + s := c.ctx.Map.SearchIndex() + r := s.FindByDatastorePath(&types.FindByDatastorePath{ + This: s.Reference(), + Path: c.req.Path, + Datacenter: c.ctx.Map.getEntityDatacenter(c.Folder).Reference(), + }) + + if ref := r.(*methods.FindByDatastorePathBody).Res.Returnval; ref != nil { + return nil, &types.AlreadyExists{Name: ref.Value} + } + + if c.req.Name == "" { + p, err := parseDatastorePath(c.req.Path) + if err != nil { + return nil, err + } + + c.req.Name = path.Dir(p.Path) + } + + create := NewTask(&createVM{ + Folder: c.Folder, + register: true, + ctx: c.ctx, + req: &types.CreateVM_Task{ + This: c.Folder.Reference(), + Config: types.VirtualMachineConfigSpec{ + Name: c.req.Name, + Files: &types.VirtualMachineFileInfo{ + VmPathName: c.req.Path, + }, + }, + Pool: *pool, + Host: host, + }, + }) + + create.RunBlocking(c.ctx) + + if create.Info.Error != nil { + return nil, create.Info.Error.Fault + } + + return create.Info.Result, nil +} + +func (f *Folder) RegisterVMTask(ctx *Context, c *types.RegisterVM_Task) soap.HasFault { + return &methods.RegisterVM_TaskBody{ + Res: &types.RegisterVM_TaskResponse{ + Returnval: NewTask(®isterVM{f, ctx, c}).Run(ctx), + }, + } +} + +func (f *Folder) MoveIntoFolderTask(ctx *Context, c *types.MoveIntoFolder_Task) soap.HasFault { + task := CreateTask(f, "moveIntoFolder", func(t *Task) (types.AnyType, types.BaseMethodFault) { + for _, ref := range c.List { + obj := ctx.Map.Get(ref).(mo.Entity) + + parent, ok := ctx.Map.Get(*(obj.Entity()).Parent).(*Folder) + + if !ok || !folderHasChildType(&f.Folder, ref.Type) { + return nil, &types.NotSupported{} + } + + folderRemoveReference(ctx, &parent.Folder, ref) + folderPutChild(ctx, &f.Folder, obj) + } + + return nil, nil + }) + + return &methods.MoveIntoFolder_TaskBody{ + Res: &types.MoveIntoFolder_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (f *Folder) CreateDVSTask(ctx *Context, req *types.CreateDVS_Task) soap.HasFault { + task := CreateTask(f, "createDVS", func(t *Task) (types.AnyType, types.BaseMethodFault) { + spec := req.Spec.ConfigSpec.GetDVSConfigSpec() + dvs := &DistributedVirtualSwitch{} + dvs.Name = spec.Name + dvs.Entity().Name = dvs.Name + + if ctx.Map.FindByName(dvs.Name, f.ChildEntity) != nil { + return nil, &types.InvalidArgument{InvalidProperty: "name"} + } + + dvs.Uuid = newUUID(dvs.Name) + + folderPutChild(ctx, &f.Folder, dvs) + + dvs.Summary = types.DVSSummary{ + Name: dvs.Name, + Uuid: dvs.Uuid, + NumPorts: spec.NumStandalonePorts, + ProductInfo: req.Spec.ProductInfo, + Description: spec.Description, + } + + configInfo := &types.VMwareDVSConfigInfo{ + DVSConfigInfo: types.DVSConfigInfo{ + Uuid: dvs.Uuid, + Name: spec.Name, + ConfigVersion: spec.ConfigVersion, + NumStandalonePorts: spec.NumStandalonePorts, + MaxPorts: spec.MaxPorts, + UplinkPortPolicy: spec.UplinkPortPolicy, + UplinkPortgroup: spec.UplinkPortgroup, + DefaultPortConfig: spec.DefaultPortConfig, + ExtensionKey: spec.ExtensionKey, + Description: spec.Description, + Policy: spec.Policy, + VendorSpecificConfig: spec.VendorSpecificConfig, + SwitchIpAddress: spec.SwitchIpAddress, + DefaultProxySwitchMaxNumPorts: spec.DefaultProxySwitchMaxNumPorts, + InfrastructureTrafficResourceConfig: spec.InfrastructureTrafficResourceConfig, + NetworkResourceControlVersion: spec.NetworkResourceControlVersion, + }, + } + + if spec, ok := req.Spec.ConfigSpec.(*types.VMwareDVSConfigSpec); ok { + configInfo.LinkDiscoveryProtocolConfig = spec.LinkDiscoveryProtocolConfig + configInfo.MaxMtu = spec.MaxMtu + configInfo.IpfixConfig = spec.IpfixConfig + configInfo.LacpApiVersion = spec.LacpApiVersion + configInfo.MulticastFilteringMode = spec.MulticastFilteringMode + configInfo.NetworkOffloadSpecId = spec.NetworkOffloadSpecId + } + + if spec.Contact != nil { + configInfo.Contact = *spec.Contact + } + + dvs.Config = configInfo + + if dvs.Summary.ProductInfo == nil { + product := ctx.Map.content().About + dvs.Summary.ProductInfo = &types.DistributedVirtualSwitchProductSpec{ + Name: "DVS", + Vendor: product.Vendor, + Version: product.Version, + Build: product.Build, + ForwardingClass: "etherswitch", + } + } + + ctx.postEvent(&types.DvsCreatedEvent{ + DvsEvent: dvs.event(), + Parent: folderEventArgument(&f.Folder), + }) + + dvs.AddDVPortgroupTask(ctx, &types.AddDVPortgroup_Task{ + Spec: []types.DVPortgroupConfigSpec{{ + Name: dvs.Name + "-DVUplinks" + strings.TrimPrefix(dvs.Self.Value, "dvs"), + Type: string(types.DistributedVirtualPortgroupPortgroupTypeEarlyBinding), + NumPorts: 1, + DefaultPortConfig: &types.VMwareDVSPortSetting{ + Vlan: &types.VmwareDistributedVirtualSwitchTrunkVlanSpec{ + VlanId: []types.NumericRange{{Start: 0, End: 4094}}, + }, + UplinkTeamingPolicy: &types.VmwareUplinkPortTeamingPolicy{ + Policy: &types.StringPolicy{ + Value: "loadbalance_srcid", + }, + ReversePolicy: &types.BoolPolicy{ + Value: types.NewBool(true), + }, + NotifySwitches: &types.BoolPolicy{ + Value: types.NewBool(true), + }, + RollingOrder: &types.BoolPolicy{ + Value: types.NewBool(true), + }, + }, + }, + }}, + }) + + return dvs.Reference(), nil + }) + + return &methods.CreateDVS_TaskBody{ + Res: &types.CreateDVS_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (f *Folder) RenameTask(ctx *Context, r *types.Rename_Task) soap.HasFault { + return RenameTask(ctx, f, r) +} + +func (f *Folder) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + type destroyer interface { + mo.Reference + DestroyTask(*types.Destroy_Task) soap.HasFault + } + + task := CreateTask(f, "destroy", func(*Task) (types.AnyType, types.BaseMethodFault) { + // Attempt to destroy all children + for _, c := range f.ChildEntity { + obj, ok := ctx.Map.Get(c).(destroyer) + if !ok { + continue + } + + var fault types.BaseMethodFault + ctx.WithLock(obj, func() { + id := obj.DestroyTask(&types.Destroy_Task{ + This: c, + }).(*methods.Destroy_TaskBody).Res.Returnval + + t := ctx.Map.Get(id).(*Task) + t.Wait() + if t.Info.Error != nil { + fault = t.Info.Error.Fault // For example, can't destroy a powered on VM + } + }) + if fault != nil { + return nil, fault + } + } + + // Remove the folder itself + folderRemoveChild(ctx, &ctx.Map.Get(*f.Parent).(*Folder).Folder, f.Self) + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func addPlacementFault(body *methods.PlaceVmsXClusterBody, vmName string, vmRef *types.ManagedObjectReference, poolRef types.ManagedObjectReference) { + faults := types.PlaceVmsXClusterResultPlacementFaults{ + VmName: vmName, + ResourcePool: poolRef, + Vm: vmRef, + Faults: []types.LocalizedMethodFault{ + { + Fault: &types.GenericDrsFault{}, + }, + }, + } + body.Res.Returnval.Faults = append(body.Res.Returnval.Faults, faults) +} + +func generateRelocatePlacementAction(ctx *Context, inputRelocateSpec *types.VirtualMachineRelocateSpec, pool *ResourcePool, + cluster *ClusterComputeResource, hostRequired, datastoreRequired bool) *types.ClusterClusterRelocatePlacementAction { + var relocateSpec *types.VirtualMachineRelocateSpec + + placementAction := types.ClusterClusterRelocatePlacementAction{ + Pool: pool.Self, + } + + if hostRequired { + randomHost := cluster.Host[rand.Intn(len(cluster.Host))] + placementAction.TargetHost = &randomHost + } + + if datastoreRequired { + relocateSpec = inputRelocateSpec + + ds := ctx.Map.Get(cluster.Datastore[rand.Intn(len(cluster.Datastore))]).(*Datastore) + + relocateSpec.Datastore = types.NewReference(ds.Reference()) + + for _, diskLocator := range relocateSpec.Disk { + diskLocator.Datastore = ds.Reference() + } + } + + placementAction.RelocateSpec = relocateSpec + return &placementAction +} + +func generateRecommendationForRelocate(ctx *Context, req *types.PlaceVmsXCluster) *methods.PlaceVmsXClusterBody { + + pools := req.PlacementSpec.ResourcePools + specs := req.PlacementSpec.VmPlacementSpecs + + body := new(methods.PlaceVmsXClusterBody) + body.Res = new(types.PlaceVmsXClusterResponse) + hostRequired := req.PlacementSpec.HostRecommRequired != nil && *req.PlacementSpec.HostRecommRequired + datastoreRequired := req.PlacementSpec.DatastoreRecommRequired != nil && *req.PlacementSpec.DatastoreRecommRequired + + for _, spec := range specs { + + // The RelocateSpec must be set. + if spec.RelocateSpec == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "relocateSpec"}) + return body + } + + // The VM Reference must be set. + if spec.Vm == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "vm"}) + return body + } + + vmRef := ctx.Map.Get(*spec.Vm) + if vmRef == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "vm"}) + return body + } + + vm := vmRef.(*VirtualMachine) + pool := ctx.Map.Get(pools[rand.Intn(len(pools))]).(*ResourcePool) + cluster := ctx.Map.Get(pool.Owner).(*ClusterComputeResource) + + if len(cluster.Host) == 0 { + addPlacementFault(body, spec.ConfigSpec.Name, &vm.Self, pool.Self) + continue + } + + reco := types.ClusterRecommendation{ + Key: "1", + Type: "V1", + Time: time.Now(), + Rating: 1, + Reason: string(types.RecommendationReasonCodeXClusterPlacement), + ReasonText: string(types.RecommendationReasonCodeXClusterPlacement), + Target: &cluster.Self, + } + + placementAction := generateRelocatePlacementAction(ctx, spec.RelocateSpec, pool, cluster, hostRequired, datastoreRequired) + + reco.Action = append(reco.Action, placementAction) + + body.Res.Returnval.PlacementInfos = append(body.Res.Returnval.PlacementInfos, + types.PlaceVmsXClusterResultPlacementInfo{ + VmName: vm.Name, + Recommendation: reco, + Vm: &vm.Self, + }, + ) + } + return body +} + +func generateReconfigurePlacementAction(ctx *Context, inputConfigSpec *types.VirtualMachineConfigSpec, pool *ResourcePool, + cluster *ClusterComputeResource, hostRequired, datastoreRequired bool) *types.ClusterClusterReconfigurePlacementAction { + var configSpec *types.VirtualMachineConfigSpec + + placementAction := types.ClusterClusterReconfigurePlacementAction{ + Pool: pool.Self, + } + + if hostRequired { + randomHost := cluster.Host[rand.Intn(len(cluster.Host))] + placementAction.TargetHost = &randomHost + } + + if datastoreRequired { + configSpec = inputConfigSpec + + ds := ctx.Map.Get(cluster.Datastore[rand.Intn(len(cluster.Datastore))]).(*Datastore) + + fillConfigSpecWithDatastore(ctx, inputConfigSpec, configSpec, ds) + } + + placementAction.ConfigSpec = configSpec + return &placementAction +} + +func generateRecommendationForReconfigure(ctx *Context, req *types.PlaceVmsXCluster) *methods.PlaceVmsXClusterBody { + + pools := req.PlacementSpec.ResourcePools + specs := req.PlacementSpec.VmPlacementSpecs + + body := new(methods.PlaceVmsXClusterBody) + body.Res = new(types.PlaceVmsXClusterResponse) + hostRequired := req.PlacementSpec.HostRecommRequired != nil && *req.PlacementSpec.HostRecommRequired + datastoreRequired := req.PlacementSpec.DatastoreRecommRequired != nil && *req.PlacementSpec.DatastoreRecommRequired + + for _, spec := range specs { + + // Only a single pool must be set + if len(pools) != 1 { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "resourcePools"}) + return body + } + + // The RelocateSpec must not be set. + if spec.RelocateSpec != nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "relocateSpec"}) + return body + } + + // The VM Reference must be set. + if spec.Vm == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "vm"}) + return body + } + + vmRef := ctx.Map.Get(*spec.Vm) + if vmRef == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "vm"}) + return body + } + + vm := vmRef.(*VirtualMachine) + + // Use VM's current host + host := Map.Get(vm.Runtime.Host.Reference()).(*HostSystem) + + if host.Parent.Type != "ClusterComputeResource" { + addPlacementFault(body, spec.ConfigSpec.Name, &vm.Self, host.Self) + continue + } + + cluster := ctx.Map.Get(*host.Parent).(*ClusterComputeResource) + pool := ctx.Map.Get(*cluster.ResourcePool).(*ResourcePool) + + reco := types.ClusterRecommendation{ + Key: "1", + Type: "V1", + Time: time.Now(), + Rating: 1, + Reason: string(types.RecommendationReasonCodeXClusterPlacement), + ReasonText: string(types.RecommendationReasonCodeXClusterPlacement), + Target: &cluster.Self, + } + + placementAction := generateReconfigurePlacementAction(ctx, &spec.ConfigSpec, pool, cluster, hostRequired, datastoreRequired) + + reco.Action = append(reco.Action, placementAction) + + body.Res.Returnval.PlacementInfos = append(body.Res.Returnval.PlacementInfos, + types.PlaceVmsXClusterResultPlacementInfo{ + VmName: vm.Name, + Recommendation: reco, + Vm: &vm.Self, + }, + ) + } + return body +} + +func fillConfigSpecWithDatastore(ctx *Context, inputConfigSpec, configSpec *types.VirtualMachineConfigSpec, ds *Datastore) { + if configSpec.Files == nil { + configSpec.Files = new(types.VirtualMachineFileInfo) + } + configSpec.Files.VmPathName = fmt.Sprintf("[%[1]s] %[2]s/%[2]s.vmx", ds.Name, inputConfigSpec.Name) + + for _, change := range configSpec.DeviceChange { + dspec := change.GetVirtualDeviceConfigSpec() + + if dspec.FileOperation != types.VirtualDeviceConfigSpecFileOperationCreate { + continue + } + + switch dspec.Operation { + case types.VirtualDeviceConfigSpecOperationAdd: + device := dspec.Device + d := device.GetVirtualDevice() + + switch device.(type) { + case *types.VirtualDisk: + switch b := d.Backing.(type) { + case types.BaseVirtualDeviceFileBackingInfo: + info := b.GetVirtualDeviceFileBackingInfo() + info.Datastore = types.NewReference(ds.Reference()) + + var dsPath object.DatastorePath + if dsPath.FromString(info.FileName) { + dsPath.Datastore = ds.Name + info.FileName = dsPath.String() + } + } + } + } + } +} + +func generateInitialPlacementAction(ctx *Context, inputConfigSpec *types.VirtualMachineConfigSpec, pool *ResourcePool, + cluster *ClusterComputeResource, hostRequired, datastoreRequired bool) *types.ClusterClusterInitialPlacementAction { + var configSpec *types.VirtualMachineConfigSpec + + placementAction := types.ClusterClusterInitialPlacementAction{ + Pool: pool.Self, + } + + if hostRequired { + randomHost := cluster.Host[rand.Intn(len(cluster.Host))] + placementAction.TargetHost = &randomHost + } + + if datastoreRequired { + configSpec = inputConfigSpec + + // TODO: This is just an initial implementation aimed at returning some data but it is not + // necessarily fully consistent, like we should ensure the host, if also required, has the + // datastore mounted. + ds := ctx.Map.Get(cluster.Datastore[rand.Intn(len(cluster.Datastore))]).(*Datastore) + + fillConfigSpecWithDatastore(ctx, inputConfigSpec, configSpec, ds) + } + + placementAction.ConfigSpec = configSpec + return &placementAction +} + +func generateRecommendationForCreateAndPowerOn(ctx *Context, req *types.PlaceVmsXCluster) *methods.PlaceVmsXClusterBody { + + pools := req.PlacementSpec.ResourcePools + specs := req.PlacementSpec.VmPlacementSpecs + + body := new(methods.PlaceVmsXClusterBody) + body.Res = new(types.PlaceVmsXClusterResponse) + hostRequired := req.PlacementSpec.HostRecommRequired != nil && *req.PlacementSpec.HostRecommRequired + datastoreRequired := req.PlacementSpec.DatastoreRecommRequired != nil && *req.PlacementSpec.DatastoreRecommRequired + + for _, spec := range specs { + + // The RelocateSpec must not be set. + if spec.RelocateSpec != nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "relocateSpec"}) + return body + } + + // The name in the ConfigSpec must set. + if spec.ConfigSpec.Name == "" { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "configSpec.name"}) + return body + } + + pool := ctx.Map.Get(pools[rand.Intn(len(pools))]).(*ResourcePool) + cluster := ctx.Map.Get(pool.Owner).(*ClusterComputeResource) + + if len(cluster.Host) == 0 { + addPlacementFault(body, spec.ConfigSpec.Name, nil, pool.Self) + continue + } + + reco := types.ClusterRecommendation{ + Key: "1", + Type: "V1", + Time: time.Now(), + Rating: 1, + Reason: string(types.RecommendationReasonCodeXClusterPlacement), + ReasonText: string(types.RecommendationReasonCodeXClusterPlacement), + Target: &cluster.Self, + } + + placementAction := generateInitialPlacementAction(ctx, &spec.ConfigSpec, pool, cluster, hostRequired, datastoreRequired) + + reco.Action = append(reco.Action, placementAction) + + body.Res.Returnval.PlacementInfos = append(body.Res.Returnval.PlacementInfos, + types.PlaceVmsXClusterResultPlacementInfo{ + VmName: spec.ConfigSpec.Name, + Recommendation: reco, + }, + ) + } + return body +} + +func (f *Folder) PlaceVmsXCluster(ctx *Context, req *types.PlaceVmsXCluster) soap.HasFault { + body := new(methods.PlaceVmsXClusterBody) + + // Reject the request if it is against any folder other than the root folder. + if req.This != ctx.Map.content().RootFolder { + body.Fault_ = Fault("", new(types.InvalidRequest)) + return body + } + + pools := req.PlacementSpec.ResourcePools + specs := req.PlacementSpec.VmPlacementSpecs + + if len(pools) == 0 { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "resourcePools"}) + return body + } + + // Do not allow duplicate clusters. + clusters := map[mo.Reference]struct{}{} + for _, obj := range pools { + o := ctx.Map.Get(obj) + pool, ok := o.(*ResourcePool) + if !ok { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "resourcePool"}) + return body + } + if _, exists := clusters[pool.Owner]; exists { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "clusters"}) + return body + } + clusters[pool.Owner] = struct{}{} + } + + // MVP: Only a single VM placement spec is supported. + if len(specs) != 1 { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "vmPlacementSpecs"}) + return body + } + + placementType := types.PlaceVmsXClusterSpecPlacementType(req.PlacementSpec.PlacementType) + + // An empty placement type defaults to CreateAndPowerOn. + if req.PlacementSpec.PlacementType == "" { + placementType = types.PlaceVmsXClusterSpecPlacementTypeCreateAndPowerOn + } + + switch placementType { + case types.PlaceVmsXClusterSpecPlacementTypeCreateAndPowerOn: + return generateRecommendationForCreateAndPowerOn(ctx, req) + case types.PlaceVmsXClusterSpecPlacementTypeRelocate: + return generateRecommendationForRelocate(ctx, req) + case types.PlaceVmsXClusterSpecPlacementTypeReconfigure: + return generateRecommendationForReconfigure(ctx, req) + } + + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "placementType"}) + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/guest_id.go b/vendor/github.com/vmware/govmomi/simulator/guest_id.go new file mode 100644 index 0000000000..f87f006c84 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/guest_id.go @@ -0,0 +1,22 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import "github.com/vmware/govmomi/vim25/types" + +// GuestID is the list of valid types.VirtualMachineGuestOsIdentifier +var GuestID = types.VirtualMachineGuestOsIdentifier("").Values() diff --git a/vendor/github.com/vmware/govmomi/simulator/guest_operations_manager.go b/vendor/github.com/vmware/govmomi/simulator/guest_operations_manager.go new file mode 100644 index 0000000000..f058835808 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/guest_operations_manager.go @@ -0,0 +1,457 @@ +/* +Copyright (c) 2020 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "bufio" + "fmt" + "net/url" + "strings" + "syscall" + "time" + + "github.com/vmware/govmomi/toolbox/process" + "github.com/vmware/govmomi/toolbox/vix" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type GuestOperationsManager struct { + mo.GuestOperationsManager +} + +func (m *GuestOperationsManager) init(r *Registry) { + fm := new(GuestFileManager) + if m.FileManager == nil { + m.FileManager = &types.ManagedObjectReference{ + Type: "GuestFileManager", + Value: "guestOperationsFileManager", + } + } + fm.Self = *m.FileManager + r.Put(fm) + + pm := new(GuestProcessManager) + if m.ProcessManager == nil { + m.ProcessManager = &types.ManagedObjectReference{ + Type: "GuestProcessManager", + Value: "guestOperationsProcessManager", + } + } + pm.Self = *m.ProcessManager + pm.Manager = process.NewManager() + r.Put(pm) +} + +type GuestFileManager struct { + mo.GuestFileManager +} + +func guestURL(ctx *Context, vm *VirtualMachine, path string) string { + return (&url.URL{ + Scheme: ctx.svc.Listen.Scheme, + Host: "*", // See guest.FileManager.TransferURL + Path: guestPrefix + strings.TrimPrefix(path, "/"), + RawQuery: url.Values{ + "id": []string{vm.svm.c.id}, + "token": []string{ctx.Session.Key}, + }.Encode(), + }).String() +} + +func (m *GuestFileManager) InitiateFileTransferToGuest(ctx *Context, req *types.InitiateFileTransferToGuest) soap.HasFault { + body := new(methods.InitiateFileTransferToGuestBody) + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + err := vm.svm.prepareGuestOperation(req.Auth) + if err != nil { + body.Fault_ = Fault("", err) + return body + } + + body.Res = &types.InitiateFileTransferToGuestResponse{ + Returnval: guestURL(ctx, vm, req.GuestFilePath), + } + + return body +} + +func (m *GuestFileManager) InitiateFileTransferFromGuest(ctx *Context, req *types.InitiateFileTransferFromGuest) soap.HasFault { + body := new(methods.InitiateFileTransferFromGuestBody) + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + err := vm.svm.prepareGuestOperation(req.Auth) + if err != nil { + body.Fault_ = Fault("", err) + return body + } + + body.Res = &types.InitiateFileTransferFromGuestResponse{ + Returnval: types.FileTransferInformation{ + Attributes: nil, // TODO + Size: 0, // TODO + Url: guestURL(ctx, vm, req.GuestFilePath), + }, + } + + return body +} + +type GuestProcessManager struct { + mo.GuestProcessManager + *process.Manager +} + +func (m *GuestProcessManager) StartProgramInGuest(ctx *Context, req *types.StartProgramInGuest) soap.HasFault { + body := new(methods.StartProgramInGuestBody) + + spec := req.Spec.(*types.GuestProgramSpec) + auth := req.Auth.(*types.NamePasswordAuthentication) + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + fault := vm.svm.prepareGuestOperation(auth) + if fault != nil { + body.Fault_ = Fault("", fault) + } + + args := []string{"exec"} + + if spec.WorkingDirectory != "" { + args = append(args, "-w", spec.WorkingDirectory) + } + + for _, e := range spec.EnvVariables { + args = append(args, "-e", e) + } + + args = append(args, vm.svm.c.id, spec.ProgramPath, spec.Arguments) + + spec.ProgramPath = "docker" + spec.Arguments = strings.Join(args, " ") + + start := &vix.StartProgramRequest{ + ProgramPath: spec.ProgramPath, + Arguments: spec.Arguments, + } + + proc := process.New() + proc.Owner = auth.Username + + pid, err := m.Start(start, proc) + if err != nil { + panic(err) // only happens if LookPath("docker") fails, which it should't at this point + } + + body.Res = &types.StartProgramInGuestResponse{ + Returnval: pid, + } + + return body +} + +func (m *GuestProcessManager) ListProcessesInGuest(ctx *Context, req *types.ListProcessesInGuest) soap.HasFault { + body := &methods.ListProcessesInGuestBody{ + Res: new(types.ListProcessesInGuestResponse), + } + + procs := m.List(req.Pids) + + for _, proc := range procs { + var end *time.Time + if proc.EndTime != 0 { + end = types.NewTime(time.Unix(proc.EndTime, 0)) + } + + body.Res.Returnval = append(body.Res.Returnval, types.GuestProcessInfo{ + Name: proc.Name, + Pid: proc.Pid, + Owner: proc.Owner, + CmdLine: proc.Name + " " + proc.Args, + StartTime: time.Unix(proc.StartTime, 0), + EndTime: end, + ExitCode: proc.ExitCode, + }) + } + + return body +} + +func (m *GuestProcessManager) TerminateProcessInGuest(ctx *Context, req *types.TerminateProcessInGuest) soap.HasFault { + body := new(methods.TerminateProcessInGuestBody) + + if m.Kill(req.Pid) { + body.Res = new(types.TerminateProcessInGuestResponse) + } else { + body.Fault_ = Fault("", &types.GuestProcessNotFound{Pid: req.Pid}) + } + + return body +} + +func (m *GuestFileManager) mktemp(ctx *Context, req *types.CreateTemporaryFileInGuest, dir bool) (string, types.BaseMethodFault) { + args := []string{"mktemp", fmt.Sprintf("--tmpdir=%s", req.DirectoryPath), req.Prefix + "vcsim-XXXXX" + req.Suffix} + if dir { + args = append(args, "-d") + } + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + return vm.svm.exec(ctx, req.Auth, args) +} + +func (m *GuestFileManager) CreateTemporaryFileInGuest(ctx *Context, req *types.CreateTemporaryFileInGuest) soap.HasFault { + body := new(methods.CreateTemporaryFileInGuestBody) + + res, fault := m.mktemp(ctx, req, false) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = &types.CreateTemporaryFileInGuestResponse{Returnval: res} + + return body +} + +func (m *GuestFileManager) CreateTemporaryDirectoryInGuest(ctx *Context, req *types.CreateTemporaryDirectoryInGuest) soap.HasFault { + body := new(methods.CreateTemporaryDirectoryInGuestBody) + + dir := types.CreateTemporaryFileInGuest(*req) + res, fault := m.mktemp(ctx, &dir, true) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = &types.CreateTemporaryDirectoryInGuestResponse{Returnval: res} + + return body +} + +func listFiles(req *types.ListFilesInGuest) []string { + args := []string{"find", req.FilePath} + if req.MatchPattern != "" { + args = append(args, "-name", req.MatchPattern) + } + return append(args, "-maxdepth", "1", "-exec", "stat", "-c", "%s %u %g %f %X %Y %n", "{}", "+") +} + +func toFileInfo(s string) []types.GuestFileInfo { + var res []types.GuestFileInfo + + scanner := bufio.NewScanner(strings.NewReader(s)) + + for scanner.Scan() { + var mode, atime, mtime int64 + attr := &types.GuestPosixFileAttributes{OwnerId: new(int32), GroupId: new(int32)} + info := types.GuestFileInfo{Attributes: attr} + + _, err := fmt.Sscanf(scanner.Text(), "%d %d %d %x %d %d %s", + &info.Size, attr.OwnerId, attr.GroupId, &mode, &atime, &mtime, &info.Path) + if err != nil { + panic(err) + } + + attr.AccessTime = types.NewTime(time.Unix(atime, 0)) + attr.ModificationTime = types.NewTime(time.Unix(mtime, 0)) + attr.Permissions = mode & 0777 + + switch mode & syscall.S_IFMT { + case syscall.S_IFDIR: + info.Type = string(types.GuestFileTypeDirectory) + case syscall.S_IFLNK: + info.Type = string(types.GuestFileTypeSymlink) + default: + info.Type = string(types.GuestFileTypeFile) + } + + res = append(res, info) + } + + return res +} + +func (m *GuestFileManager) ListFilesInGuest(ctx *Context, req *types.ListFilesInGuest) soap.HasFault { + body := new(methods.ListFilesInGuestBody) + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + if req.FilePath == "" { + body.Fault_ = Fault("", new(types.InvalidArgument)) + return body + } + + res, fault := vm.svm.exec(ctx, req.Auth, listFiles(req)) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = new(types.ListFilesInGuestResponse) + body.Res.Returnval.Files = toFileInfo(res) + + return body +} + +func (m *GuestFileManager) DeleteFileInGuest(ctx *Context, req *types.DeleteFileInGuest) soap.HasFault { + body := new(methods.DeleteFileInGuestBody) + + args := []string{"rm", req.FilePath} + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = new(types.DeleteFileInGuestResponse) + + return body +} + +func (m *GuestFileManager) DeleteDirectoryInGuest(ctx *Context, req *types.DeleteDirectoryInGuest) soap.HasFault { + body := new(methods.DeleteDirectoryInGuestBody) + + args := []string{"rmdir", req.DirectoryPath} + if req.Recursive { + args = []string{"rm", "-rf", req.DirectoryPath} + } + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = new(types.DeleteDirectoryInGuestResponse) + + return body +} + +func (m *GuestFileManager) MakeDirectoryInGuest(ctx *Context, req *types.MakeDirectoryInGuest) soap.HasFault { + body := new(methods.MakeDirectoryInGuestBody) + + args := []string{"mkdir", req.DirectoryPath} + if req.CreateParentDirectories { + args = []string{"mkdir", "-p", req.DirectoryPath} + } + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = new(types.MakeDirectoryInGuestResponse) + + return body +} + +func (m *GuestFileManager) MoveFileInGuest(ctx *Context, req *types.MoveFileInGuest) soap.HasFault { + body := new(methods.MoveFileInGuestBody) + + args := []string{"mv"} + if !req.Overwrite { + args = append(args, "-n") + } + args = append(args, req.SrcFilePath, req.DstFilePath) + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = new(types.MoveFileInGuestResponse) + + return body +} + +func (m *GuestFileManager) MoveDirectoryInGuest(ctx *Context, req *types.MoveDirectoryInGuest) soap.HasFault { + body := new(methods.MoveDirectoryInGuestBody) + + args := []string{"mv", req.SrcDirectoryPath, req.DstDirectoryPath} + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = new(types.MoveDirectoryInGuestResponse) + + return body +} + +func (m *GuestFileManager) ChangeFileAttributesInGuest(ctx *Context, req *types.ChangeFileAttributesInGuest) soap.HasFault { + body := new(methods.ChangeFileAttributesInGuestBody) + + vm := ctx.Map.Get(req.Vm).(*VirtualMachine) + + attr, ok := req.FileAttributes.(*types.GuestPosixFileAttributes) + if !ok { + body.Fault_ = Fault("", new(types.OperationNotSupportedByGuest)) + return body + } + + if attr.Permissions != 0 { + args := []string{"chmod", fmt.Sprintf("%#o", attr.Permissions), req.GuestFilePath} + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + } + + change := []struct { + cmd string + id *int32 + }{ + {"chown", attr.OwnerId}, + {"chgrp", attr.GroupId}, + } + + for _, c := range change { + if c.id != nil { + args := []string{c.cmd, fmt.Sprintf("%d", *c.id), req.GuestFilePath} + + _, fault := vm.svm.exec(ctx, req.Auth, args) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + } + } + + body.Res = new(types.ChangeFileAttributesInGuestResponse) + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/history_collector.go b/vendor/github.com/vmware/govmomi/simulator/history_collector.go new file mode 100644 index 0000000000..e48e53f77a --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/history_collector.go @@ -0,0 +1,181 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "container/list" + "sync" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var ( + maxPageSize = 1000 + maxCollectors int32 = 32 // the VC default limit + defaultPageSize = 10 + + errInvalidArgMaxCount = &types.InvalidArgument{InvalidProperty: "maxCount"} +) + +type HistoryCollector struct { + parent *history + root types.ManagedObjectReference + size int + + fill func(*Context) + page *list.List + pos *list.Element +} + +type history struct { + sync.Mutex + + page *list.List + collectors map[types.ManagedObjectReference]mo.Reference +} + +func newHistory() *history { + return &history{ + page: list.New(), + collectors: make(map[types.ManagedObjectReference]mo.Reference), + } +} + +func (c *history) add(ctx *Context, collector mo.Reference) types.ManagedObjectReference { + ref := ctx.Session.Put(collector).Reference() + + c.Lock() + c.collectors[ref] = collector + c.Unlock() + + return ref +} + +func (c *history) remove(ctx *Context, ref types.ManagedObjectReference) { + ctx.Session.Remove(ctx, ref) + + c.Lock() + delete(c.collectors, ref) + c.Unlock() +} + +func newHistoryCollector(ctx *Context, h *history, size int) *HistoryCollector { + return &HistoryCollector{ + parent: h, + root: ctx.Map.content().RootFolder, + size: size, + page: list.New(), + } +} + +func (c *HistoryCollector) SetCollectorPageSize(ctx *Context, req *types.SetCollectorPageSize) soap.HasFault { + body := new(methods.SetCollectorPageSizeBody) + size, err := validatePageSize(req.MaxCount) + if err != nil { + body.Fault_ = err + return body + } + + c.size = size + c.page = list.New() + c.fill(ctx) + + body.Res = new(types.SetCollectorPageSizeResponse) + return body +} + +func (c *HistoryCollector) ResetCollector(ctx *Context, req *types.ResetCollector) soap.HasFault { + c.pos = c.page.Back() + + return &methods.ResetCollectorBody{ + Res: new(types.ResetCollectorResponse), + } +} + +func (c *HistoryCollector) RewindCollector(ctx *Context, req *types.RewindCollector) soap.HasFault { + c.pos = c.page.Front() + + return &methods.RewindCollectorBody{ + Res: new(types.RewindCollectorResponse), + } +} + +func (c *HistoryCollector) DestroyCollector(ctx *Context, req *types.DestroyCollector) soap.HasFault { + ctx.Session.Remove(ctx, req.This) + + c.parent.remove(ctx, req.This) + + return &methods.DestroyCollectorBody{ + Res: new(types.DestroyCollectorResponse), + } +} + +func (c *HistoryCollector) read(max int32, next func() *list.Element, take func(*list.Element)) { + for i := 0; i < int(max); i++ { + e := next() + if e == nil { + break + } + + take(e) + c.pos = e + } +} + +func (c *HistoryCollector) next(max int32, take func(*list.Element)) { + next := func() *list.Element { + if c.pos != nil { + return c.pos.Next() + } + return c.page.Front() + } + + c.read(max, next, take) +} + +func (c *HistoryCollector) prev(max int32, take func(*list.Element)) { + next := func() *list.Element { + if c.pos != nil { + return c.pos.Prev() + } + return c.page.Back() + } + + c.read(max, next, take) +} + +func pushHistory(l *list.List, item types.AnyType) { + if l.Len() > maxPageSize { + l.Remove(l.Front()) // Prune history + } + l.PushBack(item) +} + +func validatePageSize(count int32) (int, *soap.Fault) { + size := int(count) + + if size == 0 { + size = defaultPageSize + } else if size < 0 || size > maxPageSize { + return -1, Fault("", errInvalidArgMaxCount) + } + + return size, nil +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_certificate_manager.go b/vendor/github.com/vmware/govmomi/simulator/host_certificate_manager.go new file mode 100644 index 0000000000..5e6a5fdc4c --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_certificate_manager.go @@ -0,0 +1,111 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "bytes" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "net" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostCertificateManager struct { + mo.HostCertificateManager + + Host *mo.HostSystem +} + +func (m *HostCertificateManager) init(r *Registry) { + for _, obj := range r.objects { + if h, ok := obj.(*HostSystem); ok { + if h.ConfigManager.CertificateManager.Value == m.Self.Value { + m.Host = &h.HostSystem + } + } + } +} + +func NewHostCertificateManager(h *mo.HostSystem) *HostCertificateManager { + m := &HostCertificateManager{Host: h} + + _ = m.InstallServerCertificate(SpoofContext(), &types.InstallServerCertificate{ + Cert: string(m.Host.Config.Certificate), + }) + + return m +} + +func (m *HostCertificateManager) InstallServerCertificate(ctx *Context, req *types.InstallServerCertificate) soap.HasFault { + body := new(methods.InstallServerCertificateBody) + + var info object.HostCertificateInfo + cert := []byte(req.Cert) + _, err := info.FromPEM(cert) + if err != nil { + body.Fault_ = Fault(err.Error(), new(types.HostConfigFault)) + return body + } + + m.CertificateInfo = info.HostCertificateManagerCertificateInfo + + m.Host.Config.Certificate = cert + + body.Res = new(types.InstallServerCertificateResponse) + + return body +} + +func (m *HostCertificateManager) GenerateCertificateSigningRequest(ctx *Context, req *types.GenerateCertificateSigningRequest) soap.HasFault { + block, _ := pem.Decode(m.Host.Config.Certificate) + cert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + panic(err) + } + + csr := x509.CertificateRequest{ + Subject: cert.Subject, + SignatureAlgorithm: x509.SHA256WithRSA, + } + + if req.UseIpAddressAsCommonName { + csr.IPAddresses = []net.IP{net.ParseIP(m.Host.Summary.ManagementServerIp)} + } else { + csr.DNSNames = []string{m.Host.Name} + } + + key, _ := rsa.GenerateKey(rand.Reader, 2048) + der, _ := x509.CreateCertificateRequest(rand.Reader, &csr, key) + var buf bytes.Buffer + err = pem.Encode(&buf, &pem.Block{Type: "CERTIFICATE REQUEST", Bytes: der}) + if err != nil { + panic(err) + } + + return &methods.GenerateCertificateSigningRequestBody{ + Res: &types.GenerateCertificateSigningRequestResponse{ + Returnval: buf.String(), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_datastore_browser.go b/vendor/github.com/vmware/govmomi/simulator/host_datastore_browser.go new file mode 100644 index 0000000000..4725203163 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_datastore_browser.go @@ -0,0 +1,254 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "os" + "path" + "strings" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostDatastoreBrowser struct { + mo.HostDatastoreBrowser +} + +type searchDatastore struct { + *HostDatastoreBrowser + + DatastorePath string + SearchSpec *types.HostDatastoreBrowserSearchSpec + + res []types.HostDatastoreBrowserSearchResults + + recurse bool +} + +func (s *searchDatastore) addFile(file os.FileInfo, res *types.HostDatastoreBrowserSearchResults) { + details := s.SearchSpec.Details + if details == nil { + details = new(types.FileQueryFlags) + } + + name := file.Name() + + info := types.FileInfo{ + Path: name, + } + + var finfo types.BaseFileInfo = &info + + if details.FileSize { + info.FileSize = file.Size() + } + + if details.Modification { + mtime := file.ModTime() + info.Modification = &mtime + } + + if isTrue(details.FileOwner) { + // Assume for now this process created all files in the datastore + user := os.Getenv("USER") + + info.Owner = user + } + + if file.IsDir() { + finfo = &types.FolderFileInfo{FileInfo: info} + } else if details.FileType { + switch path.Ext(name) { + case ".img": + finfo = &types.FloppyImageFileInfo{FileInfo: info} + case ".iso": + finfo = &types.IsoImageFileInfo{FileInfo: info} + case ".log": + finfo = &types.VmLogFileInfo{FileInfo: info} + case ".nvram": + finfo = &types.VmNvramFileInfo{FileInfo: info} + case ".vmdk": + // TODO: lookup device to set other fields + finfo = &types.VmDiskFileInfo{FileInfo: info} + case ".vmx": + finfo = &types.VmConfigFileInfo{FileInfo: info} + } + } + + res.File = append(res.File, finfo) +} + +func (s *searchDatastore) queryMatch(file os.FileInfo) bool { + if len(s.SearchSpec.Query) == 0 { + return true + } + + name := file.Name() + ext := path.Ext(name) + + for _, q := range s.SearchSpec.Query { + switch q.(type) { + case *types.FileQuery: + return true + case *types.FolderFileQuery: + if file.IsDir() { + return true + } + case *types.FloppyImageFileQuery: + if ext == ".img" { + return true + } + case *types.IsoImageFileQuery: + if ext == ".iso" { + return true + } + case *types.VmConfigFileQuery: + if ext == ".vmx" { + // TODO: check Filter and Details fields + return true + } + case *types.VmDiskFileQuery: + if ext == ".vmdk" { + // TODO: check Filter and Details fields + return !strings.HasSuffix(name, "-flat.vmdk") + } + case *types.VmLogFileQuery: + if ext == ".log" { + return strings.HasPrefix(name, "vmware") + } + case *types.VmNvramFileQuery: + if ext == ".nvram" { + return true + } + case *types.VmSnapshotFileQuery: + if ext == ".vmsn" { + return true + } + } + } + + return false +} + +func (s *searchDatastore) search(ds *types.ManagedObjectReference, folder string, dir string) error { + files, err := os.ReadDir(dir) + if err != nil { + tracef("search %s: %s", dir, err) + return err + } + + res := types.HostDatastoreBrowserSearchResults{ + Datastore: ds, + FolderPath: folder, + } + + for _, file := range files { + name := file.Name() + info, _ := file.Info() + if s.queryMatch(info) { + for _, m := range s.SearchSpec.MatchPattern { + if ok, _ := path.Match(m, name); ok { + s.addFile(info, &res) + break + } + } + } + + if s.recurse && file.IsDir() { + _ = s.search(ds, path.Join(folder, name), path.Join(dir, name)) + } + } + + s.res = append(s.res, res) + + return nil +} + +func (s *searchDatastore) Run(task *Task) (types.AnyType, types.BaseMethodFault) { + p, fault := parseDatastorePath(s.DatastorePath) + if fault != nil { + return nil, fault + } + + ref := Map.FindByName(p.Datastore, s.Datastore) + if ref == nil { + return nil, &types.InvalidDatastore{Name: p.Datastore} + } + + ds := ref.(*Datastore) + + isolatedLockContext := &Context{} // we don't need/want to share the task lock + Map.WithLock(isolatedLockContext, task, func() { + task.Info.Entity = &ds.Self // TODO: CreateTask() should require mo.Entity, rather than mo.Reference + task.Info.EntityName = ds.Name + }) + + dir := path.Join(ds.Info.GetDatastoreInfo().Url, p.Path) + + err := s.search(&ds.Self, s.DatastorePath, dir) + if err != nil { + ff := types.FileFault{ + File: p.Path, + } + + if os.IsNotExist(err) { + return nil, &types.FileNotFound{FileFault: ff} + } + + return nil, &types.InvalidArgument{InvalidProperty: p.Path} + } + + if s.recurse { + return types.ArrayOfHostDatastoreBrowserSearchResults{ + HostDatastoreBrowserSearchResults: s.res, + }, nil + } + + return s.res[0], nil +} + +func (b *HostDatastoreBrowser) SearchDatastoreTask(ctx *Context, s *types.SearchDatastore_Task) soap.HasFault { + task := NewTask(&searchDatastore{ + HostDatastoreBrowser: b, + DatastorePath: s.DatastorePath, + SearchSpec: s.SearchSpec, + }) + + return &methods.SearchDatastore_TaskBody{ + Res: &types.SearchDatastore_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (b *HostDatastoreBrowser) SearchDatastoreSubFoldersTask(ctx *Context, s *types.SearchDatastoreSubFolders_Task) soap.HasFault { + task := NewTask(&searchDatastore{ + HostDatastoreBrowser: b, + DatastorePath: s.DatastorePath, + SearchSpec: s.SearchSpec, + recurse: true, + }) + + return &methods.SearchDatastoreSubFolders_TaskBody{ + Res: &types.SearchDatastoreSubFolders_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_datastore_system.go b/vendor/github.com/vmware/govmomi/simulator/host_datastore_system.go new file mode 100644 index 0000000000..da6436917d --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_datastore_system.go @@ -0,0 +1,209 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "os" + "path" + + "github.com/vmware/govmomi/units" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostDatastoreSystem struct { + mo.HostDatastoreSystem + + Host *mo.HostSystem +} + +func (dss *HostDatastoreSystem) add(ctx *Context, ds *Datastore) *soap.Fault { + info := ds.Info.GetDatastoreInfo() + + info.Name = ds.Name + + if e := ctx.Map.FindByName(ds.Name, dss.Datastore); e != nil { + return Fault(e.Reference().Value, &types.DuplicateName{ + Name: ds.Name, + Object: e.Reference(), + }) + } + + fi, err := os.Stat(info.Url) + if err == nil && !fi.IsDir() { + err = os.ErrInvalid + } + + if err != nil { + switch { + case os.IsNotExist(err): + return Fault(err.Error(), &types.NotFound{}) + default: + return Fault(err.Error(), &types.HostConfigFault{}) + } + } + + folder := ctx.Map.getEntityFolder(dss.Host, "datastore") + + found := false + if e := ctx.Map.FindByName(ds.Name, folder.ChildEntity); e != nil { + if e.Reference().Type != "Datastore" { + return Fault(e.Reference().Value, &types.DuplicateName{ + Name: ds.Name, + Object: e.Reference(), + }) + } + + // if datastore already exists, use current reference + found = true + ds.Self = e.Reference() + } else { + // put datastore to folder and generate reference + folderPutChild(ctx, folder, ds) + } + + ds.Summary.Datastore = &ds.Self + ds.Summary.Name = ds.Name + ds.Summary.Url = info.Url + ds.Capability = types.DatastoreCapability{ + DirectoryHierarchySupported: true, + RawDiskMappingsSupported: false, + PerFileThinProvisioningSupported: true, + StorageIORMSupported: types.NewBool(true), + NativeSnapshotSupported: types.NewBool(false), + TopLevelDirectoryCreateSupported: types.NewBool(true), + SeSparseSupported: types.NewBool(true), + } + + dss.Datastore = append(dss.Datastore, ds.Self) + dss.Host.Datastore = dss.Datastore + parent := hostParent(dss.Host) + ctx.Map.AddReference(ctx, parent, &parent.Datastore, ds.Self) + + // NOTE: browser must be created after ds is appended to dss.Datastore + if !found { + browser := &HostDatastoreBrowser{} + browser.Datastore = dss.Datastore + ds.Browser = ctx.Map.Put(browser).Reference() + + ds.Summary.Capacity = int64(units.TB * 10) + ds.Summary.FreeSpace = ds.Summary.Capacity + + info.FreeSpace = ds.Summary.FreeSpace + info.MaxMemoryFileSize = ds.Summary.Capacity + info.MaxFileSize = ds.Summary.Capacity + } + + return nil +} + +func (dss *HostDatastoreSystem) CreateLocalDatastore(ctx *Context, c *types.CreateLocalDatastore) soap.HasFault { + r := &methods.CreateLocalDatastoreBody{} + + ds := &Datastore{} + ds.Name = c.Name + + ds.Info = &types.LocalDatastoreInfo{ + DatastoreInfo: types.DatastoreInfo{ + Name: c.Name, + Url: c.Path, + }, + Path: c.Path, + } + + ds.Summary.Type = string(types.HostFileSystemVolumeFileSystemTypeOTHER) + ds.Summary.MaintenanceMode = string(types.DatastoreSummaryMaintenanceModeStateNormal) + ds.Summary.Accessible = true + + if err := dss.add(ctx, ds); err != nil { + r.Fault_ = err + return r + } + + ds.Host = append(ds.Host, types.DatastoreHostMount{ + Key: dss.Host.Reference(), + MountInfo: types.HostMountInfo{ + AccessMode: string(types.HostMountModeReadWrite), + Mounted: types.NewBool(true), + Accessible: types.NewBool(true), + }, + }) + + _ = ds.RefreshDatastore(&types.RefreshDatastore{This: ds.Self}) + + r.Res = &types.CreateLocalDatastoreResponse{ + Returnval: ds.Self, + } + + return r +} + +func (dss *HostDatastoreSystem) CreateNasDatastore(ctx *Context, c *types.CreateNasDatastore) soap.HasFault { + r := &methods.CreateNasDatastoreBody{} + + // validate RemoteHost and RemotePath are specified + if c.Spec.RemoteHost == "" { + r.Fault_ = Fault( + "A specified parameter was not correct: Spec.RemoteHost", + &types.InvalidArgument{InvalidProperty: "RemoteHost"}, + ) + return r + } + if c.Spec.RemotePath == "" { + r.Fault_ = Fault( + "A specified parameter was not correct: Spec.RemotePath", + &types.InvalidArgument{InvalidProperty: "RemotePath"}, + ) + return r + } + + ds := &Datastore{} + ds.Name = path.Base(c.Spec.LocalPath) + + ds.Info = &types.NasDatastoreInfo{ + DatastoreInfo: types.DatastoreInfo{ + Url: c.Spec.LocalPath, + }, + Nas: &types.HostNasVolume{ + HostFileSystemVolume: types.HostFileSystemVolume{ + Name: c.Spec.LocalPath, + Type: c.Spec.Type, + }, + RemoteHost: c.Spec.RemoteHost, + RemotePath: c.Spec.RemotePath, + }, + } + + ds.Summary.Type = c.Spec.Type + ds.Summary.MaintenanceMode = string(types.DatastoreSummaryMaintenanceModeStateNormal) + ds.Summary.Accessible = true + + if err := dss.add(ctx, ds); err != nil { + r.Fault_ = err + return r + } + + _ = ds.RefreshDatastore(&types.RefreshDatastore{This: ds.Self}) + + r.Res = &types.CreateNasDatastoreResponse{ + Returnval: ds.Self, + } + + return r +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_firewall_system.go b/vendor/github.com/vmware/govmomi/simulator/host_firewall_system.go new file mode 100644 index 0000000000..fd596386aa --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_firewall_system.go @@ -0,0 +1,87 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostFirewallSystem struct { + mo.HostFirewallSystem +} + +func NewHostFirewallSystem(_ *mo.HostSystem) *HostFirewallSystem { + info := esx.HostFirewallInfo + + return &HostFirewallSystem{ + HostFirewallSystem: mo.HostFirewallSystem{ + FirewallInfo: &info, + }, + } +} + +func DisableRuleset(info *types.HostFirewallInfo, id string) bool { + for i := range info.Ruleset { + if info.Ruleset[i].Key == id { + info.Ruleset[i].Enabled = false + return true + } + } + + return false +} + +func (s *HostFirewallSystem) DisableRuleset(req *types.DisableRuleset) soap.HasFault { + body := &methods.DisableRulesetBody{} + + if DisableRuleset(s.HostFirewallSystem.FirewallInfo, req.Id) { + body.Res = new(types.DisableRulesetResponse) + return body + } + + body.Fault_ = Fault("", &types.NotFound{}) + + return body +} + +func EnableRuleset(info *types.HostFirewallInfo, id string) bool { + for i := range info.Ruleset { + if info.Ruleset[i].Key == id { + info.Ruleset[i].Enabled = true + return true + } + } + + return false +} + +func (s *HostFirewallSystem) EnableRuleset(req *types.EnableRuleset) soap.HasFault { + body := &methods.EnableRulesetBody{} + + if EnableRuleset(s.HostFirewallSystem.FirewallInfo, req.Id) { + body.Res = new(types.EnableRulesetResponse) + return body + } + + body.Fault_ = Fault("", &types.NotFound{}) + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_local_account_manager.go b/vendor/github.com/vmware/govmomi/simulator/host_local_account_manager.go new file mode 100644 index 0000000000..993e3fe879 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_local_account_manager.go @@ -0,0 +1,72 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +// As of vSphere API 5.1, local groups operations are deprecated, so it's not supported here. + +type HostLocalAccountManager struct { + mo.HostLocalAccountManager +} + +func (h *HostLocalAccountManager) CreateUser(req *types.CreateUser) soap.HasFault { + spec := req.User.GetHostAccountSpec() + userDirectory := Map.UserDirectory() + + found := userDirectory.search(true, false, compareFunc(spec.Id, true)) + if len(found) > 0 { + return &methods.CreateUserBody{ + Fault_: Fault("", &types.AlreadyExists{}), + } + } + + userDirectory.addUser(spec.Id) + + return &methods.CreateUserBody{ + Res: &types.CreateUserResponse{}, + } +} + +func (h *HostLocalAccountManager) RemoveUser(req *types.RemoveUser) soap.HasFault { + userDirectory := Map.UserDirectory() + + found := userDirectory.search(true, false, compareFunc(req.UserName, true)) + + if len(found) == 0 { + return &methods.RemoveUserBody{ + Fault_: Fault("", &types.UserNotFound{}), + } + } + + userDirectory.removeUser(req.UserName) + + return &methods.RemoveUserBody{ + Res: &types.RemoveUserResponse{}, + } +} + +func (h *HostLocalAccountManager) UpdateUser(req *types.UpdateUser) soap.HasFault { + return &methods.CreateUserBody{ + Res: &types.CreateUserResponse{}, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_network_system.go b/vendor/github.com/vmware/govmomi/simulator/host_network_system.go new file mode 100644 index 0000000000..351604f82b --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_network_system.go @@ -0,0 +1,212 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostNetworkSystem struct { + mo.HostNetworkSystem + + Host *mo.HostSystem + + types.QueryNetworkHintResponse +} + +func NewHostNetworkSystem(host *mo.HostSystem) *HostNetworkSystem { + return &HostNetworkSystem{ + Host: host, + HostNetworkSystem: mo.HostNetworkSystem{ + NetworkInfo: &types.HostNetworkInfo{ + Vswitch: []types.HostVirtualSwitch{ + { + Name: "vSwitch0", + Portgroup: []string{"VM Network"}, + }, + }, + Portgroup: host.Config.Network.Portgroup, + }, + }, + } +} + +func (s *HostNetworkSystem) init(r *Registry) { + for _, obj := range r.objects { + if h, ok := obj.(*HostSystem); ok { + if h.ConfigManager.NetworkSystem.Value == s.Self.Value { + s.Host = &h.HostSystem + } + } + } +} + +func (s *HostNetworkSystem) folder() *Folder { + f := Map.getEntityDatacenter(s.Host).NetworkFolder + return Map.Get(f).(*Folder) +} + +func (s *HostNetworkSystem) AddVirtualSwitch(c *types.AddVirtualSwitch) soap.HasFault { + r := &methods.AddVirtualSwitchBody{} + + for _, vswitch := range s.NetworkInfo.Vswitch { + if vswitch.Name == c.VswitchName { + r.Fault_ = Fault("", &types.AlreadyExists{Name: c.VswitchName}) + return r + } + } + + s.NetworkInfo.Vswitch = append(s.NetworkInfo.Vswitch, types.HostVirtualSwitch{ + Name: c.VswitchName, + }) + + r.Res = &types.AddVirtualSwitchResponse{} + + return r +} + +func (s *HostNetworkSystem) RemoveVirtualSwitch(c *types.RemoveVirtualSwitch) soap.HasFault { + r := &methods.RemoveVirtualSwitchBody{} + + vs := s.NetworkInfo.Vswitch + + for i, v := range vs { + if v.Name == c.VswitchName { + s.NetworkInfo.Vswitch = append(vs[:i], vs[i+1:]...) + r.Res = &types.RemoveVirtualSwitchResponse{} + return r + } + } + + r.Fault_ = Fault("", &types.NotFound{}) + + return r +} + +func (s *HostNetworkSystem) AddPortGroup(ctx *Context, c *types.AddPortGroup) soap.HasFault { + var vswitch *types.HostVirtualSwitch + + r := &methods.AddPortGroupBody{} + + if c.Portgrp.Name == "" { + r.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "name"}) + return r + } + + for i := range s.NetworkInfo.Vswitch { + if s.NetworkInfo.Vswitch[i].Name == c.Portgrp.VswitchName { + vswitch = &s.NetworkInfo.Vswitch[i] + break + } + } + + if vswitch == nil { + r.Fault_ = Fault("", &types.NotFound{}) + return r + } + + network := &mo.Network{} + network.Name = c.Portgrp.Name + network.Entity().Name = network.Name + + folder := s.folder() + + if obj := ctx.Map.FindByName(c.Portgrp.Name, folder.ChildEntity); obj != nil { + r.Fault_ = Fault("", &types.DuplicateName{ + Name: c.Portgrp.Name, + Object: obj.Reference(), + }) + + return r + } + + folderPutChild(ctx, &folder.Folder, network) + + vswitch.Portgroup = append(vswitch.Portgroup, c.Portgrp.Name) + + s.NetworkInfo.Portgroup = append(s.NetworkInfo.Portgroup, types.HostPortGroup{ + Key: "key-vim.host.PortGroup-" + c.Portgrp.Name, + Port: nil, + Spec: c.Portgrp, + }) + + r.Res = &types.AddPortGroupResponse{} + + return r +} + +func (s *HostNetworkSystem) RemovePortGroup(ctx *Context, c *types.RemovePortGroup) soap.HasFault { + var vswitch *types.HostVirtualSwitch + + r := &methods.RemovePortGroupBody{} + + for i, v := range s.NetworkInfo.Vswitch { + for j, pg := range v.Portgroup { + if pg == c.PgName { + vswitch = &s.NetworkInfo.Vswitch[i] + vswitch.Portgroup = append(vswitch.Portgroup[:j], vswitch.Portgroup[j+1:]...) + } + } + } + + if vswitch == nil { + r.Fault_ = Fault("", &types.NotFound{}) + return r + } + + folder := s.folder() + e := ctx.Map.FindByName(c.PgName, folder.ChildEntity) + folderRemoveChild(ctx, &folder.Folder, e.Reference()) + + for i, pg := range s.NetworkInfo.Portgroup { + if pg.Spec.Name == c.PgName { + var portgroup = s.NetworkInfo.Portgroup + s.NetworkInfo.Portgroup = append(portgroup[:i], portgroup[i+1:]...) + } + } + + r.Res = &types.RemovePortGroupResponse{} + + return r +} + +func (s *HostNetworkSystem) UpdateNetworkConfig(req *types.UpdateNetworkConfig) soap.HasFault { + s.NetworkConfig = &req.Config + + return &methods.UpdateNetworkConfigBody{ + Res: &types.UpdateNetworkConfigResponse{ + Returnval: types.HostNetworkConfigResult{}, + }, + } +} + +func (s *HostNetworkSystem) QueryNetworkHint(req *types.QueryNetworkHint) soap.HasFault { + if s.Host.Runtime.ConnectionState != types.HostSystemConnectionStateConnected { + return &methods.QueryNetworkHintBody{ + Fault_: Fault("", &types.HostNotConnected{}), + } + } + + return &methods.QueryNetworkHintBody{ + Res: &types.QueryNetworkHintResponse{ + Returnval: s.QueryNetworkHintResponse.Returnval, + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_storage_system.go b/vendor/github.com/vmware/govmomi/simulator/host_storage_system.go new file mode 100644 index 0000000000..da2fd528c2 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_storage_system.go @@ -0,0 +1,134 @@ +/* +Copyright (c) 2020 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostStorageSystem struct { + mo.HostStorageSystem + + Host *mo.HostSystem + HBA []types.BaseHostHostBusAdapter +} + +func NewHostStorageSystem(h *mo.HostSystem) *HostStorageSystem { + s := &HostStorageSystem{Host: h} + + s.StorageDeviceInfo = &esx.HostStorageDeviceInfo + + s.HBA = fibreChannelHBA + + return s +} + +// RescanAllHba swaps HostStorageSystem.HBA and StorageDeviceInfo.HostBusAdapter. +// This allows testing HBA with and without Fibre Channel data. +func (s *HostStorageSystem) RescanAllHba(ctx *Context, _ *types.RescanAllHba) soap.HasFault { + hba := s.StorageDeviceInfo.HostBusAdapter + s.StorageDeviceInfo.HostBusAdapter = s.HBA + s.HBA = hba + + ctx.WithLock(s.Host, func() { + s.Host.Config.StorageDevice.HostBusAdapter = s.StorageDeviceInfo.HostBusAdapter + }) + + return &methods.RescanAllHbaBody{ + Res: new(types.RescanAllHbaResponse), + } +} + +func (s *HostStorageSystem) RescanVmfs(*Context, *types.RescanVmfs) soap.HasFault { + return &methods.RescanVmfsBody{Res: new(types.RescanVmfsResponse)} +} + +func (s *HostStorageSystem) RefreshStorageSystem(*Context, *types.RefreshStorageSystem) soap.HasFault { + return &methods.RefreshStorageSystemBody{Res: new(types.RefreshStorageSystemResponse)} +} + +// HBA with FibreChannel data, see RescanAllHba() +var fibreChannelHBA = []types.BaseHostHostBusAdapter{ + &types.HostBlockHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.BlockHba-vmhba0", + Device: "vmhba0", + Bus: 0, + Status: "unknown", + Model: "Lewisburg SATA AHCI Controller", + Driver: "vmw_ahci", + Pci: "0000:00:11.5", + }, + }, + &types.HostBlockHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.BlockHba-vmhba1", + Device: "vmhba1", + Bus: 0, + Status: "unknown", + Model: "Lewisburg SATA AHCI Controller", + Driver: "vmw_ahci", + Pci: "0000:00:17.0", + }, + }, + &types.HostFibreChannelHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.FibreChannelHba-vmhba2", + Device: "vmhba2", + Bus: 59, + Status: "online", + Model: "Emulex LightPulse LPe32000 PCIe Fibre Channel Adapter", + Driver: "lpfc", + Pci: "0000:3b:00.0", + }, + PortWorldWideName: 1152922127287604726, + NodeWorldWideName: 2305843631894451702, + PortType: "unknown", + Speed: 16, + }, + &types.HostFibreChannelHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.FibreChannelHba-vmhba3", + Device: "vmhba3", + Bus: 95, + Status: "online", + Model: "Emulex LightPulse LPe32000 PCIe Fibre Channel Adapter", + Driver: "lpfc", + Pci: "0000:5f:00.0", + }, + PortWorldWideName: 1152922127287604554, + NodeWorldWideName: 2305843631894451530, + PortType: "unknown", + Speed: 16, + }, + &types.HostSerialAttachedHba{ + HostHostBusAdapter: types.HostHostBusAdapter{ + Key: "key-vim.host.SerialAttachedHba-vmhba4", + Device: "vmhba4", + Bus: 24, + Status: "unknown", + Model: "PERC H330 Adapter", + Driver: "lsi_mr3", + Pci: "0000:18:00.0", + }, + NodeWorldWideName: "5d0946606e78ac00", + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_system.go b/vendor/github.com/vmware/govmomi/simulator/host_system.go new file mode 100644 index 0000000000..2640e18edf --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_system.go @@ -0,0 +1,602 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "net" + "os" + "sync" + "time" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var ( + hostPortUnique = os.Getenv("VCSIM_HOST_PORT_UNIQUE") == "true" + + globalLock sync.Mutex + // globalHostCount is used to construct unique hostnames. Should be consumed under globalLock. + globalHostCount = 0 +) + +type HostSystem struct { + mo.HostSystem + + sh *simHost + + types.QueryTpmAttestationReportResponse +} + +func asHostSystemMO(obj mo.Reference) (*mo.HostSystem, bool) { + h, ok := getManagedObject(obj).Addr().Interface().(*mo.HostSystem) + return h, ok +} + +func NewHostSystem(host mo.HostSystem) *HostSystem { + if hostPortUnique { // configure unique port for each host + port := &esx.HostSystem.Summary.Config.Port + *port++ + host.Summary.Config.Port = *port + } + + now := time.Now() + + hs := &HostSystem{ + HostSystem: host, + } + + hs.Name = hs.Summary.Config.Name + hs.Summary.Runtime = &hs.Runtime + hs.Summary.Runtime.BootTime = &now + + // shallow copy Summary.Hardware, as each host will be assigned its own .Uuid + hardware := *host.Summary.Hardware + hs.Summary.Hardware = &hardware + + if hs.Hardware == nil { + // shallow copy Hardware, as each host will be assigned its own .Uuid + info := *esx.HostHardwareInfo + hs.Hardware = &info + } + if hs.Capability == nil { + capability := *esx.HostCapability + hs.Capability = &capability + } + + cfg := new(types.HostConfigInfo) + deepCopy(hs.Config, cfg) + hs.Config = cfg + + // copy over the reference advanced options so each host can have it's own, allowing hosts to be configured for + // container backing individually + deepCopy(esx.AdvancedOptions, &cfg.Option) + + // add a supported option to the AdvancedOption manager + simOption := types.OptionDef{ElementDescription: types.ElementDescription{Key: advOptContainerBackingImage}} + // TODO: how do we enter patterns here? Or should we stick to a list in the value? + // patterns become necessary if we want to enforce correctness on options for RUN.underlay. or allow RUN.port.xxx + hs.Config.OptionDef = append(hs.Config.OptionDef, simOption) + + config := []struct { + ref **types.ManagedObjectReference + obj mo.Reference + }{ + {&hs.ConfigManager.DatastoreSystem, &HostDatastoreSystem{Host: &hs.HostSystem}}, + {&hs.ConfigManager.NetworkSystem, NewHostNetworkSystem(&hs.HostSystem)}, + {&hs.ConfigManager.VirtualNicManager, NewHostVirtualNicManager(&hs.HostSystem)}, + {&hs.ConfigManager.AdvancedOption, NewOptionManager(nil, nil, &hs.Config.Option)}, + {&hs.ConfigManager.FirewallSystem, NewHostFirewallSystem(&hs.HostSystem)}, + {&hs.ConfigManager.StorageSystem, NewHostStorageSystem(&hs.HostSystem)}, + {&hs.ConfigManager.CertificateManager, NewHostCertificateManager(&hs.HostSystem)}, + } + + for _, c := range config { + ref := Map.Put(c.obj).Reference() + + *c.ref = &ref + } + + return hs +} + +func (h *HostSystem) configure(ctx *Context, spec types.HostConnectSpec, connected bool) { + h.Runtime.ConnectionState = types.HostSystemConnectionStateDisconnected + if connected { + h.Runtime.ConnectionState = types.HostSystemConnectionStateConnected + } + + // lets us construct non-conflicting hostname automatically if omitted + // does not use the unique port instead to avoid constraints on port, such as >1024 + + globalLock.Lock() + instanceID := globalHostCount + globalHostCount++ + globalLock.Unlock() + + if spec.HostName == "" { + spec.HostName = fmt.Sprintf("esx-%d", instanceID) + } else if net.ParseIP(spec.HostName) != nil { + h.Config.Network.Vnic[0].Spec.Ip.IpAddress = spec.HostName + } + + h.Summary.Config.Name = spec.HostName + h.Name = h.Summary.Config.Name + id := newUUID(h.Name) + h.Summary.Hardware.Uuid = id + h.Hardware.SystemInfo.Uuid = id + + var err error + h.sh, err = createSimulationHost(ctx, h) + if err != nil { + panic("failed to create simulation host and no path to return error: " + err.Error()) + } +} + +// configureContainerBacking sets up _this_ host for simulation using a container backing. +// Args: +// +// image - the container image with which to simulate the host +// mounts - array of mount info that should be translated into /vmfs/volumes/... mounts backed by container volumes +// networks - names of bridges to use for underlays. Will create a pNIC for each. The first will be treated as the management network. +// +// Restrictions adopted from createSimulationHost: +// * no mock of VLAN connectivity +// * only a single vmknic, used for "the management IP" +// * pNIC connectivity does not directly impact VMs/vmks using it as uplink +// +// The pnics will be named using standard pattern, ie. vmnic0, vmnic1, ... +// This will sanity check the NetConfig for "management" nicType to ensure that it maps through PortGroup->vSwitch->pNIC to vmnic0. +func (h *HostSystem) configureContainerBacking(ctx *Context, image string, mounts []types.HostFileSystemMountInfo, networks ...string) error { + option := &types.OptionValue{ + Key: advOptContainerBackingImage, + Value: image, + } + + advOpts := ctx.Map.Get(h.ConfigManager.AdvancedOption.Reference()).(*OptionManager) + fault := advOpts.UpdateOptions(&types.UpdateOptions{ChangedValue: []types.BaseOptionValue{option}}).Fault() + if fault != nil { + panic(fault) + } + + h.Config.FileSystemVolume = nil + if mounts != nil { + h.Config.FileSystemVolume = &types.HostFileSystemVolumeInfo{ + VolumeTypeList: []string{"VMFS", "OTHER"}, + MountInfo: mounts, + } + } + + // force at least a management network + if len(networks) == 0 { + networks = []string{defaultUnderlayBridgeName} + } + + // purge pNICs from the template - it makes no sense to keep them for a sim host + h.Config.Network.Pnic = make([]types.PhysicalNic, len(networks)) + + // purge any IPs and MACs associated with existing NetConfigs for the host + for cfgIdx := range h.Config.VirtualNicManagerInfo.NetConfig { + config := &h.Config.VirtualNicManagerInfo.NetConfig[cfgIdx] + for candidateIdx := range config.CandidateVnic { + candidate := &config.CandidateVnic[candidateIdx] + candidate.Spec.Ip.IpAddress = "0.0.0.0" + candidate.Spec.Ip.SubnetMask = "0.0.0.0" + candidate.Spec.Mac = "00:00:00:00:00:00" + } + } + + // The presence of a pNIC is used to indicate connectivity to a specific underlay. We construct an empty pNIC entry and specify the underly via + // host.ConfigManager.AdvancedOptions. The pNIC will be populated with the MAC (accurate) and IP (divergence - we need to stash it somewhere) for the veth. + // We create a NetConfig "management" entry for the first pNIC - this will be populated with the IP of the "host" container. + + // create a pNIC for each underlay + for i, net := range networks { + name := fmt.Sprintf("vmnic%d", i) + + // we don't have a natural field for annotating which pNIC is connected to which network, so stash it in an adv option. + option := &types.OptionValue{ + Key: advOptPrefixPnicToUnderlayPrefix + name, + Value: net, + } + fault = advOpts.UpdateOptions(&types.UpdateOptions{ChangedValue: []types.BaseOptionValue{option}}).Fault() + if fault != nil { + panic(fault) + } + + h.Config.Network.Pnic[i] = types.PhysicalNic{ + Key: "key-vim.host.PhysicalNic-" + name, + Device: name, + Pci: fmt.Sprintf("0000:%2d:00.0", i+1), + Driver: "vcsim-bridge", + DriverVersion: "1.2.10.0", + FirmwareVersion: "1.57, 0x80000185", + LinkSpeed: &types.PhysicalNicLinkInfo{ + SpeedMb: 10000, + Duplex: true, + }, + ValidLinkSpecification: []types.PhysicalNicLinkInfo{ + { + SpeedMb: 10000, + Duplex: true, + }, + }, + Spec: types.PhysicalNicSpec{ + Ip: &types.HostIpConfig{}, + LinkSpeed: (*types.PhysicalNicLinkInfo)(nil), + EnableEnhancedNetworkingStack: types.NewBool(false), + EnsInterruptEnabled: types.NewBool(false), + }, + WakeOnLanSupported: false, + Mac: "00:00:00:00:00:00", + FcoeConfiguration: &types.FcoeConfig{ + PriorityClass: 3, + SourceMac: "00:00:00:00:00:00", + VlanRange: []types.FcoeConfigVlanRange{ + {}, + }, + Capabilities: types.FcoeConfigFcoeCapabilities{}, + FcoeActive: false, + }, + VmDirectPathGen2Supported: types.NewBool(false), + VmDirectPathGen2SupportedMode: "", + ResourcePoolSchedulerAllowed: types.NewBool(false), + ResourcePoolSchedulerDisallowedReason: nil, + AutoNegotiateSupported: types.NewBool(true), + EnhancedNetworkingStackSupported: types.NewBool(false), + EnsInterruptSupported: types.NewBool(false), + RdmaDevice: "", + DpuId: "", + } + } + + // sanity check that everything's hung together sufficiently well + details, err := h.getNetConfigInterface(ctx, "management") + if err != nil { + return err + } + + if details.uplink == nil || details.uplink.Device != "vmnic0" { + return fmt.Errorf("Config provided for host %s does not result in a consistent 'management' NetConfig that's bound to 'vmnic0'", h.Name) + } + + return nil +} + +// netConfigDetails is used to packaged up all the related network entities associated with a NetConfig binding +type netConfigDetails struct { + nicType string + netconfig *types.VirtualNicManagerNetConfig + vmk *types.HostVirtualNic + netstack *types.HostNetStackInstance + portgroup *types.HostPortGroup + vswitch *types.HostVirtualSwitch + uplink *types.PhysicalNic +} + +// getNetConfigInterface returns the set of constructs active for a given nicType (eg. "management", "vmotion") +// This method is provided because the Config structure held by HostSystem is heavily interconnected but serialized and not cross-linked with pointers. +// As such there's a _lot_ of cross-referencing that needs to be done to navigate. +// The pNIC returned is the uplink associated with the vSwitch for the netconfig +func (h *HostSystem) getNetConfigInterface(ctx *Context, nicType string) (*netConfigDetails, error) { + details := &netConfigDetails{ + nicType: nicType, + } + + for i := range h.Config.VirtualNicManagerInfo.NetConfig { + if h.Config.VirtualNicManagerInfo.NetConfig[i].NicType == nicType { + details.netconfig = &h.Config.VirtualNicManagerInfo.NetConfig[i] + break + } + } + if details.netconfig == nil { + return nil, fmt.Errorf("no matching NetConfig for NicType=%s", nicType) + } + + if details.netconfig.SelectedVnic == nil { + return details, nil + } + + vnicKey := details.netconfig.SelectedVnic[0] + for i := range details.netconfig.CandidateVnic { + if details.netconfig.CandidateVnic[i].Key == vnicKey { + details.vmk = &details.netconfig.CandidateVnic[i] + break + } + } + if details.vmk == nil { + panic(fmt.Sprintf("NetConfig for host %s references non-existant vNIC key %s for %s nicType", h.Name, vnicKey, nicType)) + } + + portgroupName := details.vmk.Portgroup + netstackKey := details.vmk.Spec.NetStackInstanceKey + + for i := range h.Config.Network.NetStackInstance { + if h.Config.Network.NetStackInstance[i].Key == netstackKey { + details.netstack = &h.Config.Network.NetStackInstance[i] + break + } + } + if details.netstack == nil { + panic(fmt.Sprintf("NetConfig for host %s references non-existant NetStack key %s for %s nicType", h.Name, netstackKey, nicType)) + } + + for i := range h.Config.Network.Portgroup { + // TODO: confirm correctness of this - seems weird it references the Spec.Name instead of the key like everything else. + if h.Config.Network.Portgroup[i].Spec.Name == portgroupName { + details.portgroup = &h.Config.Network.Portgroup[i] + break + } + } + if details.portgroup == nil { + panic(fmt.Sprintf("NetConfig for host %s references non-existant PortGroup name %s for %s nicType", h.Name, portgroupName, nicType)) + } + + vswitchKey := details.portgroup.Vswitch + for i := range h.Config.Network.Vswitch { + if h.Config.Network.Vswitch[i].Key == vswitchKey { + details.vswitch = &h.Config.Network.Vswitch[i] + break + } + } + if details.vswitch == nil { + panic(fmt.Sprintf("NetConfig for host %s references non-existant vSwitch key %s for %s nicType", h.Name, vswitchKey, nicType)) + } + + if len(details.vswitch.Pnic) != 1 { + // to change this, look at the Active NIC in the NicTeamingPolicy, but for now not worth it + panic(fmt.Sprintf("vSwitch %s for host %s has multiple pNICs associated which is not supported.", vswitchKey, h.Name)) + } + + pnicKey := details.vswitch.Pnic[0] + for i := range h.Config.Network.Pnic { + if h.Config.Network.Pnic[i].Key == pnicKey { + details.uplink = &h.Config.Network.Pnic[i] + break + } + } + if details.uplink == nil { + panic(fmt.Sprintf("NetConfig for host %s references non-existant pNIC key %s for %s nicType", h.Name, pnicKey, nicType)) + } + + return details, nil +} + +func (h *HostSystem) event() types.HostEvent { + return types.HostEvent{ + Event: types.Event{ + Datacenter: datacenterEventArgument(h), + ComputeResource: h.eventArgumentParent(), + Host: h.eventArgument(), + }, + } +} + +func (h *HostSystem) eventArgument() *types.HostEventArgument { + return &types.HostEventArgument{ + Host: h.Self, + EntityEventArgument: types.EntityEventArgument{Name: h.Name}, + } +} + +func (h *HostSystem) eventArgumentParent() *types.ComputeResourceEventArgument { + parent := hostParent(&h.HostSystem) + + return &types.ComputeResourceEventArgument{ + ComputeResource: parent.Self, + EntityEventArgument: types.EntityEventArgument{Name: parent.Name}, + } +} + +func hostParent(host *mo.HostSystem) *mo.ComputeResource { + switch parent := Map.Get(*host.Parent).(type) { + case *mo.ComputeResource: + return parent + case *ClusterComputeResource: + return &parent.ComputeResource + default: + return nil + } +} + +func addComputeResource(s *types.ComputeResourceSummary, h *HostSystem) { + s.TotalCpu += h.Summary.Hardware.CpuMhz + s.TotalMemory += h.Summary.Hardware.MemorySize + s.NumCpuCores += h.Summary.Hardware.NumCpuCores + s.NumCpuThreads += h.Summary.Hardware.NumCpuThreads + s.EffectiveCpu += h.Summary.Hardware.CpuMhz + s.EffectiveMemory += h.Summary.Hardware.MemorySize + s.NumHosts++ + s.NumEffectiveHosts++ + s.OverallStatus = types.ManagedEntityStatusGreen +} + +// CreateDefaultESX creates a standalone ESX +// Adds objects of type: Datacenter, Network, ComputeResource, ResourcePool and HostSystem +func CreateDefaultESX(ctx *Context, f *Folder) { + dc := NewDatacenter(ctx, &f.Folder) + + host := NewHostSystem(esx.HostSystem) + + summary := new(types.ComputeResourceSummary) + addComputeResource(summary, host) + + cr := &mo.ComputeResource{ + Summary: summary, + Network: esx.Datacenter.Network, + } + cr.Self = *host.Parent + cr.Name = host.Name + cr.Host = append(cr.Host, host.Reference()) + host.Network = cr.Network + ctx.Map.PutEntity(cr, host) + cr.EnvironmentBrowser = newEnvironmentBrowser(ctx, host.Reference()) + + pool := NewResourcePool() + cr.ResourcePool = &pool.Self + ctx.Map.PutEntity(cr, pool) + pool.Owner = cr.Self + + folderPutChild(ctx, &ctx.Map.Get(dc.HostFolder).(*Folder).Folder, cr) +} + +// CreateStandaloneHost uses esx.HostSystem as a template, applying the given spec +// and creating the ComputeResource parent and ResourcePool sibling. +func CreateStandaloneHost(ctx *Context, f *Folder, spec types.HostConnectSpec) (*HostSystem, types.BaseMethodFault) { + if spec.HostName == "" { + return nil, &types.NoHost{} + } + + template := esx.HostSystem + network := ctx.Map.getEntityDatacenter(f).defaultNetwork() + + if p := ctx.Map.FindByName(spec.UserName, f.ChildEntity); p != nil { + cr := p.(*mo.ComputeResource) + h := ctx.Map.Get(cr.Host[0]) + // "clone" an existing host from the inventory + template = h.(*HostSystem).HostSystem + template.Vm = nil + network = cr.Network + } + + pool := NewResourcePool() + host := NewHostSystem(template) + host.configure(ctx, spec, false) + + summary := new(types.ComputeResourceSummary) + addComputeResource(summary, host) + + cr := &mo.ComputeResource{ + ConfigurationEx: &types.ComputeResourceConfigInfo{ + VmSwapPlacement: string(types.VirtualMachineConfigInfoSwapPlacementTypeVmDirectory), + }, + Summary: summary, + } + + ctx.Map.PutEntity(cr, ctx.Map.NewEntity(host)) + cr.EnvironmentBrowser = newEnvironmentBrowser(ctx, host.Reference()) + + host.Summary.Host = &host.Self + host.Config.Host = host.Self + + ctx.Map.PutEntity(cr, ctx.Map.NewEntity(pool)) + + cr.Name = host.Name + cr.Network = network + cr.Host = append(cr.Host, host.Reference()) + cr.ResourcePool = &pool.Self + + folderPutChild(ctx, &f.Folder, cr) + pool.Owner = cr.Self + host.Network = cr.Network + + return host, nil +} + +func (h *HostSystem) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + task := CreateTask(h, "destroy", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if len(h.Vm) > 0 { + return nil, &types.ResourceInUse{} + } + + ctx.postEvent(&types.HostRemovedEvent{HostEvent: h.event()}) + + f := ctx.Map.getEntityParent(h, "Folder").(*Folder) + folderRemoveChild(ctx, &f.Folder, h.Reference()) + err := h.sh.remove(ctx) + + if err != nil { + return nil, &types.RuntimeFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{Reason: err.Error()}, + LocalizedMessage: err.Error()}}} + } + + // TODO: should there be events on lifecycle operations as with VMs? + + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (h *HostSystem) EnterMaintenanceModeTask(ctx *Context, spec *types.EnterMaintenanceMode_Task) soap.HasFault { + task := CreateTask(h, "enterMaintenanceMode", func(t *Task) (types.AnyType, types.BaseMethodFault) { + h.Runtime.InMaintenanceMode = true + return nil, nil + }) + + return &methods.EnterMaintenanceMode_TaskBody{ + Res: &types.EnterMaintenanceMode_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (h *HostSystem) ExitMaintenanceModeTask(ctx *Context, spec *types.ExitMaintenanceMode_Task) soap.HasFault { + task := CreateTask(h, "exitMaintenanceMode", func(t *Task) (types.AnyType, types.BaseMethodFault) { + h.Runtime.InMaintenanceMode = false + return nil, nil + }) + + return &methods.ExitMaintenanceMode_TaskBody{ + Res: &types.ExitMaintenanceMode_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (h *HostSystem) DisconnectHostTask(ctx *Context, spec *types.DisconnectHost_Task) soap.HasFault { + task := CreateTask(h, "disconnectHost", func(t *Task) (types.AnyType, types.BaseMethodFault) { + h.Runtime.ConnectionState = types.HostSystemConnectionStateDisconnected + return nil, nil + }) + + return &methods.DisconnectHost_TaskBody{ + Res: &types.DisconnectHost_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (h *HostSystem) ReconnectHostTask(ctx *Context, spec *types.ReconnectHost_Task) soap.HasFault { + task := CreateTask(h, "reconnectHost", func(t *Task) (types.AnyType, types.BaseMethodFault) { + h.Runtime.ConnectionState = types.HostSystemConnectionStateConnected + return nil, nil + }) + + return &methods.ReconnectHost_TaskBody{ + Res: &types.ReconnectHost_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (s *HostSystem) QueryTpmAttestationReport(req *types.QueryTpmAttestationReport) soap.HasFault { + return &methods.QueryTpmAttestationReportBody{ + Res: &s.QueryTpmAttestationReportResponse, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/host_vnic_manager.go b/vendor/github.com/vmware/govmomi/simulator/host_vnic_manager.go new file mode 100644 index 0000000000..069152183d --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/host_vnic_manager.go @@ -0,0 +1,59 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type HostVirtualNicManager struct { + mo.HostVirtualNicManager + + Host *mo.HostSystem +} + +func NewHostVirtualNicManager(host *mo.HostSystem) *HostVirtualNicManager { + return &HostVirtualNicManager{ + Host: host, + HostVirtualNicManager: mo.HostVirtualNicManager{ + Info: types.HostVirtualNicManagerInfo{ + NetConfig: esx.VirtualNicManagerNetConfig, + }, + }, + } +} + +func (m *HostVirtualNicManager) QueryNetConfig(req *types.QueryNetConfig) soap.HasFault { + body := new(methods.QueryNetConfigBody) + + for _, c := range m.Info.NetConfig { + if c.NicType == req.NicType { + body.Res = &types.QueryNetConfigResponse{ + Returnval: &c, + } + return body + } + } + + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: req.NicType}) + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/http_nfc_lease.go b/vendor/github.com/vmware/govmomi/simulator/http_nfc_lease.go new file mode 100644 index 0000000000..3b67a49819 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/http_nfc_lease.go @@ -0,0 +1,198 @@ +/* +Copyright (c) 2019-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "crypto/sha1" + "encoding/hex" + "fmt" + "hash" + "io" + "log" + "net/http" + "os" + "strings" + "sync" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type metadata struct { + sha1 []byte + size int64 +} + +type HttpNfcLease struct { + mo.HttpNfcLease + files map[string]string + metadata map[string]metadata +} + +var ( + nfcLease sync.Map // HTTP access to NFC leases are token based and do not require Session auth + nfcPrefix = "/nfc/" +) + +// ServeNFC handles NFC file upload/download +func ServeNFC(w http.ResponseWriter, r *http.Request) { + p := strings.Split(r.URL.Path, "/") + id, name := p[len(p)-2], p[len(p)-1] + ref := types.ManagedObjectReference{Type: "HttpNfcLease", Value: id} + l, ok := nfcLease.Load(ref) + if !ok { + log.Printf("invalid NFC lease: %s", id) + http.NotFound(w, r) + return + } + lease := l.(*HttpNfcLease) + file, ok := lease.files[name] + if !ok { + log.Printf("invalid NFC device id: %s", name) + http.NotFound(w, r) + return + } + + status := http.StatusOK + var dst hash.Hash + var src io.ReadCloser + + switch r.Method { + case http.MethodPut, http.MethodPost: + dst = sha1.New() + src = r.Body + case http.MethodGet: + f, err := os.Open(file) + if err != nil { + http.NotFound(w, r) + return + } + src = f + default: + status = http.StatusMethodNotAllowed + } + + n, err := io.Copy(dst, src) + _ = src.Close() + if dst != nil { + lease.metadata[name] = metadata{ + sha1: dst.Sum(nil), + size: n, + } + } + + msg := fmt.Sprintf("transferred %d bytes", n) + if err != nil { + status = http.StatusInternalServerError + msg = err.Error() + } + tracef("nfc %s %s: %s", r.Method, file, msg) + w.WriteHeader(status) +} + +func (l *HttpNfcLease) error(ctx *Context, err *types.LocalizedMethodFault) { + ctx.WithLock(l, func() { + ctx.Update(l, []types.PropertyChange{ + {Name: "state", Val: types.HttpNfcLeaseStateError}, + {Name: "error", Val: err}, + }) + }) +} + +func (l *HttpNfcLease) ready(ctx *Context, entity types.ManagedObjectReference, urls []types.HttpNfcLeaseDeviceUrl) { + info := &types.HttpNfcLeaseInfo{ + Lease: l.Self, + Entity: entity, + DeviceUrl: urls, + LeaseTimeout: 300, + } + + ctx.WithLock(l, func() { + ctx.Update(l, []types.PropertyChange{ + {Name: "state", Val: types.HttpNfcLeaseStateReady}, + {Name: "info", Val: info}, + }) + }) +} + +func newHttpNfcLease(ctx *Context) *HttpNfcLease { + lease := &HttpNfcLease{ + HttpNfcLease: mo.HttpNfcLease{ + State: types.HttpNfcLeaseStateInitializing, + }, + files: make(map[string]string), + metadata: make(map[string]metadata), + } + + ctx.Session.Put(lease) + nfcLease.Store(lease.Reference(), lease) + + return lease +} + +func (l *HttpNfcLease) HttpNfcLeaseComplete(ctx *Context, req *types.HttpNfcLeaseComplete) soap.HasFault { + ctx.Session.Remove(ctx, req.This) + nfcLease.Delete(req.This) + + return &methods.HttpNfcLeaseCompleteBody{ + Res: new(types.HttpNfcLeaseCompleteResponse), + } +} + +func (l *HttpNfcLease) HttpNfcLeaseAbort(ctx *Context, req *types.HttpNfcLeaseAbort) soap.HasFault { + ctx.Session.Remove(ctx, req.This) + nfcLease.Delete(req.This) + + return &methods.HttpNfcLeaseAbortBody{ + Res: new(types.HttpNfcLeaseAbortResponse), + } +} + +func (l *HttpNfcLease) HttpNfcLeaseProgress(ctx *Context, req *types.HttpNfcLeaseProgress) soap.HasFault { + l.TransferProgress = req.Percent + + return &methods.HttpNfcLeaseProgressBody{ + Res: new(types.HttpNfcLeaseProgressResponse), + } +} + +func (l *HttpNfcLease) getDeviceKey(name string) string { + for _, devUrl := range l.Info.DeviceUrl { + if name == devUrl.TargetId { + return devUrl.Key + } + } + return "unknown" +} + +func (l *HttpNfcLease) HttpNfcLeaseGetManifest(ctx *Context, req *types.HttpNfcLeaseGetManifest) soap.HasFault { + entries := []types.HttpNfcLeaseManifestEntry{} + for name, md := range l.metadata { + entries = append(entries, types.HttpNfcLeaseManifestEntry{ + Key: l.getDeviceKey(name), + Sha1: hex.EncodeToString(md.sha1), + Size: md.size, + }) + } + return &methods.HttpNfcLeaseGetManifestBody{ + Res: &types.HttpNfcLeaseGetManifestResponse{ + Returnval: entries, + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/internal/object_lock.go b/vendor/github.com/vmware/govmomi/simulator/internal/object_lock.go new file mode 100644 index 0000000000..fdc6c9bd9b --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/internal/object_lock.go @@ -0,0 +1,102 @@ +/* +Copyright (c) 2014-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 internal + +import ( + "fmt" + "sync" +) + +// SharedLockingContext is used to identify when locks can be shared. In +// practice, simulator code uses the simulator.Context for a request, but in +// principle this could be anything. +type SharedLockingContext interface{} + +// ObjectLock implements a basic "reference-counted" mutex, where a single +// SharedLockingContext can "share" the lock across code paths or child tasks. +type ObjectLock struct { + lock sync.Locker + + stateLock sync.Mutex + heldBy SharedLockingContext + count int64 +} + +// NewObjectLock creates a new ObjectLock. Pass new(sync.Mutex) if you don't +// have a custom sync.Locker. +func NewObjectLock(lock sync.Locker) *ObjectLock { + return &ObjectLock{ + lock: lock, + } +} + +// try returns true if the lock has been acquired; false otherwise +func (l *ObjectLock) try(onBehalfOf SharedLockingContext) bool { + l.stateLock.Lock() + defer l.stateLock.Unlock() + + if l.heldBy == onBehalfOf { + l.count = l.count + 1 + return true + } + + if l.heldBy == nil { + // we expect no contention for this lock (unless the object has a custom Locker) + l.lock.Lock() + l.count = 1 + l.heldBy = onBehalfOf + return true + } + + return false +} + +// wait returns when there's a chance that try() might succeed. +// It is intended to be better than busy-waiting or sleeping. +func (l *ObjectLock) wait() { + l.lock.Lock() + l.lock.Unlock() +} + +// Release decrements the reference count. The caller should pass their +// context, which is used to sanity check that the Unlock() call is valid. If +// this is the last reference to the lock for this SharedLockingContext, the lock +// is Unlocked and can be acquired by another SharedLockingContext. +func (l *ObjectLock) Release(onBehalfOf SharedLockingContext) { + l.stateLock.Lock() + defer l.stateLock.Unlock() + if l.heldBy != onBehalfOf { + panic(fmt.Sprintf("Attempt to unlock on behalf of %#v, but is held by %#v", onBehalfOf, l.heldBy)) + } + l.count = l.count - 1 + if l.count == 0 { + l.heldBy = nil + l.lock.Unlock() + } +} + +// Acquire blocks until it can acquire the lock for onBehalfOf +func (l *ObjectLock) Acquire(onBehalfOf SharedLockingContext) { + acquired := false + for !acquired { + if l.try(onBehalfOf) { + return + } else { + l.wait() + } + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/internal/server.go b/vendor/github.com/vmware/govmomi/simulator/internal/server.go new file mode 100644 index 0000000000..877eca0dcc --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/internal/server.go @@ -0,0 +1,353 @@ +/* +Copyright (c) 2014-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 internal + +import ( + "crypto/tls" + "crypto/x509" + "fmt" + "log" + "net" + "net/http" + "strings" + "sync" + "time" +) + +// A Server is an HTTP server listening on a system-chosen port on the +// local loopback interface, for use in end-to-end HTTP tests. +type Server struct { + URL string // base URL of form http://ipaddr:port with no trailing slash + Listener net.Listener + + // TLS is the optional TLS configuration, populated with a new config + // after TLS is started. If set on an unstarted server before StartTLS + // is called, existing fields are copied into the new config. + TLS *tls.Config + + // Config may be changed after calling NewUnstartedServer and + // before Start or StartTLS. + Config *http.Server + + // certificate is a parsed version of the TLS config certificate, if present. + certificate *x509.Certificate + + // wg counts the number of outstanding HTTP requests on this server. + // Close blocks until all requests are finished. + wg sync.WaitGroup + + mu sync.Mutex // guards closed and conns + closed bool + conns map[net.Conn]http.ConnState // except terminal states + + // client is configured for use with the server. + // Its transport is automatically closed when Close is called. + client *http.Client +} + +func newLocalListener(serve string) net.Listener { + if serve != "" { + l, err := net.Listen("tcp", serve) + if err != nil { + panic(fmt.Sprintf("httptest: failed to listen on %v: %v", serve, err)) + } + return l + } + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + if l, err = net.Listen("tcp6", "[::1]:0"); err != nil { + panic(fmt.Sprintf("httptest: failed to listen on a port: %v", err)) + } + } + return l +} + +// NewServer starts and returns a new Server. +// The caller should call Close when finished, to shut it down. +func NewServer(handler http.Handler) *Server { + ts := NewUnstartedServer(handler, "") + ts.Start() + return ts +} + +// NewUnstartedServer returns a new Server but doesn't start it. +// +// After changing its configuration, the caller should call Start or +// StartTLS. +// +// The caller should call Close when finished, to shut it down. +// serve allows the server's listen address to be specified. +func NewUnstartedServer(handler http.Handler, serve string) *Server { + return &Server{ + Listener: newLocalListener(serve), + Config: &http.Server{Handler: handler}, + } +} + +// Start starts a server from NewUnstartedServer. +func (s *Server) Start() { + if s.URL != "" { + panic("Server already started") + } + if s.client == nil { + s.client = &http.Client{Transport: &http.Transport{}} + } + s.URL = "http://" + s.Listener.Addr().String() + s.wrap() + s.goServe() +} + +// StartTLS starts TLS on a server from NewUnstartedServer. +func (s *Server) StartTLS() { + if s.URL != "" { + panic("Server already started") + } + if s.client == nil { + s.client = &http.Client{Transport: &http.Transport{}} + } + cert, err := tls.X509KeyPair(LocalhostCert, LocalhostKey) + if err != nil { + panic(fmt.Sprintf("httptest: NewTLSServer: %v", err)) + } + + existingConfig := s.TLS + if existingConfig != nil { + s.TLS = existingConfig.Clone() + } else { + s.TLS = new(tls.Config) + } + if s.TLS.NextProtos == nil { + s.TLS.NextProtos = []string{"http/1.1"} + } + if len(s.TLS.Certificates) == 0 { + s.TLS.Certificates = []tls.Certificate{cert} + } + s.certificate, err = x509.ParseCertificate(s.TLS.Certificates[0].Certificate[0]) + if err != nil { + panic(fmt.Sprintf("httptest: NewTLSServer: %v", err)) + } + certpool := x509.NewCertPool() + certpool.AddCert(s.certificate) + s.client.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{ + RootCAs: certpool, + }, + } + s.Listener = tls.NewListener(s.Listener, s.TLS) + s.URL = "https://" + s.Listener.Addr().String() + s.wrap() + s.goServe() +} + +// NewTLSServer starts and returns a new Server using TLS. +// The caller should call Close when finished, to shut it down. +func NewTLSServer(handler http.Handler) *Server { + ts := NewUnstartedServer(handler, "") + ts.StartTLS() + return ts +} + +type closeIdleTransport interface { + CloseIdleConnections() +} + +// Close shuts down the server and blocks until all outstanding +// requests on this server have completed. +func (s *Server) Close() { + s.mu.Lock() + if !s.closed { + s.closed = true + s.Listener.Close() + s.Config.SetKeepAlivesEnabled(false) + for c, st := range s.conns { + // Force-close any idle connections (those between + // requests) and new connections (those which connected + // but never sent a request). StateNew connections are + // super rare and have only been seen (in + // previously-flaky tests) in the case of + // socket-late-binding races from the http Client + // dialing this server and then getting an idle + // connection before the dial completed. There is thus + // a connected connection in StateNew with no + // associated Request. We only close StateIdle and + // StateNew because they're not doing anything. It's + // possible StateNew is about to do something in a few + // milliseconds, but a previous CL to check again in a + // few milliseconds wasn't liked (early versions of + // https://golang.org/cl/15151) so now we just + // forcefully close StateNew. The docs for Server.Close say + // we wait for "outstanding requests", so we don't close things + // in StateActive. + if st == http.StateIdle || st == http.StateNew { + s.closeConn(c) + } + } + // If this server doesn't shut down in 5 seconds, tell the user why. + t := time.AfterFunc(5*time.Second, s.logCloseHangDebugInfo) + defer t.Stop() + } + s.mu.Unlock() + + // Not part of httptest.Server's correctness, but assume most + // users of httptest.Server will be using the standard + // transport, so help them out and close any idle connections for them. + if t, ok := http.DefaultTransport.(closeIdleTransport); ok { + t.CloseIdleConnections() + } + + // Also close the client idle connections. + if s.client != nil { + if t, ok := s.client.Transport.(closeIdleTransport); ok { + t.CloseIdleConnections() + } + } + + s.wg.Wait() +} + +func (s *Server) logCloseHangDebugInfo() { + s.mu.Lock() + defer s.mu.Unlock() + var buf strings.Builder + buf.WriteString("httptest.Server blocked in Close after 5 seconds, waiting for connections:\n") + for c, st := range s.conns { + fmt.Fprintf(&buf, " %T %p %v in state %v\n", c, c, c.RemoteAddr(), st) + } + log.Print(buf.String()) +} + +// CloseClientConnections closes any open HTTP connections to the test Server. +func (s *Server) CloseClientConnections() { + s.mu.Lock() + nconn := len(s.conns) + ch := make(chan struct{}, nconn) + for c := range s.conns { + go s.closeConnChan(c, ch) + } + s.mu.Unlock() + + // Wait for outstanding closes to finish. + // + // Out of paranoia for making a late change in Go 1.6, we + // bound how long this can wait, since golang.org/issue/14291 + // isn't fully understood yet. At least this should only be used + // in tests. + timer := time.NewTimer(5 * time.Second) + defer timer.Stop() + for i := 0; i < nconn; i++ { + select { + case <-ch: + case <-timer.C: + // Too slow. Give up. + return + } + } +} + +// Certificate returns the certificate used by the server, or nil if +// the server doesn't use TLS. +func (s *Server) Certificate() *x509.Certificate { + return s.certificate +} + +// Client returns an HTTP client configured for making requests to the server. +// It is configured to trust the server's TLS test certificate and will +// close its idle connections on Server.Close. +func (s *Server) Client() *http.Client { + return s.client +} + +func (s *Server) goServe() { + s.wg.Add(1) + go func() { + defer s.wg.Done() + s.Config.Serve(s.Listener) + }() +} + +// wrap installs the connection state-tracking hook to know which +// connections are idle. +func (s *Server) wrap() { + oldHook := s.Config.ConnState + s.Config.ConnState = func(c net.Conn, cs http.ConnState) { + s.mu.Lock() + defer s.mu.Unlock() + + switch cs { + case http.StateNew: + if _, exists := s.conns[c]; exists { + panic("invalid state transition") + } + if s.conns == nil { + s.conns = make(map[net.Conn]http.ConnState) + } + // Add c to the set of tracked conns and increment it to the + // waitgroup. + s.wg.Add(1) + s.conns[c] = cs + if s.closed { + // Probably just a socket-late-binding dial from + // the default transport that lost the race (and + // thus this connection is now idle and will + // never be used). + s.closeConn(c) + } + case http.StateActive: + if oldState, ok := s.conns[c]; ok { + if oldState != http.StateNew && oldState != http.StateIdle { + panic("invalid state transition") + } + s.conns[c] = cs + } + case http.StateIdle: + if oldState, ok := s.conns[c]; ok { + if oldState != http.StateActive { + panic("invalid state transition") + } + s.conns[c] = cs + } + if s.closed { + s.closeConn(c) + } + case http.StateHijacked, http.StateClosed: + // Remove c from the set of tracked conns and decrement it from the + // waitgroup, unless it was previously removed. + if _, ok := s.conns[c]; ok { + delete(s.conns, c) + // Keep Close from returning until the user's ConnState hook + // (if any) finishes. + defer s.wg.Done() + } + } + if oldHook != nil { + oldHook(c, cs) + } + } +} + +// closeConn closes c. +// s.mu must be held. +func (s *Server) closeConn(c net.Conn) { s.closeConnChan(c, nil) } + +// closeConnChan is like closeConn, but takes an optional channel to receive a value +// when the goroutine closing c is done. +func (s *Server) closeConnChan(c net.Conn, done chan<- struct{}) { + c.Close() + if done != nil { + done <- struct{}{} + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/internal/testcert.go b/vendor/github.com/vmware/govmomi/simulator/internal/testcert.go new file mode 100644 index 0000000000..3c8640e2cf --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/internal/testcert.go @@ -0,0 +1,76 @@ +/* +Copyright (c) 2014-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 internal + +// LocalhostCert is a PEM-encoded TLS cert with SAN IPs +// "127.0.0.1" and "[::1]", expiring at Jan 29 16:00:00 2084 GMT. +// generated from src/crypto/tls: +// go run generate_cert.go --rsa-bits 2048 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h +// +// Please note the certificate was updated to 2048 bits due to macOS now +// requiring RSA keys of at least 2048 bits. For more information, please see: +// https://developer.apple.com/documentation/security/preventing_insecure_network_connections +var LocalhostCert = []byte(`-----BEGIN CERTIFICATE----- +MIIDOjCCAiKgAwIBAgIRAK6d/JpGL75P2wOSYc6WalEwDQYJKoZIhvcNAQELBQAw +EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 +MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAK9lInM4OAKI4z+wDNkvcZC6S6exFSOysp7NPJyaEAhW93kPY7gO +f6H5aP3V3YU0vYpCSnz/UhyDD+/knBof1J3Do7FVwYtC293vrtXffNtAvygfJodW +1dPllp17ZJbq76ei9oWq1Y5Hox/sVYmNVNztvBfK1mtpS8z8Qrk1LWCyLiDHkvDA +hCy2OjuaopxC6qQejdWT1PxwbqptuLVakQmecpiFrupy8DTG0x0rxxdMdAATywhY +Gm49A/FroagZ6HMz3bm39we/w6VIx3pX1lbUUyrfjvBgfUlRwxyZABBj2STGsOQJ +a451eEcESXcSEWzjGjUQ1Wf+zzxr2GAHmI8CAwEAAaOBiDCBhTAOBgNVHQ8BAf8E +BAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zAdBgNV +HQ4EFgQUjtR2VSuxchTxe0UNDVqWDNMR37AwLgYDVR0RBCcwJYILZXhhbXBsZS5j +b22HBH8AAAGHEAAAAAAAAAAAAAAAAAAAAAEwDQYJKoZIhvcNAQELBQADggEBACK7 +1L15IeYPiQHFDml3EgDoRnd/tAaZP9nUZIIPLRgUnQITNAtjFgBvqneQZwlQtco2 +s8YXSivBQiATlBEtGBzVxv36R4tTXldIgJxaCUxxZtqALLwyGqSaI/cwE0pWa6Z0 +Op2wkzUmoQ5rRrJfRM+C6HR/+lWkNtHRzaUFOSlxNJbPo53K53OoDriwEc1PvEYP +wFeUXwTzCZ68pAlWUmDKCyp+lPhjIt2Gznig+BSPCNJqmwKM76oFyywi3HIP56rD +/cwUtoplF68uVuD8HXb1ggGsqtGiAT4GLT8tU5w+BtK8ZIs/LK7mdi7W8aIOhUUH +l1lgeV3oEQue3A7SogA= +-----END CERTIFICATE-----`) + +// LocalhostKey is the private key for localhostCert. +var LocalhostKey = []byte(`-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCvZSJzODgCiOM/ +sAzZL3GQukunsRUjsrKezTycmhAIVvd5D2O4Dn+h+Wj91d2FNL2KQkp8/1Icgw/v +5JwaH9Sdw6OxVcGLQtvd767V33zbQL8oHyaHVtXT5Zade2SW6u+novaFqtWOR6Mf +7FWJjVTc7bwXytZraUvM/EK5NS1gsi4gx5LwwIQstjo7mqKcQuqkHo3Vk9T8cG6q +bbi1WpEJnnKYha7qcvA0xtMdK8cXTHQAE8sIWBpuPQPxa6GoGehzM925t/cHv8Ol +SMd6V9ZW1FMq347wYH1JUcMcmQAQY9kkxrDkCWuOdXhHBEl3EhFs4xo1ENVn/s88 +a9hgB5iPAgMBAAECggEAEpeS3knQThx6kk60HfWUgTXuPRldV0pi+shgq2z9VBT7 +6J5EAMewqdfJVFbuQ2eCy/wY70UVTCZscw51qaNEI3EQkgS4Hm345n64tr0Y/BjR +6ovaxq/ivLJyk8D3ubOvscJphWPFfW6EkSa5LnqHy197972tmvcvbMw0unMzmzM7 +DenXdoIJQu1SqLiLUiDXEfkvCReekqhe1jATCwTzIBTCnTWxgI4Ox2qsBaxuwrnl +D1GpWy4sh8NpDB0EBwdrjAOmLDOyvsy2X65DIlHS/k7901tvzyNjRrsr2Ig0sAz4 +w0ke6CUKQ2B+Pqn3p6bvxRYMP08+ZjlQpPuU4RrxGQKBgQDd3HCrZCgUJAGcfzYX +ZzSmSoxB9+sEuVUZGU+ICMPlG0Dd8aEkXIyDjGMWsLFMIvzNBf4wB1FwdLaCJu6y +0PbX3KVfg/Yc4lvYUuQ+1nD/3gm2hE46lZuSfbmExH5SQVLSbSQf9S/5BTHAWQO9 +PNie71AZ8fO5YDBM18tq2V7dBQKBgQDKYk1+Zup5p0BeRyCNnVYnpngO+pAZZmld +gYiRn8095QJ/Y+yV0kYc2+0+5f6St462E+PVH3tX1l9OG3ujVQnWfu2iSsRJRMUf +0blxqTWvqdcGi8SLpVjkrHn30scFNWmojhJv3k42H3nUMC1+WU3rp2f7+W58afyd +NY9x4sqzgwKBgQCoeMq9+3JLyQPIOPl0UBS06gsT1RUMI0gxpPy1yiInich6QRAi +snypMCPWiRo5PKBHd/OLuSLoiFhHARVliDTJum2B2I09Zc5kuJ1F8kUgpxUtGc7l +wdG/LeWAok1iXORtkh9KfT+Ok5kx/OZP/zJnjkZ/TTHMZPSIhZ2cZ7AXmQKBgHMP +HjWNtyKApsSytVwtpgyWxMznQMNgCOkjOoxoCJx2tUvNeHTY/glsM14+DdRFzTnQ +5weEhXAzrS1PzKPYNeafdOR+k0eAdH2Zk09+PspmyZusHIqz72zabeEqEQHyEubE +FtFI1rhIfs/WsBaUGQuvuhtz/I95BiguiiXaJRmXAoGADwcO6YXoWXga07gGRwZP +LYKwt5wBh13LAGbSsUyCSK5FG6ZrTmzaFdAGV1U4wc/wgiIgv33m8BG4Ikxvpa0r +Wg3dbhBx9Oya8QWIMBPk72KKEzsSDfi+Cn52ZmxTkWbBDCnkRhG77Ooi8vJ3dhq4 +fHeAu1F9OwF83SBi1oNySd8= +-----END PRIVATE KEY-----`) diff --git a/vendor/github.com/vmware/govmomi/simulator/internal/types.go b/vendor/github.com/vmware/govmomi/simulator/internal/types.go new file mode 100644 index 0000000000..3b87ef88f0 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/internal/types.go @@ -0,0 +1,74 @@ +/* +Copyright (c) 2014-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 internal + +import ( + "reflect" + + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +// Minimal set of internal types and methods: +// - Fetch() - used by ovftool to collect various managed object properties +// - RetrieveInternalContent() - used by ovftool to obtain a reference to NfcService (which it does not use by default) + +func init() { + types.Add("Fetch", reflect.TypeOf((*Fetch)(nil)).Elem()) +} + +type Fetch struct { + This types.ManagedObjectReference `xml:"_this"` + Prop string `xml:"prop"` +} + +type FetchResponse struct { + Returnval types.AnyType `xml:"returnval,omitempty,typeattr"` +} + +type FetchBody struct { + Req *Fetch `xml:"Fetch,omitempty"` + Res *FetchResponse `xml:"FetchResponse,omitempty"` + Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` +} + +func (b *FetchBody) Fault() *soap.Fault { return b.Fault_ } + +func init() { + types.Add("RetrieveInternalContent", reflect.TypeOf((*RetrieveInternalContent)(nil)).Elem()) +} + +type RetrieveInternalContent struct { + This types.ManagedObjectReference `xml:"_this"` +} + +type RetrieveInternalContentResponse struct { + Returnval InternalServiceInstanceContent `xml:"returnval"` +} + +type RetrieveInternalContentBody struct { + Res *RetrieveInternalContentResponse `xml:"RetrieveInternalContentResponse,omitempty"` + Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` +} + +func (b *RetrieveInternalContentBody) Fault() *soap.Fault { return b.Fault_ } + +type InternalServiceInstanceContent struct { + types.DynamicData + + NfcService types.ManagedObjectReference `xml:"nfcService"` +} diff --git a/vendor/github.com/vmware/govmomi/simulator/ip_pool_manager.go b/vendor/github.com/vmware/govmomi/simulator/ip_pool_manager.go new file mode 100644 index 0000000000..d8ef992a36 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/ip_pool_manager.go @@ -0,0 +1,387 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "errors" + "fmt" + "net" + "strconv" + "strings" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var ipPool = MustNewIpPool(&types.IpPool{ + Id: 1, + Name: "ip-pool", + AvailableIpv4Addresses: 250, + AvailableIpv6Addresses: 250, + AllocatedIpv6Addresses: 0, + AllocatedIpv4Addresses: 0, + Ipv4Config: &types.IpPoolIpPoolConfigInfo{ + Netmask: "10.10.10.255", + Gateway: "10.10.10.1", + SubnetAddress: "10.10.10.0", + Range: "10.10.10.2#250", + }, + Ipv6Config: &types.IpPoolIpPoolConfigInfo{ + Netmask: "2001:4860:0:2001::ff", + Gateway: "2001:4860:0:2001::1", + SubnetAddress: "2001:4860:0:2001::0", + Range: "2001:4860:0:2001::2#250", + }, +}) + +// IpPoolManager implements a simple IP Pool manager in which all pools are shared +// across different datacenters. +type IpPoolManager struct { + mo.IpPoolManager + + pools map[int32]*IpPool + nextPoolId int32 +} + +func (m *IpPoolManager) init(*Registry) { + m.pools = map[int32]*IpPool{ + 1: ipPool, + } + m.nextPoolId = 2 +} + +func (m *IpPoolManager) CreateIpPool(req *types.CreateIpPool) soap.HasFault { + body := &methods.CreateIpPoolBody{} + id := m.nextPoolId + + var err error + m.pools[id], err = NewIpPool(&req.Pool) + if err != nil { + body.Fault_ = Fault("", &types.RuntimeFault{}) + return body + } + + m.nextPoolId++ + + body.Res = &types.CreateIpPoolResponse{ + Returnval: id, + } + + return body +} + +func (m *IpPoolManager) DestroyIpPool(req *types.DestroyIpPool) soap.HasFault { + delete(m.pools, req.Id) + + return &methods.DestroyIpPoolBody{ + Res: &types.DestroyIpPoolResponse{}, + } +} + +func (m *IpPoolManager) QueryIpPools(req *types.QueryIpPools) soap.HasFault { + pools := []types.IpPool{} + + for i := int32(1); i < m.nextPoolId; i++ { + if p, ok := m.pools[i]; ok { + pools = append(pools, *p.config) + } + } + + return &methods.QueryIpPoolsBody{ + Res: &types.QueryIpPoolsResponse{ + Returnval: pools, + }, + } +} + +func (m *IpPoolManager) UpdateIpPool(req *types.UpdateIpPool) soap.HasFault { + body := &methods.UpdateIpPoolBody{} + + var pool *IpPool + var err error + var ok bool + + if pool, ok = m.pools[req.Pool.Id]; !ok { + body.Fault_ = Fault("", &types.NotFoundFault{}) + return body + } + + if pool.config.AllocatedIpv4Addresses+pool.config.AllocatedIpv6Addresses != 0 { + body.Fault_ = Fault("update a pool has been used is not supported", &types.RuntimeFault{}) + return body + } + + m.pools[req.Pool.Id], err = NewIpPool(&req.Pool) + if err != nil { + body.Fault_ = Fault(err.Error(), &types.RuntimeFault{}) + return body + } + + body.Res = &types.UpdateIpPoolResponse{} + + return body +} + +func (m *IpPoolManager) AllocateIpv4Address(req *types.AllocateIpv4Address) soap.HasFault { + body := &methods.AllocateIpv4AddressBody{} + + pool, ok := m.pools[req.PoolId] + if !ok { + body.Fault_ = Fault("", &types.InvalidArgument{}) + return body + } + + ip, err := pool.AllocateIPv4(req.AllocationId) + if err != nil { + body.Fault_ = Fault(err.Error(), &types.RuntimeFault{}) + return body + } + + body.Res = &types.AllocateIpv4AddressResponse{ + Returnval: ip, + } + + return body +} + +func (m *IpPoolManager) AllocateIpv6Address(req *types.AllocateIpv6Address) soap.HasFault { + body := &methods.AllocateIpv6AddressBody{} + + pool, ok := m.pools[req.PoolId] + if !ok { + body.Fault_ = Fault("", &types.InvalidArgument{}) + return body + } + + ip, err := pool.AllocateIpv6(req.AllocationId) + if err != nil { + body.Fault_ = Fault(err.Error(), &types.RuntimeFault{}) + return body + } + + body.Res = &types.AllocateIpv6AddressResponse{ + Returnval: ip, + } + + return body +} + +func (m *IpPoolManager) ReleaseIpAllocation(req *types.ReleaseIpAllocation) soap.HasFault { + body := &methods.ReleaseIpAllocationBody{} + + pool, ok := m.pools[req.PoolId] + if !ok { + body.Fault_ = Fault("", &types.InvalidArgument{}) + return body + } + + pool.ReleaseIpv4(req.AllocationId) + pool.ReleaseIpv6(req.AllocationId) + + body.Res = &types.ReleaseIpAllocationResponse{} + + return body +} + +func (m *IpPoolManager) QueryIPAllocations(req *types.QueryIPAllocations) soap.HasFault { + body := &methods.QueryIPAllocationsBody{} + + pool, ok := m.pools[req.PoolId] + if !ok { + body.Fault_ = Fault("", &types.InvalidArgument{}) + return body + } + + body.Res = &types.QueryIPAllocationsResponse{} + + ipv4, ok := pool.ipv4Allocation[req.ExtensionKey] + if ok { + body.Res.Returnval = append(body.Res.Returnval, types.IpPoolManagerIpAllocation{ + IpAddress: ipv4, + AllocationId: req.ExtensionKey, + }) + } + + ipv6, ok := pool.ipv6Allocation[req.ExtensionKey] + if ok { + body.Res.Returnval = append(body.Res.Returnval, types.IpPoolManagerIpAllocation{ + IpAddress: ipv6, + AllocationId: req.ExtensionKey, + }) + } + + return body +} + +var ( + errNoIpAvailable = errors.New("no ip address available") + errInvalidAllocation = errors.New("allocation id not recognized") +) + +type IpPool struct { + config *types.IpPool + ipv4Allocation map[string]string + ipv6Allocation map[string]string + ipv4Pool []string + ipv6Pool []string +} + +func MustNewIpPool(config *types.IpPool) *IpPool { + pool, err := NewIpPool(config) + if err != nil { + panic(err) + } + + return pool +} + +func NewIpPool(config *types.IpPool) (*IpPool, error) { + pool := &IpPool{ + config: config, + ipv4Allocation: make(map[string]string), + ipv6Allocation: make(map[string]string), + } + + return pool, pool.init() +} + +func (p *IpPool) init() error { + // IPv4 range + if p.config.Ipv4Config != nil { + ranges := strings.Split(p.config.Ipv4Config.Range, ",") + for _, r := range ranges { + sp := strings.Split(r, "#") + if len(sp) != 2 { + return fmt.Errorf("format of range should be ip#number; got %q", r) + } + + ip := net.ParseIP(strings.TrimSpace(sp[0])).To4() + if ip == nil { + return fmt.Errorf("bad ip format: %q", sp[0]) + } + + length, err := strconv.Atoi(sp[1]) + if err != nil { + return err + } + + for i := 0; i < length; i++ { + p.ipv4Pool = append(p.ipv4Pool, net.IPv4(ip[0], ip[1], ip[2], ip[3]+byte(i)).String()) + } + } + } + + // IPv6 range + if p.config.Ipv6Config != nil { + ranges := strings.Split(p.config.Ipv6Config.Range, ",") + for _, r := range ranges { + sp := strings.Split(r, "#") + if len(sp) != 2 { + return fmt.Errorf("format of range should be ip#number; got %q", r) + } + + ip := net.ParseIP(strings.TrimSpace(sp[0])).To16() + if ip == nil { + return fmt.Errorf("bad ip format: %q", sp[0]) + } + + length, err := strconv.Atoi(sp[1]) + if err != nil { + return err + } + + for i := 0; i < length; i++ { + var ipv6 [16]byte + copy(ipv6[:], ip) + ipv6[15] += byte(i) + p.ipv6Pool = append(p.ipv6Pool, net.IP(ipv6[:]).String()) + } + } + } + + return nil +} + +func (p *IpPool) AllocateIPv4(allocation string) (string, error) { + if ip, ok := p.ipv4Allocation[allocation]; ok { + return ip, nil + } + + l := len(p.ipv4Pool) + if l == 0 { + return "", errNoIpAvailable + } + + ip := p.ipv4Pool[l-1] + + p.config.AvailableIpv4Addresses-- + p.config.AllocatedIpv4Addresses++ + p.ipv4Pool = p.ipv4Pool[:l-1] + p.ipv4Allocation[allocation] = ip + + return ip, nil +} + +func (p *IpPool) ReleaseIpv4(allocation string) error { + ip, ok := p.ipv4Allocation[allocation] + if !ok { + return errInvalidAllocation + } + + delete(p.ipv4Allocation, allocation) + p.config.AvailableIpv4Addresses++ + p.config.AllocatedIpv4Addresses-- + p.ipv4Pool = append(p.ipv4Pool, ip) + + return nil +} + +func (p *IpPool) AllocateIpv6(allocation string) (string, error) { + if ip, ok := p.ipv6Allocation[allocation]; ok { + return ip, nil + } + + l := len(p.ipv6Pool) + if l == 0 { + return "", errNoIpAvailable + } + + ip := p.ipv6Pool[l-1] + + p.config.AvailableIpv6Addresses-- + p.config.AllocatedIpv6Addresses++ + p.ipv6Pool = p.ipv6Pool[:l-1] + p.ipv6Allocation[allocation] = ip + + return ip, nil +} + +func (p *IpPool) ReleaseIpv6(allocation string) error { + ip, ok := p.ipv6Allocation[allocation] + if !ok { + return errInvalidAllocation + } + + delete(p.ipv6Allocation, allocation) + p.config.AvailableIpv6Addresses++ + p.config.AllocatedIpv6Addresses-- + p.ipv6Pool = append(p.ipv6Pool, ip) + + return nil +} diff --git a/vendor/github.com/vmware/govmomi/simulator/license_manager.go b/vendor/github.com/vmware/govmomi/simulator/license_manager.go new file mode 100644 index 0000000000..6097359663 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/license_manager.go @@ -0,0 +1,188 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Copyright 2017 VMware, Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +// EvalLicense is the default license +var EvalLicense = types.LicenseManagerLicenseInfo{ + LicenseKey: "00000-00000-00000-00000-00000", + EditionKey: "eval", + Name: "Evaluation Mode", + Properties: []types.KeyAnyValue{ + { + Key: "feature", + Value: types.KeyValue{ + Key: "serialuri:2", + Value: "Remote virtual Serial Port Concentrator", + }, + }, + { + Key: "feature", + Value: types.KeyValue{ + Key: "dvs", + Value: "vSphere Distributed Switch", + }, + }, + }, +} + +type LicenseManager struct { + mo.LicenseManager +} + +func (m *LicenseManager) init(r *Registry) { + m.Licenses = []types.LicenseManagerLicenseInfo{EvalLicense} + + if r.IsVPX() { + am := Map.Put(&LicenseAssignmentManager{}).Reference() + m.LicenseAssignmentManager = &am + } +} + +func (m *LicenseManager) AddLicense(req *types.AddLicense) soap.HasFault { + body := &methods.AddLicenseBody{ + Res: &types.AddLicenseResponse{}, + } + + for _, license := range m.Licenses { + if license.LicenseKey == req.LicenseKey { + body.Res.Returnval = licenseInfo(license.LicenseKey, license.Labels) + return body + } + } + + m.Licenses = append(m.Licenses, types.LicenseManagerLicenseInfo{ + LicenseKey: req.LicenseKey, + Labels: req.Labels, + }) + + body.Res.Returnval = licenseInfo(req.LicenseKey, req.Labels) + + return body +} + +func (m *LicenseManager) RemoveLicense(req *types.RemoveLicense) soap.HasFault { + body := &methods.RemoveLicenseBody{ + Res: &types.RemoveLicenseResponse{}, + } + + for i, license := range m.Licenses { + if req.LicenseKey == license.LicenseKey { + m.Licenses = append(m.Licenses[:i], m.Licenses[i+1:]...) + return body + } + } + return body +} + +func (m *LicenseManager) UpdateLicenseLabel(req *types.UpdateLicenseLabel) soap.HasFault { + body := &methods.UpdateLicenseLabelBody{} + + for i := range m.Licenses { + license := &m.Licenses[i] + + if req.LicenseKey != license.LicenseKey { + continue + } + + body.Res = new(types.UpdateLicenseLabelResponse) + + for j := range license.Labels { + label := &license.Labels[j] + + if label.Key == req.LabelKey { + if req.LabelValue == "" { + license.Labels = append(license.Labels[:i], license.Labels[i+1:]...) + } else { + label.Value = req.LabelValue + } + return body + } + } + + license.Labels = append(license.Labels, types.KeyValue{ + Key: req.LabelKey, + Value: req.LabelValue, + }) + + return body + } + + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "licenseKey"}) + return body +} + +type LicenseAssignmentManager struct { + mo.LicenseAssignmentManager +} + +func (m *LicenseAssignmentManager) QueryAssignedLicenses(req *types.QueryAssignedLicenses) soap.HasFault { + body := &methods.QueryAssignedLicensesBody{ + Res: &types.QueryAssignedLicensesResponse{}, + } + + // EntityId can be a HostSystem or the vCenter InstanceUuid + if req.EntityId != "" { + if req.EntityId != Map.content().About.InstanceUuid { + id := types.ManagedObjectReference{ + Type: "HostSystem", + Value: req.EntityId, + } + + if Map.Get(id) == nil { + return body + } + } + } + + body.Res.Returnval = []types.LicenseAssignmentManagerLicenseAssignment{ + { + EntityId: req.EntityId, + AssignedLicense: EvalLicense, + }, + } + + return body +} + +func licenseInfo(key string, labels []types.KeyValue) types.LicenseManagerLicenseInfo { + info := EvalLicense + + info.LicenseKey = key + info.Labels = labels + + return info +} diff --git a/vendor/github.com/vmware/govmomi/simulator/model.go b/vendor/github.com/vmware/govmomi/simulator/model.go new file mode 100644 index 0000000000..f16efc2e5c --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/model.go @@ -0,0 +1,977 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "context" + "crypto/tls" + "fmt" + "log" + "math/rand" + "os" + "path" + "path/filepath" + "reflect" + "strings" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi" + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/simulator/vpx" + "github.com/vmware/govmomi/units" + "github.com/vmware/govmomi/vim25" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" + "github.com/vmware/govmomi/vim25/xml" +) + +type DelayConfig struct { + // Delay specifies the number of milliseconds to delay serving a SOAP call. 0 means no delay. + // This can be used to simulate a poorly performing vCenter or network lag. + Delay int + + // Delay specifies the number of milliseconds to delay serving a specific method. + // Each entry in the map represents the name of a method and its associated delay in milliseconds, + // This can be used to simulate a poorly performing vCenter or network lag. + MethodDelay map[string]int + + // DelayJitter defines the delay jitter as a coefficient of variation (stddev/mean). + // This can be used to simulate unpredictable delay. 0 means no jitter, i.e. all invocations get the same delay. + DelayJitter float64 +} + +// Model is used to populate a Model with an initial set of managed entities. +// This is a simple helper for tests running against a simulator, to populate an inventory +// with commonly used models. +// The inventory names generated by a Model have a string prefix per-type and integer suffix per-instance. +// The names are concatenated with their ancestor names and delimited by '_', making the generated names unique. +type Model struct { + Service *Service `json:"-"` + + ServiceContent types.ServiceContent `json:"-"` + RootFolder mo.Folder `json:"-"` + + // Autostart will power on Model created VMs when true + Autostart bool `json:"-"` + + // Datacenter specifies the number of Datacenter entities to create + // Name prefix: DC, vcsim flag: -dc + Datacenter int `json:"datacenter"` + + // Portgroup specifies the number of DistributedVirtualPortgroup entities to create per Datacenter + // Name prefix: DVPG, vcsim flag: -pg + Portgroup int `json:"portgroup"` + + // PortgroupNSX specifies the number NSX backed DistributedVirtualPortgroup entities to create per Datacenter + // Name prefix: NSXPG, vcsim flag: -nsx-pg + PortgroupNSX int `json:"portgroupNSX"` + + // OpaqueNetwork specifies the number of OpaqueNetwork entities to create per Datacenter, + // with Summary.OpaqueNetworkType set to nsx.LogicalSwitch and Summary.OpaqueNetworkId to a random uuid. + // Name prefix: NSX, vcsim flag: -nsx + OpaqueNetwork int `json:"opaqueNetwork"` + + // Host specifies the number of standalone HostSystems entities to create per Datacenter + // Name prefix: H, vcsim flag: -standalone-host + Host int `json:"host,omitempty"` + + // Cluster specifies the number of ClusterComputeResource entities to create per Datacenter + // Name prefix: C, vcsim flag: -cluster + Cluster int `json:"cluster"` + + // ClusterHost specifies the number of HostSystems entities to create within a Cluster + // Name prefix: H, vcsim flag: -host + ClusterHost int `json:"clusterHost,omitempty"` + + // Pool specifies the number of ResourcePool entities to create per Cluster + // Note that every cluster has a root ResourcePool named "Resources", as real vCenter does. + // For example: /DC0/host/DC0_C0/Resources + // The root ResourcePool is named "RP0" within other object names. + // When Model.Pool is set to 1 or higher, this creates child ResourcePools under the root pool. + // Note that this flag is not effective on standalone hosts. + // For example: /DC0/host/DC0_C0/Resources/DC0_C0_RP1 + // Name prefix: RP, vcsim flag: -pool + Pool int `json:"pool"` + + // Datastore specifies the number of Datastore entities to create + // Each Datastore will have temporary local file storage and will be mounted + // on every HostSystem created by the ModelConfig + // Name prefix: LocalDS, vcsim flag: -ds + Datastore int `json:"datastore"` + + // Machine specifies the number of VirtualMachine entities to create per + // ResourcePool. If the pool flag is specified, the specified number of virtual + // machines will be deployed to each child pool and prefixed with the child + // resource pool name. Otherwise they are deployed into the root resource pool, + // prefixed with RP0. On standalone hosts, machines are always deployed into the + // root resource pool without any prefix. + // Name prefix: VM, vcsim flag: -vm + Machine int `json:"machine"` + + // Folder specifies the number of Datacenter to place within a Folder. + // This includes a folder for the Datacenter itself and its host, vm, network and datastore folders. + // All resources for the Datacenter are placed within these folders, rather than the top-level folders. + // Name prefix: F, vcsim flag: -folder + Folder int `json:"folder"` + + // App specifies the number of VirtualApp to create per Cluster + // Name prefix: APP, vcsim flag: -app + App int `json:"app"` + + // Pod specifies the number of StoragePod to create per Cluster + // Name prefix: POD, vcsim flag: -pod + Pod int `json:"pod"` + + // Delay configurations + DelayConfig DelayConfig `json:"-"` + + // total number of inventory objects, set by Count() + total int + + dirs []string +} + +// ESX is the default Model for a standalone ESX instance +func ESX() *Model { + return &Model{ + ServiceContent: esx.ServiceContent, + RootFolder: esx.RootFolder, + Autostart: true, + Datastore: 1, + Machine: 2, + DelayConfig: DelayConfig{ + Delay: 0, + DelayJitter: 0, + MethodDelay: nil, + }, + } +} + +// VPX is the default Model for a vCenter instance +func VPX() *Model { + return &Model{ + ServiceContent: vpx.ServiceContent, + RootFolder: vpx.RootFolder, + Autostart: true, + Datacenter: 1, + Portgroup: 1, + Host: 1, + Cluster: 1, + ClusterHost: 3, + Datastore: 1, + Machine: 2, + DelayConfig: DelayConfig{ + Delay: 0, + DelayJitter: 0, + MethodDelay: nil, + }, + } +} + +// Count returns a Model with total number of each existing type +func (m *Model) Count() Model { + count := Model{} + + for ref, obj := range Map.objects { + if _, ok := obj.(mo.Entity); !ok { + continue + } + + count.total++ + + switch ref.Type { + case "Datacenter": + count.Datacenter++ + case "DistributedVirtualPortgroup": + count.Portgroup++ + case "ClusterComputeResource": + count.Cluster++ + case "Datastore": + count.Datastore++ + case "HostSystem": + count.Host++ + case "VirtualMachine": + count.Machine++ + case "ResourcePool": + count.Pool++ + case "VirtualApp": + count.App++ + case "Folder": + count.Folder++ + case "StoragePod": + count.Pod++ + case "OpaqueNetwork": + count.OpaqueNetwork++ + } + } + + return count +} + +func (*Model) fmtName(prefix string, num int) string { + return fmt.Sprintf("%s%d", prefix, num) +} + +// kinds maps managed object types to their vcsim wrapper types +var kinds = map[string]reflect.Type{ + "AlarmManager": reflect.TypeOf((*AlarmManager)(nil)).Elem(), + "AuthorizationManager": reflect.TypeOf((*AuthorizationManager)(nil)).Elem(), + "ClusterComputeResource": reflect.TypeOf((*ClusterComputeResource)(nil)).Elem(), + "CustomFieldsManager": reflect.TypeOf((*CustomFieldsManager)(nil)).Elem(), + "CustomizationSpecManager": reflect.TypeOf((*CustomizationSpecManager)(nil)).Elem(), + "CryptoManagerKmip": reflect.TypeOf((*CryptoManagerKmip)(nil)).Elem(), + "Datacenter": reflect.TypeOf((*Datacenter)(nil)).Elem(), + "Datastore": reflect.TypeOf((*Datastore)(nil)).Elem(), + "DatastoreNamespaceManager": reflect.TypeOf((*DatastoreNamespaceManager)(nil)).Elem(), + "DistributedVirtualPortgroup": reflect.TypeOf((*DistributedVirtualPortgroup)(nil)).Elem(), + "DistributedVirtualSwitch": reflect.TypeOf((*DistributedVirtualSwitch)(nil)).Elem(), + "DistributedVirtualSwitchManager": reflect.TypeOf((*DistributedVirtualSwitchManager)(nil)).Elem(), + "EnvironmentBrowser": reflect.TypeOf((*EnvironmentBrowser)(nil)).Elem(), + "EventManager": reflect.TypeOf((*EventManager)(nil)).Elem(), + "ExtensionManager": reflect.TypeOf((*ExtensionManager)(nil)).Elem(), + "FileManager": reflect.TypeOf((*FileManager)(nil)).Elem(), + "Folder": reflect.TypeOf((*Folder)(nil)).Elem(), + "GuestOperationsManager": reflect.TypeOf((*GuestOperationsManager)(nil)).Elem(), + "HostDatastoreBrowser": reflect.TypeOf((*HostDatastoreBrowser)(nil)).Elem(), + "HostLocalAccountManager": reflect.TypeOf((*HostLocalAccountManager)(nil)).Elem(), + "HostNetworkSystem": reflect.TypeOf((*HostNetworkSystem)(nil)).Elem(), + "HostCertificateManager": reflect.TypeOf((*HostCertificateManager)(nil)).Elem(), + "HostSystem": reflect.TypeOf((*HostSystem)(nil)).Elem(), + "IpPoolManager": reflect.TypeOf((*IpPoolManager)(nil)).Elem(), + "LicenseManager": reflect.TypeOf((*LicenseManager)(nil)).Elem(), + "OptionManager": reflect.TypeOf((*OptionManager)(nil)).Elem(), + "OvfManager": reflect.TypeOf((*OvfManager)(nil)).Elem(), + "PerformanceManager": reflect.TypeOf((*PerformanceManager)(nil)).Elem(), + "PropertyCollector": reflect.TypeOf((*PropertyCollector)(nil)).Elem(), + "ResourcePool": reflect.TypeOf((*ResourcePool)(nil)).Elem(), + "SearchIndex": reflect.TypeOf((*SearchIndex)(nil)).Elem(), + "SessionManager": reflect.TypeOf((*SessionManager)(nil)).Elem(), + "StoragePod": reflect.TypeOf((*StoragePod)(nil)).Elem(), + "StorageResourceManager": reflect.TypeOf((*StorageResourceManager)(nil)).Elem(), + "TaskManager": reflect.TypeOf((*TaskManager)(nil)).Elem(), + "TenantTenantManager": reflect.TypeOf((*TenantManager)(nil)).Elem(), + "UserDirectory": reflect.TypeOf((*UserDirectory)(nil)).Elem(), + "VcenterVStorageObjectManager": reflect.TypeOf((*VcenterVStorageObjectManager)(nil)).Elem(), + "ViewManager": reflect.TypeOf((*ViewManager)(nil)).Elem(), + "VirtualApp": reflect.TypeOf((*VirtualApp)(nil)).Elem(), + "VirtualDiskManager": reflect.TypeOf((*VirtualDiskManager)(nil)).Elem(), + "VirtualMachine": reflect.TypeOf((*VirtualMachine)(nil)).Elem(), + "VirtualMachineCompatibilityChecker": reflect.TypeOf((*VmCompatibilityChecker)(nil)).Elem(), + "VirtualMachineProvisioningChecker": reflect.TypeOf((*VmProvisioningChecker)(nil)).Elem(), + "VmwareDistributedVirtualSwitch": reflect.TypeOf((*DistributedVirtualSwitch)(nil)).Elem(), +} + +func loadObject(content types.ObjectContent) (mo.Reference, error) { + var obj mo.Reference + id := content.Obj + + kind, ok := kinds[id.Type] + if ok { + obj = reflect.New(kind).Interface().(mo.Reference) + } + + if obj == nil { + // No vcsim wrapper for this type, e.g. IoFilterManager + x, err := mo.ObjectContentToType(content, true) + if err != nil { + return nil, err + } + obj = x.(mo.Reference) + } else { + if len(content.PropSet) == 0 { + // via NewServiceInstance() + Map.setReference(obj, id) + } else { + // via Model.Load() + dst := getManagedObject(obj).Addr().Interface().(mo.Reference) + err := mo.LoadObjectContent([]types.ObjectContent{content}, dst) + if err != nil { + return nil, err + } + } + + if x, ok := obj.(interface{ init(*Registry) }); ok { + x.init(Map) + } + } + + return obj, nil +} + +// resolveReferences attempts to resolve any object references that were not included via Load() +// example: Load's dir only contains a single OpaqueNetwork, we need to create a Datacenter and +// place the OpaqueNetwork in the Datacenter's network folder. +func (m *Model) resolveReferences(ctx *Context) error { + dc, ok := ctx.Map.Any("Datacenter").(*Datacenter) + if !ok { + // Need to have at least 1 Datacenter + root := ctx.Map.Get(ctx.Map.content().RootFolder).(*Folder) + ref := root.CreateDatacenter(ctx, &types.CreateDatacenter{ + This: root.Self, + Name: "DC0", + }).(*methods.CreateDatacenterBody).Res.Returnval + dc = ctx.Map.Get(ref).(*Datacenter) + } + + for ref, val := range ctx.Map.objects { + me, ok := val.(mo.Entity) + if !ok { + continue + } + e := me.Entity() + if e.Parent == nil || ref.Type == "Folder" { + continue + } + if ctx.Map.Get(*e.Parent) == nil { + // object was loaded without its parent, attempt to foster with another parent + switch e.Parent.Type { + case "Folder": + folder := dc.folder(me) + e.Parent = &folder.Self + log.Printf("%s adopted %s", e.Parent, ref) + folderPutChild(ctx, folder, me) + default: + return fmt.Errorf("unable to foster %s with parent type=%s", ref, e.Parent.Type) + } + } + // TODO: resolve any remaining orphan references via mo.References() + } + + return nil +} + +func (m *Model) decode(path string, data interface{}) error { + f, err := os.Open(path) + if err != nil { + return err + } + + dec := xml.NewDecoder(f) + dec.TypeFunc = types.TypeFunc() + err = dec.Decode(data) + _ = f.Close() + return err +} + +func (m *Model) loadMethod(obj mo.Reference, dir string) error { + dir = filepath.Join(dir, obj.Reference().Encode()) + + info, err := os.ReadDir(dir) + if err != nil { + if os.IsNotExist(err) { + return nil + } + return err + } + + zero := reflect.Value{} + for _, x := range info { + name := strings.TrimSuffix(x.Name(), ".xml") + "Response" + path := filepath.Join(dir, x.Name()) + response := reflect.ValueOf(obj).Elem().FieldByName(name) + if response == zero { + return fmt.Errorf("field %T.%s not found", obj, name) + } + if err = m.decode(path, response.Addr().Interface()); err != nil { + return err + } + } + + return nil +} + +// When simulator code needs to call other simulator code, it typically passes whatever +// context is associated with the request it's servicing. +// Model code isn't servicing a request, but still needs a context, so we spoof +// one for the purposes of calling simulator code. +// Test code also tends to do this. +func SpoofContext() *Context { + return &Context{ + Context: context.Background(), + Session: &Session{ + UserSession: types.UserSession{ + Key: uuid.New().String(), + }, + Registry: NewRegistry(), + }, + Map: Map, + } +} + +// Load Model from the given directory, as created by the 'govc object.save' command. +func (m *Model) Load(dir string) error { + ctx := SpoofContext() + var s *ServiceInstance + + err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + if path == dir { + return nil + } + return filepath.SkipDir + } + if filepath.Ext(path) != ".xml" { + return nil + } + + var content types.ObjectContent + err = m.decode(path, &content) + if err != nil { + return err + } + + if content.Obj == vim25.ServiceInstance { + s = new(ServiceInstance) + s.Self = content.Obj + Map = NewRegistry() + ctx.Map = Map + ctx.Map.Put(s) + return mo.LoadObjectContent([]types.ObjectContent{content}, &s.ServiceInstance) + } + + if s == nil { + s = NewServiceInstance(ctx, m.ServiceContent, m.RootFolder) + ctx.Map = Map + } + + obj, err := loadObject(content) + if err != nil { + return err + } + + if x, ok := obj.(interface{ model(*Model) error }); ok { + if err = x.model(m); err != nil { + return err + } + } + + return m.loadMethod(ctx.Map.Put(obj), dir) + }) + + if err != nil { + return err + } + + m.Service = New(s) + + return m.resolveReferences(ctx) +} + +// Create populates the Model with the given ModelConfig +func (m *Model) Create() error { + ctx := SpoofContext() + m.Service = New(NewServiceInstance(ctx, m.ServiceContent, m.RootFolder)) + ctx.Map = Map + return m.CreateInfrastructure(ctx) +} + +func (m *Model) CreateInfrastructure(ctx *Context) error { + client := m.Service.client + root := object.NewRootFolder(client) + + // After all hosts are created, this var is used to mount the host datastores. + var hosts []*object.HostSystem + hostMap := make(map[string][]*object.HostSystem) + + // We need to defer VM creation until after the datastores are created. + var vms []func() error + // 1 DVS per DC, added to all hosts + var dvs *object.DistributedVirtualSwitch + // 1 NIC per VM, backed by a DVPG if Model.Portgroup > 0 + vmnet := esx.EthernetCard.Backing + + // addHost adds a cluster host or a standalone host. + addHost := func(name string, f func(types.HostConnectSpec) (*object.Task, error)) (*object.HostSystem, error) { + spec := types.HostConnectSpec{ + HostName: name, + } + + task, err := f(spec) + if err != nil { + return nil, err + } + + info, err := task.WaitForResult(context.Background(), nil) + if err != nil { + return nil, err + } + + host := object.NewHostSystem(client, info.Result.(types.ManagedObjectReference)) + hosts = append(hosts, host) + + if dvs != nil { + config := &types.DVSConfigSpec{ + Host: []types.DistributedVirtualSwitchHostMemberConfigSpec{{ + Operation: string(types.ConfigSpecOperationAdd), + Host: host.Reference(), + }}, + } + + task, _ = dvs.Reconfigure(ctx, config) + _, _ = task.WaitForResult(context.Background(), nil) + } + + return host, nil + } + + // addMachine returns a func to create a VM. + addMachine := func(prefix string, host *object.HostSystem, pool *object.ResourcePool, folders *object.DatacenterFolders) { + nic := esx.EthernetCard + nic.Backing = vmnet + ds := types.ManagedObjectReference{} + + f := func() error { + for i := 0; i < m.Machine; i++ { + name := m.fmtName(prefix+"_VM", i) + + config := types.VirtualMachineConfigSpec{ + Name: name, + GuestId: string(types.VirtualMachineGuestOsIdentifierOtherGuest), + Files: &types.VirtualMachineFileInfo{ + VmPathName: "[LocalDS_0]", + }, + } + + if pool == nil { + pool, _ = host.ResourcePool(ctx) + } + + var devices object.VirtualDeviceList + + scsi, _ := devices.CreateSCSIController("pvscsi") + ide, _ := devices.CreateIDEController() + cdrom, _ := devices.CreateCdrom(ide.(*types.VirtualIDEController)) + disk := devices.CreateDisk(scsi.(types.BaseVirtualController), ds, + config.Files.VmPathName+" "+path.Join(name, "disk1.vmdk")) + disk.CapacityInKB = int64(units.GB*10) / units.KB + disk.StorageIOAllocation = &types.StorageIOAllocationInfo{Limit: types.NewInt64(-1)} + + devices = append(devices, scsi, cdrom, disk, &nic) + + config.DeviceChange, _ = devices.ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd) + + task, err := folders.VmFolder.CreateVM(ctx, config, pool, host) + if err != nil { + return err + } + + info, err := task.WaitForResult(ctx, nil) + if err != nil { + return err + } + + vm := object.NewVirtualMachine(client, info.Result.(types.ManagedObjectReference)) + + if m.Autostart { + task, _ = vm.PowerOn(ctx) + _, _ = task.WaitForResult(ctx, nil) + } + } + + return nil + } + + vms = append(vms, f) + } + + nfolder := 0 + + for ndc := 0; ndc < m.Datacenter; ndc++ { + dcName := m.fmtName("DC", ndc) + folder := root + fName := m.fmtName("F", nfolder) + + // If Datacenter > Folder, don't create folders for the first N DCs. + if nfolder < m.Folder && ndc >= (m.Datacenter-m.Folder) { + f, err := folder.CreateFolder(ctx, fName) + if err != nil { + return err + } + folder = f + } + + dc, err := folder.CreateDatacenter(ctx, dcName) + if err != nil { + return err + } + + folders, err := dc.Folders(ctx) + if err != nil { + return err + } + + if m.Pod > 0 { + for pod := 0; pod < m.Pod; pod++ { + _, _ = folders.DatastoreFolder.CreateStoragePod(ctx, m.fmtName(dcName+"_POD", pod)) + } + } + + if folder != root { + // Create sub-folders and use them to create any resources that follow + subs := []**object.Folder{&folders.DatastoreFolder, &folders.HostFolder, &folders.NetworkFolder, &folders.VmFolder} + + for _, sub := range subs { + f, err := (*sub).CreateFolder(ctx, fName) + if err != nil { + return err + } + + *sub = f + } + + nfolder++ + } + + if m.Portgroup > 0 || m.PortgroupNSX > 0 { + var spec types.DVSCreateSpec + spec.ConfigSpec = &types.VMwareDVSConfigSpec{} + spec.ConfigSpec.GetDVSConfigSpec().Name = m.fmtName("DVS", 0) + + task, err := folders.NetworkFolder.CreateDVS(ctx, spec) + if err != nil { + return err + } + + info, err := task.WaitForResult(ctx, nil) + if err != nil { + return err + } + + dvs = object.NewDistributedVirtualSwitch(client, info.Result.(types.ManagedObjectReference)) + } + + for npg := 0; npg < m.Portgroup; npg++ { + name := m.fmtName(dcName+"_DVPG", npg) + spec := types.DVPortgroupConfigSpec{ + Name: name, + Type: string(types.DistributedVirtualPortgroupPortgroupTypeEarlyBinding), + NumPorts: 1, + } + + task, err := dvs.AddPortgroup(ctx, []types.DVPortgroupConfigSpec{spec}) + if err != nil { + return err + } + if err = task.Wait(ctx); err != nil { + return err + } + + // Use the 1st DVPG for the VMs eth0 backing + if npg == 0 { + // AddPortgroup_Task does not return the moid, so we look it up by name + net := ctx.Map.Get(folders.NetworkFolder.Reference()).(*Folder) + pg := ctx.Map.FindByName(name, net.ChildEntity) + + vmnet, _ = object.NewDistributedVirtualPortgroup(client, pg.Reference()).EthernetCardBackingInfo(ctx) + } + } + + for npg := 0; npg < m.PortgroupNSX; npg++ { + name := m.fmtName(dcName+"_NSXPG", npg) + spec := types.DVPortgroupConfigSpec{ + Name: name, + Type: string(types.DistributedVirtualPortgroupPortgroupTypeEarlyBinding), + BackingType: string(types.DistributedVirtualPortgroupBackingTypeNsx), + } + + task, err := dvs.AddPortgroup(ctx, []types.DVPortgroupConfigSpec{spec}) + if err != nil { + return err + } + if err = task.Wait(ctx); err != nil { + return err + } + } + + // Must use simulator methods directly for OpaqueNetwork + networkFolder := ctx.Map.Get(folders.NetworkFolder.Reference()).(*Folder) + + for i := 0; i < m.OpaqueNetwork; i++ { + var summary types.OpaqueNetworkSummary + summary.Name = m.fmtName(dcName+"_NSX", i) + err := networkFolder.AddOpaqueNetwork(ctx, summary) + if err != nil { + return err + } + } + + for nhost := 0; nhost < m.Host; nhost++ { + name := m.fmtName(dcName+"_H", nhost) + + host, err := addHost(name, func(spec types.HostConnectSpec) (*object.Task, error) { + return folders.HostFolder.AddStandaloneHost(ctx, spec, true, nil, nil) + }) + if err != nil { + return err + } + + addMachine(name, host, nil, folders) + } + + for ncluster := 0; ncluster < m.Cluster; ncluster++ { + clusterName := m.fmtName(dcName+"_C", ncluster) + + cluster, err := folders.HostFolder.CreateCluster(ctx, clusterName, types.ClusterConfigSpecEx{}) + if err != nil { + return err + } + + for nhost := 0; nhost < m.ClusterHost; nhost++ { + name := m.fmtName(clusterName+"_H", nhost) + + _, err = addHost(name, func(spec types.HostConnectSpec) (*object.Task, error) { + return cluster.AddHost(ctx, spec, true, nil, nil) + }) + if err != nil { + return err + } + } + + rootRP, err := cluster.ResourcePool(ctx) + if err != nil { + return err + } + + prefix := clusterName + "_RP" + + // put VMs in cluster RP if no child RP(s) configured + if m.Pool == 0 { + addMachine(prefix+"0", nil, rootRP, folders) + } + + // create child RP(s) with VMs + for childRP := 1; childRP <= m.Pool; childRP++ { + spec := types.DefaultResourceConfigSpec() + + p, err := rootRP.Create(ctx, m.fmtName(prefix, childRP), spec) + addMachine(m.fmtName(prefix, childRP), nil, p, folders) + if err != nil { + return err + } + } + + prefix = clusterName + "_APP" + + for napp := 0; napp < m.App; napp++ { + rspec := types.DefaultResourceConfigSpec() + vspec := NewVAppConfigSpec() + name := m.fmtName(prefix, napp) + + vapp, err := rootRP.CreateVApp(ctx, name, rspec, vspec, nil) + if err != nil { + return err + } + + addMachine(name, nil, vapp.ResourcePool, folders) + } + } + + hostMap[dcName] = hosts + hosts = nil + } + + if m.ServiceContent.RootFolder == esx.RootFolder.Reference() { + // ESX model + host := object.NewHostSystem(client, esx.HostSystem.Reference()) + + dc := object.NewDatacenter(client, esx.Datacenter.Reference()) + folders, err := dc.Folders(ctx) + if err != nil { + return err + } + + hostMap[dc.Reference().Value] = append(hosts, host) + + addMachine(host.Reference().Value, host, nil, folders) + } + + for dc, dchosts := range hostMap { + for i := 0; i < m.Datastore; i++ { + err := m.createLocalDatastore(dc, m.fmtName("LocalDS_", i), dchosts) + if err != nil { + return err + } + } + } + + for _, createVM := range vms { + err := createVM() + if err != nil { + return err + } + } + + // Turn on delay AFTER we're done building the service content + m.Service.delay = &m.DelayConfig + + return nil +} + +func (m *Model) createTempDir(dc string, name string) (string, error) { + dir, err := os.MkdirTemp("", fmt.Sprintf("govcsim-%s-%s-", dc, name)) + if err == nil { + m.dirs = append(m.dirs, dir) + } + return dir, err +} + +func (m *Model) createLocalDatastore(dc string, name string, hosts []*object.HostSystem) error { + ctx := context.Background() + dir, err := m.createTempDir(dc, name) + if err != nil { + return err + } + + for _, host := range hosts { + dss, err := host.ConfigManager().DatastoreSystem(ctx) + if err != nil { + return err + } + + _, err = dss.CreateLocalDatastore(ctx, name, dir) + if err != nil { + return err + } + } + + return nil +} + +// Remove cleans up items created by the Model, such as local datastore directories +func (m *Model) Remove() { + // Remove associated vm containers, if any + Map.m.Lock() + for _, obj := range Map.objects { + if vm, ok := obj.(*VirtualMachine); ok { + vm.svm.remove(SpoofContext()) + } + } + Map.m.Unlock() + + for _, dir := range m.dirs { + _ = os.RemoveAll(dir) + } +} + +// Run calls f with a Client connected to a simulator server instance, which is stopped after f returns. +func (m *Model) Run(f func(context.Context, *vim25.Client) error) error { + ctx := context.Background() + + defer m.Remove() + + if m.Service == nil { + err := m.Create() + if err != nil { + return err + } + // Only force TLS if the provided model didn't have any Service. + m.Service.TLS = new(tls.Config) + } + + m.Service.RegisterEndpoints = true + + s := m.Service.NewServer() + defer s.Close() + + c, err := govmomi.NewClient(ctx, s.URL, true) + if err != nil { + return err + } + + defer c.Logout(ctx) + + return f(ctx, c.Client) +} + +// Run calls Model.Run for each model and will panic if f returns an error. +// If no model is specified, the VPX Model is used by default. +func Run(f func(context.Context, *vim25.Client) error, model ...*Model) { + m := model + if len(m) == 0 { + m = []*Model{VPX()} + } + + for i := range m { + err := m[i].Run(f) + if err != nil { + panic(err) + } + } +} + +// Test calls Run and expects the caller propagate any errors, via testing.T for example. +func Test(f func(context.Context, *vim25.Client), model ...*Model) { + Run(func(ctx context.Context, c *vim25.Client) error { + f(ctx, c) + return nil + }, model...) +} + +// RunContainer runs a vm container with the given args +func RunContainer(ctx context.Context, c *vim25.Client, vm mo.Reference, args string) error { + obj, ok := vm.(*object.VirtualMachine) + if !ok { + obj = object.NewVirtualMachine(c, vm.Reference()) + } + + task, err := obj.PowerOff(ctx) + if err != nil { + return err + } + _ = task.Wait(ctx) // ignore InvalidPowerState if already off + + task, err = obj.Reconfigure(ctx, types.VirtualMachineConfigSpec{ + ExtraConfig: []types.BaseOptionValue{&types.OptionValue{Key: "RUN.container", Value: args}}, + }) + if err != nil { + return err + } + if err = task.Wait(ctx); err != nil { + return err + } + + task, err = obj.PowerOn(ctx) + if err != nil { + return err + } + return task.Wait(ctx) +} + +// delay sleeps according to DelayConfig. If no delay specified, returns immediately. +func (dc *DelayConfig) delay(method string) { + d := 0 + if dc.Delay > 0 { + d = dc.Delay + } + if md, ok := dc.MethodDelay[method]; ok { + d += md + } + if dc.DelayJitter > 0 { + d += int(rand.NormFloat64() * dc.DelayJitter * float64(d)) + } + if d > 0 { + //fmt.Printf("Delaying method %s %d ms\n", method, d) + time.Sleep(time.Duration(d) * time.Millisecond) + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/object.go b/vendor/github.com/vmware/govmomi/simulator/object.go new file mode 100644 index 0000000000..b08be515f7 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/object.go @@ -0,0 +1,80 @@ +/* +Copyright (c) 2017-2018 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "bytes" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" + "github.com/vmware/govmomi/vim25/xml" +) + +func SetCustomValue(ctx *Context, req *types.SetCustomValue) soap.HasFault { + body := &methods.SetCustomValueBody{} + + cfm := Map.CustomFieldsManager() + + _, field := cfm.findByNameType(req.Key, req.This.Type) + if field == nil { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "key"}) + return body + } + + res := cfm.SetField(ctx, &types.SetField{ + This: cfm.Reference(), + Entity: req.This, + Key: field.Key, + Value: req.Value, + }) + + if res.Fault() != nil { + body.Fault_ = res.Fault() + return body + } + + body.Res = &types.SetCustomValueResponse{} + return body +} + +// newUUID returns a stable UUID string based on input s +func newUUID(s string) string { + return sha1UUID(s).String() +} + +// sha1UUID returns a stable UUID based on input s +func sha1UUID(s string) uuid.UUID { + return uuid.NewSHA1(uuid.NameSpaceOID, []byte(s)) +} + +// deepCopy uses xml encode/decode to copy src to dst +func deepCopy(src, dst interface{}) { + b, err := xml.Marshal(src) + if err != nil { + panic(err) + } + + dec := xml.NewDecoder(bytes.NewReader(b)) + dec.TypeFunc = types.TypeFunc() + err = dec.Decode(dst) + if err != nil { + panic(err) + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/option_manager.go b/vendor/github.com/vmware/govmomi/simulator/option_manager.go new file mode 100644 index 0000000000..1dd1688cd6 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/option_manager.go @@ -0,0 +1,139 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/simulator/vpx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +// OptionManager is used in at least two locations for ESX: +// 1. ServiceContent.setting - this is empty on ESX and //TODO on VC +// 2. ConfigManager.advancedOption - this is where the bulk of the ESX settings are found +type OptionManager struct { + mo.OptionManager + + // mirror is an array to keep in sync with OptionManager.Settings. Necessary because we use append. + // uni-directional - changes made to the mirrored array are not reflected back to Settings + mirror *[]types.BaseOptionValue +} + +func asOptionManager(ctx *Context, obj mo.Reference) (*OptionManager, bool) { + om, ok := ctx.Map.Get(obj.Reference()).(*OptionManager) + return om, ok +} + +// NewOptionManager constructs the type. If mirror is non-nil it takes precedence over settings, and settings is ignored. +// Args: +// - ref - used to set OptionManager.Self if non-nil +// - setting - initial options, may be nil. +// - mirror - options array to keep updated with the OptionManager.Settings, may be nil. +func NewOptionManager(ref *types.ManagedObjectReference, setting []types.BaseOptionValue, mirror *[]types.BaseOptionValue) object.Reference { + s := &OptionManager{} + + s.Setting = setting + if mirror != nil { + s.mirror = mirror + s.Setting = *mirror + } + + if ref != nil { + s.Self = *ref + } + + return s +} + +// init constructs the OptionManager for ServiceContent.setting from the template directories. +// This does _not_ construct the OptionManager for ConfigManager.advancedOption. +func (m *OptionManager) init(r *Registry) { + if len(m.Setting) == 0 { + if r.IsVPX() { + m.Setting = vpx.Setting + } else { + m.Setting = esx.Setting + } + } +} + +func (m *OptionManager) QueryOptions(req *types.QueryOptions) soap.HasFault { + body := &methods.QueryOptionsBody{} + res := &types.QueryOptionsResponse{} + + for _, opt := range m.Setting { + if strings.HasPrefix(opt.GetOptionValue().Key, req.Name) { + res.Returnval = append(res.Returnval, opt) + } + } + + if len(res.Returnval) == 0 { + body.Fault_ = Fault("", &types.InvalidName{Name: req.Name}) + } else { + body.Res = res + } + + return body +} + +func (m *OptionManager) find(key string) *types.OptionValue { + for _, opt := range m.Setting { + setting := opt.GetOptionValue() + if setting.Key == key { + return setting + } + } + return nil +} + +func (m *OptionManager) UpdateOptions(req *types.UpdateOptions) soap.HasFault { + body := new(methods.UpdateOptionsBody) + + for _, change := range req.ChangedValue { + setting := change.GetOptionValue() + + // We don't currently include the entire list of default settings for ESX and vCenter, + // this prefix is currently used to test the failure path. + // Real vCenter seems to only allow new options if Key has a "config." prefix. + // TODO: consider behaving the same, which would require including 2 long lists of options in vpx.Setting and esx.Setting + if strings.HasPrefix(setting.Key, "ENOENT.") { + body.Fault_ = Fault("", &types.InvalidName{Name: setting.Key}) + return body + } + + opt := m.find(setting.Key) + if opt != nil { + // This is an existing option. + opt.Value = setting.Value + continue + } + + m.Setting = append(m.Setting, change) + if m.mirror != nil { + *m.mirror = m.Setting + } + } + + body.Res = new(types.UpdateOptionsResponse) + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/ovf_manager.go b/vendor/github.com/vmware/govmomi/simulator/ovf_manager.go new file mode 100644 index 0000000000..1ce6d860e7 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/ovf_manager.go @@ -0,0 +1,364 @@ +/* +Copyright (c) 2019-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "log" + "math" + "strconv" + "strings" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/ovf" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type OvfManager struct { + mo.OvfManager +} + +func ovfDisk(e *ovf.Envelope, diskID string) *ovf.VirtualDiskDesc { + for _, disk := range e.Disk.Disks { + if strings.HasSuffix(diskID, disk.DiskID) { + return &disk + } + } + return nil +} + +func ovfNetwork(ctx *Context, req *types.CreateImportSpec, item ovf.ResourceAllocationSettingData) types.BaseVirtualDeviceBackingInfo { + if len(item.Connection) == 0 { + return nil + } + pool := ctx.Map.Get(req.ResourcePool).(mo.Entity) + ref := ctx.Map.getEntityDatacenter(pool).defaultNetwork()[0] // Default to VM Network + c := item.Connection[0] + + for _, net := range req.Cisp.NetworkMapping { + if net.Name == c { + ref = net.Network + break + } + } + + switch obj := ctx.Map.Get(ref).(type) { + case *mo.Network: + return &types.VirtualEthernetCardNetworkBackingInfo{ + VirtualDeviceDeviceBackingInfo: types.VirtualDeviceDeviceBackingInfo{ + DeviceName: obj.Name, + }, + } + case *DistributedVirtualPortgroup: + dvs := ctx.Map.Get(*obj.Config.DistributedVirtualSwitch).(*DistributedVirtualSwitch) + return &types.VirtualEthernetCardDistributedVirtualPortBackingInfo{ + Port: types.DistributedVirtualSwitchPortConnection{ + PortgroupKey: obj.Key, + SwitchUuid: dvs.Config.GetDVSConfigInfo().Uuid, + }, + } + default: + log.Printf("ovf: unknown network type: %T", ref) + return nil + } +} + +func ovfDiskCapacity(disk *ovf.VirtualDiskDesc) int64 { + b, _ := strconv.ParseUint(disk.Capacity, 10, 64) + if disk.CapacityAllocationUnits == nil { + return int64(b) + } + c := strings.Fields(*disk.CapacityAllocationUnits) + if len(c) == 3 && c[0] == "byte" && c[1] == "*" { // "byte * 2^20" + p := strings.Split(c[2], "^") + x, _ := strconv.ParseUint(p[0], 10, 64) + if len(p) == 2 { + y, _ := strconv.ParseUint(p[1], 10, 64) + b *= uint64(math.Pow(float64(x), float64(y))) + } else { + b *= x + } + } + return int64(b / 1024) +} + +func (m *OvfManager) CreateImportSpec(ctx *Context, req *types.CreateImportSpec) soap.HasFault { + body := new(methods.CreateImportSpecBody) + + env, err := ovf.Unmarshal(strings.NewReader(req.OvfDescriptor)) + if err != nil { + body.Fault_ = Fault(err.Error(), &types.InvalidArgument{InvalidProperty: "ovfDescriptor"}) + return body + } + + ds := ctx.Map.Get(req.Datastore).(*Datastore) + path := object.DatastorePath{Datastore: ds.Name} + vapp := &types.VAppConfigSpec{} + spec := &types.VirtualMachineImportSpec{ + ConfigSpec: types.VirtualMachineConfigSpec{ + Name: req.Cisp.EntityName, + Version: esx.HardwareVersion, + GuestId: string(types.VirtualMachineGuestOsIdentifierOtherGuest), + Files: &types.VirtualMachineFileInfo{ + VmPathName: path.String(), + }, + NumCPUs: 1, + NumCoresPerSocket: 1, + MemoryMB: 32, + VAppConfig: vapp, + }, + ResPoolEntity: &req.ResourcePool, + } + + index := 0 + for i, product := range env.VirtualSystem.Product { + vapp.Product = append(vapp.Product, types.VAppProductSpec{ + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: types.ArrayUpdateOperationAdd, + }, + Info: &types.VAppProductInfo{ + Key: int32(i), + ClassId: toString(product.Class), + InstanceId: toString(product.Instance), + Name: product.Product, + Vendor: product.Vendor, + Version: product.Version, + }, + }) + + for _, p := range product.Property { + key := product.Key(p) + val := "" + + for _, m := range req.Cisp.PropertyMapping { + if m.Key == key { + val = m.Value + } + } + + vapp.Property = append(vapp.Property, types.VAppPropertySpec{ + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: types.ArrayUpdateOperationAdd, + }, + Info: &types.VAppPropertyInfo{ + Key: int32(index), + ClassId: toString(product.Class), + InstanceId: toString(product.Instance), + Id: p.Key, + Category: product.Category, + Label: toString(p.Label), + Type: p.Type, + UserConfigurable: p.UserConfigurable, + DefaultValue: toString(p.Default), + Value: val, + Description: toString(p.Description), + }, + }) + index++ + } + } + + if req.Cisp.DeploymentOption == "" && env.DeploymentOption != nil { + for _, c := range env.DeploymentOption.Configuration { + if isTrue(c.Default) { + req.Cisp.DeploymentOption = c.ID + break + } + } + } + + if os := env.VirtualSystem.OperatingSystem; len(os) != 0 { + if id := os[0].OSType; id != nil { + spec.ConfigSpec.GuestId = *id + } + } + + var device object.VirtualDeviceList + result := types.OvfCreateImportSpecResult{ + ImportSpec: spec, + } + + hw := env.VirtualSystem.VirtualHardware[0] + if vmx := hw.System.VirtualSystemType; vmx != nil { + spec.ConfigSpec.Version = *vmx + } + + ndisk := 0 + ndev := 0 + resources := make(map[string]types.BaseVirtualDevice) + + for _, item := range hw.Item { + if req.Cisp.DeploymentOption != "" && item.Configuration != nil { + if req.Cisp.DeploymentOption != *item.Configuration { + continue + } + } + + kind := func() string { + if item.ResourceSubType == nil { + return "unknown" + } + return strings.ToLower(*item.ResourceSubType) + } + + unsupported := func(err error) { + result.Error = append(result.Error, types.LocalizedMethodFault{ + Fault: &types.OvfUnsupportedType{ + Name: item.ElementName, + InstanceId: item.InstanceID, + DeviceType: int32(*item.ResourceType), + }, + LocalizedMessage: err.Error(), + }) + } + + upload := func(file ovf.File, c types.BaseVirtualDevice, n int) { + result.FileItem = append(result.FileItem, types.OvfFileItem{ + DeviceId: fmt.Sprintf("/%s/%s:%d", req.Cisp.EntityName, device.Type(c), n), + Path: file.Href, + Size: int64(file.Size), + CimType: int32(*item.ResourceType), + }) + } + + switch *item.ResourceType { + case 1: // VMCI + case 3: // Number of Virtual CPUs + spec.ConfigSpec.NumCPUs = int32(*item.VirtualQuantity) + case 4: // Memory Size + spec.ConfigSpec.MemoryMB = int64(*item.VirtualQuantity) + case 5: // IDE Controller + d, _ := device.CreateIDEController() + device = append(device, d) + resources[item.InstanceID] = d + case 6: // SCSI Controller + d, err := device.CreateSCSIController(kind()) + if err == nil { + device = append(device, d) + resources[item.InstanceID] = d + } else { + unsupported(err) + } + case 10: // Virtual Network + net := ovfNetwork(ctx, req, item) + if net != nil { + d, err := device.CreateEthernetCard(kind(), net) + if err == nil { + device = append(device, d) + } else { + unsupported(err) + } + } + case 14: // Floppy Drive + if device.PickController((*types.VirtualSIOController)(nil)) == nil { + c := &types.VirtualSIOController{} + c.Key = device.NewKey() + device = append(device, c) + } + d, err := device.CreateFloppy() + if err == nil { + device = append(device, d) + resources[item.InstanceID] = d + } else { + unsupported(err) + } + case 15: // CD/DVD + c, ok := resources[*item.Parent] + if !ok { + continue // Parent is unsupported() + } + d, _ := device.CreateCdrom(c.(*types.VirtualIDEController)) + if len(item.HostResource) != 0 { + for _, file := range env.References { + if strings.HasSuffix(item.HostResource[0], file.ID) { + path.Path = fmt.Sprintf("%s/_deviceImage%d.iso", req.Cisp.EntityName, ndev) + device.InsertIso(d, path.String()) + upload(file, d, ndev) + break + } + } + } + device = append(device, d) + ndev++ + case 17: // Virtual Disk + c, ok := resources[*item.Parent] + if !ok { + continue // Parent is unsupported() + } + path.Path = fmt.Sprintf("%s/disk-%d.vmdk", req.Cisp.EntityName, ndisk) + d := device.CreateDisk(c.(types.BaseVirtualController), ds.Reference(), path.String()) + + switch types.OvfCreateImportSpecParamsDiskProvisioningType(req.Cisp.DiskProvisioning) { + case "", + types.OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicFlat, + types.OvfCreateImportSpecParamsDiskProvisioningTypeFlat, + types.OvfCreateImportSpecParamsDiskProvisioningTypeEagerZeroedThick, + types.OvfCreateImportSpecParamsDiskProvisioningTypeThin, + types.OvfCreateImportSpecParamsDiskProvisioningTypeThick, + types.OvfCreateImportSpecParamsDiskProvisioningTypeSeSparse: + // OK + case types.OvfCreateImportSpecParamsDiskProvisioningTypeMonolithicSparse: + // results in DeviceUnsupportedForVmPlatform during import + d.VirtualDevice.Backing = new(types.VirtualDiskSparseVer2BackingInfo) + default: + result.Error = append(result.Error, types.LocalizedMethodFault{ + Fault: &types.OvfUnsupportedDiskProvisioning{ + DiskProvisioning: req.Cisp.DiskProvisioning, + }, + LocalizedMessage: "Disk provisioning type not supported: " + req.Cisp.DiskProvisioning, + }) + } + + d.VirtualDevice.DeviceInfo = &types.Description{ + Label: item.ElementName, + } + disk := ovfDisk(env, item.HostResource[0]) + for _, file := range env.References { + if file.ID == *disk.FileRef { + upload(file, d, ndisk) + break + } + } + d.CapacityInKB = ovfDiskCapacity(disk) + device = append(device, d) + ndisk++ + case 23: // USB Controller + case 24: // Video Card + default: + unsupported(fmt.Errorf("unsupported resource type: %d", *item.ResourceType)) + } + } + + spec.ConfigSpec.DeviceChange, _ = device.ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd) + + for _, p := range req.Cisp.PropertyMapping { + spec.ConfigSpec.ExtraConfig = append(spec.ConfigSpec.ExtraConfig, &types.OptionValue{ + Key: p.Key, + Value: p.Value, + }) + } + + body.Res = &types.CreateImportSpecResponse{ + Returnval: result, + } + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/performance_manager.go b/vendor/github.com/vmware/govmomi/simulator/performance_manager.go new file mode 100644 index 0000000000..c64a336c21 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/performance_manager.go @@ -0,0 +1,296 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "math/rand" + "strconv" + "strings" + "time" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/simulator/vpx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var realtimeProviderSummary = types.PerfProviderSummary{ + CurrentSupported: true, + SummarySupported: true, + RefreshRate: 20, +} + +var historicProviderSummary = types.PerfProviderSummary{ + CurrentSupported: false, + SummarySupported: true, + RefreshRate: -1, +} + +type PerformanceManager struct { + mo.PerformanceManager + vmMetrics []types.PerfMetricId + hostMetrics []types.PerfMetricId + rpMetrics []types.PerfMetricId + clusterMetrics []types.PerfMetricId + datastoreMetrics []types.PerfMetricId + datacenterMetrics []types.PerfMetricId + perfCounterIndex map[int32]types.PerfCounterInfo + metricData map[string]map[int32][]int64 +} + +func (m *PerformanceManager) init(r *Registry) { + if r.IsESX() { + m.PerfCounter = esx.PerfCounter + m.HistoricalInterval = esx.HistoricalInterval + m.hostMetrics = esx.HostMetrics + m.vmMetrics = esx.VmMetrics + m.rpMetrics = esx.ResourcePoolMetrics + m.metricData = esx.MetricData + } else { + m.PerfCounter = vpx.PerfCounter + m.HistoricalInterval = vpx.HistoricalInterval + m.hostMetrics = vpx.HostMetrics + m.vmMetrics = vpx.VmMetrics + m.rpMetrics = vpx.ResourcePoolMetrics + m.clusterMetrics = vpx.ClusterMetrics + m.datastoreMetrics = vpx.DatastoreMetrics + m.datacenterMetrics = vpx.DatacenterMetrics + m.metricData = vpx.MetricData + } + m.perfCounterIndex = make(map[int32]types.PerfCounterInfo, len(m.PerfCounter)) + for _, p := range m.PerfCounter { + m.perfCounterIndex[p.Key] = p + } +} + +func (p *PerformanceManager) QueryPerfCounter(ctx *Context, req *types.QueryPerfCounter) soap.HasFault { + body := new(methods.QueryPerfCounterBody) + body.Res = new(types.QueryPerfCounterResponse) + body.Res.Returnval = make([]types.PerfCounterInfo, len(req.CounterId)) + for i, id := range req.CounterId { + body.Res.Returnval[i] = p.perfCounterIndex[id] + } + return body +} + +func (p *PerformanceManager) QueryPerfProviderSummary(ctx *Context, req *types.QueryPerfProviderSummary) soap.HasFault { + body := new(methods.QueryPerfProviderSummaryBody) + body.Res = new(types.QueryPerfProviderSummaryResponse) + + // The entity must exist + if ctx.Map.Get(req.Entity) == nil { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "Entity", + }) + return body + } + + switch req.Entity.Type { + case "VirtualMachine", "HostSystem", "ResourcePool": + body.Res.Returnval = realtimeProviderSummary + default: + body.Res.Returnval = historicProviderSummary + } + body.Res.Returnval.Entity = req.Entity + return body +} + +func (p *PerformanceManager) buildAvailablePerfMetricsQueryResponse(ids []types.PerfMetricId, numCPU int, datastoreURL string) *types.QueryAvailablePerfMetricResponse { + r := new(types.QueryAvailablePerfMetricResponse) + r.Returnval = make([]types.PerfMetricId, 0, len(ids)) + for _, id := range ids { + switch id.Instance { + case "$cpu": + for i := 0; i < numCPU; i++ { + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: strconv.Itoa(i)}) + } + case "$physDisk": + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: datastoreURL}) + case "$file": + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: "DISKFILE"}) + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: "DELTAFILE"}) + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: "SWAPFILE"}) + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: "OTHERFILE"}) + default: + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: id.CounterId, Instance: id.Instance}) + } + } + // Add a CounterId without a corresponding PerfCounterInfo entry. See issue #2835 + r.Returnval = append(r.Returnval, types.PerfMetricId{CounterId: 10042}) + return r +} + +func (p *PerformanceManager) queryAvailablePerfMetric(entity types.ManagedObjectReference, interval int32) *types.QueryAvailablePerfMetricResponse { + switch entity.Type { + case "VirtualMachine": + vm := Map.Get(entity).(*VirtualMachine) + return p.buildAvailablePerfMetricsQueryResponse(p.vmMetrics, int(vm.Summary.Config.NumCpu), vm.Datastore[0].Value) + case "HostSystem": + host := Map.Get(entity).(*HostSystem) + return p.buildAvailablePerfMetricsQueryResponse(p.hostMetrics, int(host.Hardware.CpuInfo.NumCpuThreads), host.Datastore[0].Value) + case "ResourcePool": + return p.buildAvailablePerfMetricsQueryResponse(p.rpMetrics, 0, "") + case "ClusterComputeResource": + if interval != 20 { + return p.buildAvailablePerfMetricsQueryResponse(p.clusterMetrics, 0, "") + } + case "Datastore": + if interval != 20 { + return p.buildAvailablePerfMetricsQueryResponse(p.datastoreMetrics, 0, "") + } + case "Datacenter": + if interval != 20 { + return p.buildAvailablePerfMetricsQueryResponse(p.datacenterMetrics, 0, "") + } + } + + // Don't know how to handle this. Return empty response. + return new(types.QueryAvailablePerfMetricResponse) +} + +func (p *PerformanceManager) QueryAvailablePerfMetric(ctx *Context, req *types.QueryAvailablePerfMetric) soap.HasFault { + body := new(methods.QueryAvailablePerfMetricBody) + body.Res = p.queryAvailablePerfMetric(req.Entity, req.IntervalId) + + return body +} + +func (p *PerformanceManager) QueryPerf(ctx *Context, req *types.QueryPerf) soap.HasFault { + body := new(methods.QueryPerfBody) + body.Res = new(types.QueryPerfResponse) + body.Res.Returnval = make([]types.BasePerfEntityMetricBase, len(req.QuerySpec)) + + for i, qs := range req.QuerySpec { + // Get metric data for this entity type + metricData, ok := p.metricData[qs.Entity.Type] + if !ok { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "Entity", + }) + } + var start, end time.Time + if qs.StartTime == nil { + start = time.Now().Add(time.Duration(-365*24) * time.Hour) // Assume we have data for a year + } else { + start = *qs.StartTime + } + if qs.EndTime == nil { + end = time.Now() + } else { + end = *qs.EndTime + } + + // Generate metric series. Divide into n buckets of interval seconds + interval := qs.IntervalId + if interval == -1 || interval == 0 { + interval = 20 // TODO: Determine from entity type + } + n := 1 + int32(end.Sub(start).Seconds())/interval + if qs.MaxSample > 0 && n > qs.MaxSample { + n = qs.MaxSample + } + + metrics := new(types.PerfEntityMetric) + metrics.Entity = qs.Entity + + // Loop through each interval "tick" + metrics.SampleInfo = make([]types.PerfSampleInfo, n) + metrics.Value = make([]types.BasePerfMetricSeries, len(qs.MetricId)) + for tick := int32(0); tick < n; tick++ { + metrics.SampleInfo[tick] = types.PerfSampleInfo{Timestamp: end.Add(time.Duration(-interval*tick) * time.Second), Interval: interval} + } + + series := make([]*types.PerfMetricIntSeries, len(qs.MetricId)) + for j, mid := range qs.MetricId { + // Create list of metrics for this tick + series[j] = &types.PerfMetricIntSeries{Value: make([]int64, n)} + series[j].Id = mid + points := metricData[mid.CounterId] + offset := int64(start.Unix()) / int64(interval) + + for tick := int32(0); tick < n; tick++ { + var p int64 + + // Use sample data if we have it. Otherwise, just send 0. + if len(points) > 0 { + p = points[(offset+int64(tick))%int64(len(points))] + scale := p / 5 + if scale > 0 { + // Add some gaussian noise to make the data look more "real" + p += int64(rand.NormFloat64() * float64(scale)) + if p < 0 { + p = 0 + } + } + } else { + p = 0 + } + series[j].Value[tick] = p + } + metrics.Value[j] = series[j] + } + + if qs.Format == string(types.PerfFormatCsv) { + metricsCsv := new(types.PerfEntityMetricCSV) + metricsCsv.Entity = qs.Entity + + //PerfSampleInfo encoded in the following CSV format: [interval1], [date1], [interval2], [date2], and so on. + metricsCsv.SampleInfoCSV = sampleInfoCSV(metrics) + metricsCsv.Value = make([]types.PerfMetricSeriesCSV, len(qs.MetricId)) + + for j, mid := range qs.MetricId { + seriesCsv := &types.PerfMetricSeriesCSV{Value: ""} + seriesCsv.Id = mid + seriesCsv.Value = valueCSV(series[j]) + metricsCsv.Value[j] = *seriesCsv + } + + body.Res.Returnval[i] = metricsCsv + } else { + body.Res.Returnval[i] = metrics + } + } + return body +} + +// sampleInfoCSV converts the SampleInfo field to a CSV string +func sampleInfoCSV(m *types.PerfEntityMetric) string { + values := make([]string, len(m.SampleInfo)*2) + + i := 0 + for _, s := range m.SampleInfo { + values[i] = strconv.Itoa(int(s.Interval)) + i++ + values[i] = s.Timestamp.Format(time.RFC3339) + i++ + } + + return strings.Join(values, ",") +} + +// valueCSV converts the Value field to a CSV string +func valueCSV(s *types.PerfMetricIntSeries) string { + values := make([]string, len(s.Value)) + + for i := range s.Value { + values[i] = strconv.FormatInt(s.Value[i], 10) + } + + return strings.Join(values, ",") +} diff --git a/vendor/github.com/vmware/govmomi/simulator/portgroup.go b/vendor/github.com/vmware/govmomi/simulator/portgroup.go new file mode 100644 index 0000000000..d7b0b4d354 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/portgroup.go @@ -0,0 +1,97 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type DistributedVirtualPortgroup struct { + mo.DistributedVirtualPortgroup +} + +func (p *DistributedVirtualPortgroup) event(ctx *Context) types.DVPortgroupEvent { + dvs := ctx.Map.Get(*p.Config.DistributedVirtualSwitch).(*DistributedVirtualSwitch) + + return types.DVPortgroupEvent{ + Event: types.Event{ + Datacenter: datacenterEventArgument(p), + Net: &types.NetworkEventArgument{ + EntityEventArgument: types.EntityEventArgument{ + Name: p.Name, + }, + Network: p.Self, + }, + Dvs: dvs.eventArgument(), + }, + } +} + +func (s *DistributedVirtualPortgroup) RenameTask(ctx *Context, req *types.Rename_Task) soap.HasFault { + canDup := s.DistributedVirtualPortgroup.Config.BackingType == string(types.DistributedVirtualPortgroupBackingTypeNsx) + + return RenameTask(ctx, s, req, canDup) +} + +func (s *DistributedVirtualPortgroup) ReconfigureDVPortgroupTask(ctx *Context, req *types.ReconfigureDVPortgroup_Task) soap.HasFault { + task := CreateTask(s, "reconfigureDvPortgroup", func(t *Task) (types.AnyType, types.BaseMethodFault) { + s.Config.DefaultPortConfig = req.Spec.DefaultPortConfig + s.Config.NumPorts = req.Spec.NumPorts + s.Config.AutoExpand = req.Spec.AutoExpand + s.Config.Type = req.Spec.Type + s.Config.Description = req.Spec.Description + s.Config.DynamicData = req.Spec.DynamicData + s.Config.Name = req.Spec.Name + s.Config.Policy = req.Spec.Policy + s.Config.PortNameFormat = req.Spec.PortNameFormat + s.Config.VmVnicNetworkResourcePoolKey = req.Spec.VmVnicNetworkResourcePoolKey + s.Config.LogicalSwitchUuid = req.Spec.LogicalSwitchUuid + s.Config.BackingType = req.Spec.BackingType + + return nil, nil + }) + + return &methods.ReconfigureDVPortgroup_TaskBody{ + Res: &types.ReconfigureDVPortgroup_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (s *DistributedVirtualPortgroup) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + task := CreateTask(s, "destroy", func(t *Task) (types.AnyType, types.BaseMethodFault) { + vswitch := ctx.Map.Get(*s.Config.DistributedVirtualSwitch).(*DistributedVirtualSwitch) + ctx.Map.RemoveReference(ctx, vswitch, &vswitch.Portgroup, s.Reference()) + ctx.Map.removeString(ctx, vswitch, &vswitch.Summary.PortgroupName, s.Name) + + f := ctx.Map.getEntityParent(vswitch, "Folder").(*Folder) + folderRemoveChild(ctx, &f.Folder, s.Reference()) + ctx.postEvent(&types.DVPortgroupDestroyedEvent{DVPortgroupEvent: s.event(ctx)}) + + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } + +} diff --git a/vendor/github.com/vmware/govmomi/simulator/property_collector.go b/vendor/github.com/vmware/govmomi/simulator/property_collector.go new file mode 100644 index 0000000000..ed15dbfefe --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/property_collector.go @@ -0,0 +1,1088 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "context" + "errors" + "log" + "path" + "reflect" + "strings" + "sync" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/internal" + "github.com/vmware/govmomi/vim25" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type PropertyCollector struct { + mo.PropertyCollector + + nopLocker + pending *types.UpdateSet + updates []types.ObjectUpdate + mu sync.Mutex + cancel context.CancelFunc +} + +func NewPropertyCollector(ref types.ManagedObjectReference) object.Reference { + s := &PropertyCollector{} + s.Self = ref + return s +} + +var errMissingField = errors.New("missing field") +var errEmptyField = errors.New("empty field") +var errInvalidField = errors.New("invalid field") + +func getObject(ctx *Context, ref types.ManagedObjectReference) (reflect.Value, bool) { + var obj mo.Reference + if ctx.Session == nil { + // Even without permissions to access an object or specific fields, RetrieveProperties + // returns an ObjectContent response as long as the object exists. See retrieveResult.add() + obj = ctx.Map.Get(ref) + } else { + obj = ctx.Session.Get(ref) + } + + if obj == nil { + return reflect.Value{}, false + } + + if ctx.Session == nil && ref.Type == "SessionManager" { + // RetrieveProperties on SessionManager without a session always returns empty, + // rather than MissingSet + Fault.NotAuthenticated for each field. + obj = &mo.SessionManager{Self: ref} + } + + // For objects that use internal types that differ from that of the vim25/mo field types. + // See EventHistoryCollector for example. + type get interface { + Get() mo.Reference + } + if o, ok := obj.(get); ok { + obj = o.Get() + } + + return getManagedObject(obj), true +} + +func getManagedObject(obj mo.Reference) reflect.Value { + rval := reflect.ValueOf(obj).Elem() + rtype := rval.Type() + + // PropertyCollector is for Managed Object types only (package mo). + // If the registry object is not in the mo package, assume it is a wrapper + // type where the first field is an embedded mo type. + // We need to dig out the mo type for PropSet.All to work properly and + // for the case where the type has a field of the same name, for example: + // mo.ResourcePool.ResourcePool + for { + if path.Base(rtype.PkgPath()) == "mo" { + break + } + if rtype.Kind() != reflect.Struct || rtype.NumField() == 0 { + log.Panicf("%#v does not have an embedded mo type", obj.Reference()) + } + rval = rval.Field(0) + rtype = rval.Type() + if rtype.Kind() == reflect.Pointer { + rval = rval.Elem() + rtype = rval.Type() + } + } + + return rval +} + +// wrapValue converts slice types to the appropriate ArrayOf type used in property collector responses. +func wrapValue(rval reflect.Value, rtype reflect.Type) interface{} { + pval := rval.Interface() + + if rval.Kind() == reflect.Slice { + // Convert slice to types.ArrayOf* + switch v := pval.(type) { + case []string: + pval = &types.ArrayOfString{ + String: v, + } + case []uint8: + pval = &types.ArrayOfByte{ + Byte: v, + } + case types.ByteSlice: + pval = &types.ArrayOfByte{ + Byte: v, + } + case []int16: + pval = &types.ArrayOfShort{ + Short: v, + } + case []int32: + pval = &types.ArrayOfInt{ + Int: v, + } + case []int64: + pval = &types.ArrayOfLong{ + Long: v, + } + default: + kind := rtype.Elem().Name() + // Remove govmomi interface prefix name + kind = strings.TrimPrefix(kind, "Base") + akind, _ := defaultMapType("ArrayOf" + kind) + a := reflect.New(akind) + a.Elem().FieldByName(kind).Set(rval) + pval = a.Interface() + } + } + + return pval +} + +func fieldValueInterface(f reflect.StructField, rval reflect.Value, keyed ...bool) interface{} { + if rval.Kind() == reflect.Ptr { + rval = rval.Elem() + } + + if len(keyed) == 1 && keyed[0] { + return rval.Interface() // don't wrap keyed fields in ArrayOf* type + } + + return wrapValue(rval, f.Type) +} + +func fieldValue(rval reflect.Value, p string, keyed ...bool) (interface{}, error) { + var value interface{} + fields := strings.Split(p, ".") + + for i, name := range fields { + kind := rval.Type().Kind() + + if kind == reflect.Interface { + if rval.IsNil() { + continue + } + rval = rval.Elem() + kind = rval.Type().Kind() + } + + if kind == reflect.Ptr { + if rval.IsNil() { + continue + } + rval = rval.Elem() + } + + if kind == reflect.Slice { + // field of array field cannot be specified + return nil, errInvalidField + } + + x := ucFirst(name) + val := rval.FieldByName(x) + if !val.IsValid() { + return nil, errMissingField + } + + if isEmpty(val) { + return nil, errEmptyField + } + + if i == len(fields)-1 { + ftype, _ := rval.Type().FieldByName(x) + value = fieldValueInterface(ftype, val, keyed...) + break + } + + rval = val + } + + return value, nil +} + +func fieldValueKey(rval reflect.Value, p mo.Field) (interface{}, error) { + if rval.Kind() != reflect.Slice { + return nil, errInvalidField + } + + zero := reflect.Value{} + + for i := 0; i < rval.Len(); i++ { + item := rval.Index(i) + if item.Kind() == reflect.Interface { + item = item.Elem() + } + if item.Kind() == reflect.Ptr { + item = item.Elem() + } + if item.Kind() != reflect.Struct { + return reflect.Value{}, errInvalidField + } + + field := item.FieldByName("Key") + if field == zero { + return nil, errInvalidField + } + + switch key := field.Interface().(type) { + case string: + s, ok := p.Key.(string) + if !ok { + return nil, errInvalidField + } + if s == key { + return item.Interface(), nil + } + case int32: + s, ok := p.Key.(int32) + if !ok { + return nil, errInvalidField + } + if s == key { + return item.Interface(), nil + } + default: + return nil, errInvalidField + } + } + + return nil, nil +} + +func fieldValueIndex(rval reflect.Value, p mo.Field) (interface{}, error) { + val, err := fieldValueKey(rval, p) + if err != nil || val == nil || p.Item == "" { + return val, err + } + + return fieldValue(reflect.ValueOf(val), p.Item) +} + +func fieldRefs(f interface{}) []types.ManagedObjectReference { + switch fv := f.(type) { + case types.ManagedObjectReference: + return []types.ManagedObjectReference{fv} + case *types.ArrayOfManagedObjectReference: + return fv.ManagedObjectReference + case nil: + // empty field + } + + return nil +} + +func isEmpty(rval reflect.Value) bool { + switch rval.Kind() { + case reflect.Ptr: + return rval.IsNil() + case reflect.String: + return rval.Len() == 0 + } + + return false +} + +func isTrue(v *bool) bool { + return v != nil && *v +} + +func isFalse(v *bool) bool { + return v == nil || !*v +} + +func toString(v *string) string { + if v == nil { + return "" + } + return *v +} + +func lcFirst(s string) string { + if len(s) < 1 { + return s + } + return strings.ToLower(s[:1]) + s[1:] +} + +func ucFirst(s string) string { + if len(s) < 1 { + return s + } + return strings.ToUpper(s[:1]) + s[1:] +} + +type retrieveResult struct { + *types.RetrieveResult + req *types.RetrievePropertiesEx + collected map[types.ManagedObjectReference]bool + specs map[string]*types.TraversalSpec +} + +func (rr *retrieveResult) add(ctx *Context, name string, val types.AnyType, content *types.ObjectContent) { + if ctx.Session != nil { + content.PropSet = append(content.PropSet, types.DynamicProperty{ + Name: name, + Val: val, + }) + return + } + + content.MissingSet = append(content.MissingSet, types.MissingProperty{ + Path: name, + Fault: types.LocalizedMethodFault{Fault: &types.NotAuthenticated{ + NoPermission: types.NoPermission{ + Object: &content.Obj, + PrivilegeId: "System.Read", + }}, + }, + }) +} + +func (rr *retrieveResult) collectAll(ctx *Context, rval reflect.Value, rtype reflect.Type, content *types.ObjectContent) { + for i := 0; i < rval.NumField(); i++ { + val := rval.Field(i) + + f := rtype.Field(i) + + if isEmpty(val) || f.Name == "Self" { + continue + } + + if f.Anonymous { + // recurse into embedded field + rr.collectAll(ctx, val, f.Type, content) + continue + } + + rr.add(ctx, lcFirst(f.Name), fieldValueInterface(f, val), content) + } +} + +func (rr *retrieveResult) collectFields(ctx *Context, rval reflect.Value, fields []string, content *types.ObjectContent) { + seen := make(map[string]bool) + + for i := range content.PropSet { + seen[content.PropSet[i].Name] = true // mark any already collected via embedded field + } + + for _, name := range fields { + if seen[name] { + // rvc 'ls' includes the "name" property twice, then fails with no error message or stack trace + // in RbVmomi::VIM::ObjectContent.to_hash_uncached when it sees the 2nd "name" property. + continue + } + seen[name] = true + + var val interface{} + var err error + var field mo.Field + if field.FromString(name) { + keyed := field.Key != nil + + val, err = fieldValue(rval, field.Path, keyed) + if err == nil && keyed { + val, err = fieldValueIndex(reflect.ValueOf(val), field) + } + } else { + err = errInvalidField + } + + switch err { + case nil, errEmptyField: + rr.add(ctx, name, val, content) + case errMissingField: + content.MissingSet = append(content.MissingSet, types.MissingProperty{ + Path: name, + Fault: types.LocalizedMethodFault{Fault: &types.InvalidProperty{ + Name: name, + }}, + }) + case errInvalidField: + content.MissingSet = append(content.MissingSet, types.MissingProperty{ + Path: name, + Fault: types.LocalizedMethodFault{Fault: &types.InvalidProperty{ + Name: name, + }}, + }) + } + } +} + +func (rr *retrieveResult) collect(ctx *Context, ref types.ManagedObjectReference) { + if rr.collected[ref] { + return + } + + content := types.ObjectContent{ + Obj: ref, + } + + rval, ok := getObject(ctx, ref) + if !ok { + // Possible if a test uses ctx.Map.Remove instead of Destroy_Task + tracef("object %s no longer exists", ref) + return + } + + rtype := rval.Type() + match := false + + for _, spec := range rr.req.SpecSet { + for _, p := range spec.PropSet { + if p.Type != ref.Type && p.Type != rtype.Name() { + // e.g. ManagedEntity, ComputeResource + field, ok := rtype.FieldByName(p.Type) + + if !(ok && field.Anonymous) { + continue + } + } + match = true + if isTrue(p.All) { + rr.collectAll(ctx, rval, rtype, &content) + continue + } + + rr.collectFields(ctx, rval, p.PathSet, &content) + } + } + + if match { + // Copy while content.Obj is locked, as it won't be when final results are encoded. + var dst types.ObjectContent + deepCopy(&content, &dst) + rr.Objects = append(rr.Objects, dst) + } + + rr.collected[ref] = true +} + +func (rr *retrieveResult) selectSet(ctx *Context, obj reflect.Value, s []types.BaseSelectionSpec, refs *[]types.ManagedObjectReference) types.BaseMethodFault { + for _, ss := range s { + ts, ok := ss.(*types.TraversalSpec) + if ok { + if ts.Name != "" { + rr.specs[ts.Name] = ts + } + } + } + + for _, ss := range s { + ts, ok := ss.(*types.TraversalSpec) + if !ok { + ts = rr.specs[ss.GetSelectionSpec().Name] + if ts == nil { + return &types.InvalidArgument{InvalidProperty: "undefined TraversalSpec name"} + } + } + + f, _ := fieldValue(obj, ts.Path) + + for _, ref := range fieldRefs(f) { + if isFalse(ts.Skip) { + *refs = append(*refs, ref) + } + + rval, ok := getObject(ctx, ref) + if ok { + if err := rr.selectSet(ctx, rval, ts.SelectSet, refs); err != nil { + return err + } + } + } + } + + return nil +} + +func collect(ctx *Context, r *types.RetrievePropertiesEx) (*types.RetrieveResult, types.BaseMethodFault) { + var refs []types.ManagedObjectReference + + rr := &retrieveResult{ + RetrieveResult: &types.RetrieveResult{}, + req: r, + collected: make(map[types.ManagedObjectReference]bool), + specs: make(map[string]*types.TraversalSpec), + } + + // Select object references + for _, spec := range r.SpecSet { + for _, o := range spec.ObjectSet { + var rval reflect.Value + ok := false + ctx.WithLock(o.Obj, func() { rval, ok = getObject(ctx, o.Obj) }) + if !ok { + if isFalse(spec.ReportMissingObjectsInResults) { + return nil, &types.ManagedObjectNotFound{Obj: o.Obj} + } + continue + } + + if o.SelectSet == nil || isFalse(o.Skip) { + refs = append(refs, o.Obj) + } + + if err := rr.selectSet(ctx, rval, o.SelectSet, &refs); err != nil { + return nil, err + } + } + } + + for _, ref := range refs { + ctx.WithLock(ref, func() { rr.collect(ctx, ref) }) + } + + return rr.RetrieveResult, nil +} + +func (pc *PropertyCollector) CreateFilter(ctx *Context, c *types.CreateFilter) soap.HasFault { + body := &methods.CreateFilterBody{} + + filter := &PropertyFilter{ + pc: pc, + refs: make(map[types.ManagedObjectReference]struct{}), + } + filter.PartialUpdates = c.PartialUpdates + filter.Spec = c.Spec + + pc.Filter = append(pc.Filter, ctx.Session.Put(filter).Reference()) + + body.Res = &types.CreateFilterResponse{ + Returnval: filter.Self, + } + + ctx.Map.AddHandler(filter) + + return body +} + +func (pc *PropertyCollector) CreatePropertyCollector(ctx *Context, c *types.CreatePropertyCollector) soap.HasFault { + body := &methods.CreatePropertyCollectorBody{} + + cpc := &PropertyCollector{} + + body.Res = &types.CreatePropertyCollectorResponse{ + Returnval: ctx.Session.Put(cpc).Reference(), + } + + return body +} + +func (pc *PropertyCollector) DestroyPropertyCollector(ctx *Context, c *types.DestroyPropertyCollector) soap.HasFault { + pc.CancelWaitForUpdates(&types.CancelWaitForUpdates{This: c.This}) + + body := &methods.DestroyPropertyCollectorBody{} + + for _, ref := range pc.Filter { + ctx.Session.Remove(ctx, ref) + } + + ctx.Session.Remove(ctx, c.This) + ctx.Map.Remove(ctx, c.This) + + body.Res = &types.DestroyPropertyCollectorResponse{} + + return body +} + +var retrievePropertiesExBook sync.Map + +type retrievePropertiesExPage struct { + MaxObjects int32 + Objects []types.ObjectContent +} + +func (pc *PropertyCollector) ContinueRetrievePropertiesEx(ctx *Context, r *types.ContinueRetrievePropertiesEx) soap.HasFault { + body := &methods.ContinueRetrievePropertiesExBody{} + + if r.Token == "" { + body.Fault_ = Fault("", &types.InvalidPropertyFault{Name: "token"}) + return body + } + + obj, ok := retrievePropertiesExBook.LoadAndDelete(r.Token) + if !ok { + body.Fault_ = Fault("", &types.InvalidPropertyFault{Name: "token"}) + return body + } + + page := obj.(retrievePropertiesExPage) + + var ( + objsToStore []types.ObjectContent + objsToReturn []types.ObjectContent + ) + for i := range page.Objects { + if page.MaxObjects <= 0 || i < int(page.MaxObjects) { + objsToReturn = append(objsToReturn, page.Objects[i]) + } else { + objsToStore = append(objsToStore, page.Objects[i]) + } + } + + if len(objsToStore) > 0 { + body.Res = &types.ContinueRetrievePropertiesExResponse{} + body.Res.Returnval.Token = uuid.NewString() + retrievePropertiesExBook.Store( + body.Res.Returnval.Token, + retrievePropertiesExPage{ + MaxObjects: page.MaxObjects, + Objects: objsToStore, + }) + } + + if len(objsToReturn) > 0 { + if body.Res == nil { + body.Res = &types.ContinueRetrievePropertiesExResponse{} + } + body.Res.Returnval.Objects = objsToReturn + } + + return body +} + +func (pc *PropertyCollector) RetrievePropertiesEx(ctx *Context, r *types.RetrievePropertiesEx) soap.HasFault { + body := &methods.RetrievePropertiesExBody{} + + res, fault := collect(ctx, r) + + if fault != nil { + switch fault.(type) { + case *types.ManagedObjectNotFound: + body.Fault_ = Fault("The object has already been deleted or has not been completely created", fault) + default: + body.Fault_ = Fault("", fault) + } + } else { + objects := res.Objects[:0] + + var ( + objsToStore []types.ObjectContent + objsToReturn []types.ObjectContent + ) + for i := range res.Objects { + if r.Options.MaxObjects <= 0 || i < int(r.Options.MaxObjects) { + objsToReturn = append(objsToReturn, res.Objects[i]) + } else { + objsToStore = append(objsToStore, res.Objects[i]) + } + } + + if len(objsToStore) > 0 { + res.Token = uuid.NewString() + retrievePropertiesExBook.Store(res.Token, retrievePropertiesExPage{ + MaxObjects: r.Options.MaxObjects, + Objects: objsToStore, + }) + } + + for _, o := range objsToReturn { + propSet := o.PropSet[:0] + for _, p := range o.PropSet { + if p.Val != nil { + propSet = append(propSet, p) + } + } + o.PropSet = propSet + + objects = append(objects, o) + } + res.Objects = objects + body.Res = &types.RetrievePropertiesExResponse{ + Returnval: res, + } + } + + return body +} + +// RetrieveProperties is deprecated, but govmomi is still using it at the moment. +func (pc *PropertyCollector) RetrieveProperties(ctx *Context, r *types.RetrieveProperties) soap.HasFault { + body := &methods.RetrievePropertiesBody{} + + res := pc.RetrievePropertiesEx(ctx, &types.RetrievePropertiesEx{ + This: r.This, + SpecSet: r.SpecSet, + }) + + if res.Fault() != nil { + body.Fault_ = res.Fault() + } else { + body.Res = &types.RetrievePropertiesResponse{ + Returnval: res.(*methods.RetrievePropertiesExBody).Res.Returnval.Objects, + } + } + + return body +} + +func (pc *PropertyCollector) CancelWaitForUpdates(r *types.CancelWaitForUpdates) soap.HasFault { + pc.mu.Lock() + if pc.cancel != nil { + pc.cancel() + } + pc.mu.Unlock() + + return &methods.CancelWaitForUpdatesBody{Res: new(types.CancelWaitForUpdatesResponse)} +} + +func (pc *PropertyCollector) update(u types.ObjectUpdate) { + pc.mu.Lock() + pc.updates = append(pc.updates, u) + pc.mu.Unlock() +} + +func (pc *PropertyCollector) PutObject(o mo.Reference) { + pc.update(types.ObjectUpdate{ + Obj: o.Reference(), + Kind: types.ObjectUpdateKindEnter, + ChangeSet: nil, + }) +} + +func (pc *PropertyCollector) UpdateObject(_ *Context, o mo.Reference, changes []types.PropertyChange) { + pc.update(types.ObjectUpdate{ + Obj: o.Reference(), + Kind: types.ObjectUpdateKindModify, + ChangeSet: changes, + }) +} + +func (pc *PropertyCollector) RemoveObject(_ *Context, ref types.ManagedObjectReference) { + pc.update(types.ObjectUpdate{ + Obj: ref, + Kind: types.ObjectUpdateKindLeave, + ChangeSet: nil, + }) +} + +func (pc *PropertyCollector) apply(ctx *Context, update *types.UpdateSet) types.BaseMethodFault { + for _, ref := range pc.Filter { + filter, ok := ctx.Session.Get(ref).(*PropertyFilter) + if !ok { + continue + } + + res, fault := filter.collect(ctx) + if fault != nil { + return fault + } + + fu := types.PropertyFilterUpdate{ + Filter: ref, + } + + for _, o := range res.Objects { + if _, ok := filter.refs[o.Obj]; ok { + continue + } + filter.refs[o.Obj] = struct{}{} + ou := types.ObjectUpdate{ + Obj: o.Obj, + Kind: types.ObjectUpdateKindEnter, + } + + for _, p := range o.PropSet { + ou.ChangeSet = append(ou.ChangeSet, types.PropertyChange{ + Op: types.PropertyChangeOpAssign, + Name: p.Name, + Val: p.Val, + }) + } + + fu.ObjectSet = append(fu.ObjectSet, ou) + } + + if len(fu.ObjectSet) != 0 { + update.FilterSet = append(update.FilterSet, fu) + } + } + return nil +} + +// pageUpdateSet limits the given UpdateSet to max number of object updates. +// nil is returned when not truncated, otherwise the remaining UpdateSet. +func pageUpdateSet(update *types.UpdateSet, max int) *types.UpdateSet { + for i := range update.FilterSet { + set := update.FilterSet[i].ObjectSet + n := len(set) + if n+1 > max { + update.Truncated = types.NewBool(true) + f := types.PropertyFilterUpdate{ + Filter: update.FilterSet[i].Filter, + ObjectSet: update.FilterSet[i].ObjectSet[max:], + } + update.FilterSet[i].ObjectSet = update.FilterSet[i].ObjectSet[:max] + + pending := &types.UpdateSet{ + Version: "P", + FilterSet: []types.PropertyFilterUpdate{f}, + } + + if len(update.FilterSet) > i { + pending.FilterSet = append(pending.FilterSet, update.FilterSet[i+1:]...) + update.FilterSet = update.FilterSet[:i+1] + } + + return pending + } + max -= n + } + return nil +} + +// WaitOptions.maxObjectUpdates says: +// > PropertyCollector policy may still limit the total count +// > to something less than maxObjectUpdates. +// Seems to be "may" == "will" and the default max is 100. +const defaultMaxObjectUpdates = 100 // vCenter's default + +func (pc *PropertyCollector) WaitForUpdatesEx(ctx *Context, r *types.WaitForUpdatesEx) soap.HasFault { + wait, cancel := context.WithCancel(context.Background()) + oneUpdate := false + maxObject := defaultMaxObjectUpdates + if r.Options != nil { + if max := r.Options.MaxWaitSeconds; max != nil { + // A value of 0 causes WaitForUpdatesEx to do one update calculation and return any results. + oneUpdate = (*max == 0) + if *max > 0 { + wait, cancel = context.WithTimeout(context.Background(), time.Second*time.Duration(*max)) + } + } + if max := r.Options.MaxObjectUpdates; max > 0 && max < defaultMaxObjectUpdates { + maxObject = int(max) + } + } + pc.mu.Lock() + pc.cancel = cancel + pc.mu.Unlock() + + body := &methods.WaitForUpdatesExBody{} + + set := &types.UpdateSet{ + Version: r.Version, + } + + body.Res = &types.WaitForUpdatesExResponse{ + Returnval: set, + } + + if pc.pending != nil { + body.Res.Returnval = pc.pending + pc.pending = pageUpdateSet(body.Res.Returnval, maxObject) + return body + } + + apply := func() bool { + if fault := pc.apply(ctx, set); fault != nil { + body.Fault_ = Fault("", fault) + body.Res = nil + return false + } + return true + } + + if r.Version == "" { + ctx.Map.AddHandler(pc) // Listen for create, update, delete of managed objects + apply() // Collect current state + set.Version = "-" // Next request with Version set will wait via loop below + if body.Res != nil { + pc.pending = pageUpdateSet(body.Res.Returnval, maxObject) + } + return body + } + + ticker := time.NewTicker(20 * time.Millisecond) // allow for updates to accumulate + defer ticker.Stop() + // Start the wait loop, returning on one of: + // - Client calls CancelWaitForUpdates + // - MaxWaitSeconds was specified and has been exceeded + // - We have updates to send to the client + for { + select { + case <-wait.Done(): + body.Res.Returnval = nil + switch wait.Err() { + case context.Canceled: + tracef("%s: WaitForUpdates canceled", pc.Self) + body.Fault_ = Fault("", new(types.RequestCanceled)) // CancelWaitForUpdates was called + body.Res = nil + case context.DeadlineExceeded: + tracef("%s: WaitForUpdates MaxWaitSeconds exceeded", pc.Self) + } + + return body + case <-ticker.C: + pc.mu.Lock() + updates := pc.updates + pc.updates = nil // clear updates collected by the managed object CRUD listeners + pc.mu.Unlock() + if len(updates) == 0 { + if oneUpdate { + body.Res.Returnval = nil + return body + } + continue + } + + tracef("%s: applying %d updates to %d filters", pc.Self, len(updates), len(pc.Filter)) + + for _, f := range pc.Filter { + filter := ctx.Session.Get(f).(*PropertyFilter) + filter.update(ctx) + fu := types.PropertyFilterUpdate{Filter: f} + + for _, update := range updates { + switch update.Kind { + case types.ObjectUpdateKindEnter: // Create + if !apply() { + return body + } + case types.ObjectUpdateKindModify: // Update + tracef("%s has %d changes", update.Obj, len(update.ChangeSet)) + if !apply() { // An update may apply to collector traversal specs + return body + } + if _, ok := filter.refs[update.Obj]; ok { + // This object has already been applied by the filter, + // now check if the property spec applies for this update. + update = filter.apply(ctx, update) + if len(update.ChangeSet) != 0 { + fu.ObjectSet = append(fu.ObjectSet, update) + } + } + case types.ObjectUpdateKindLeave: // Delete + if _, ok := filter.refs[update.Obj]; !ok { + continue + } + delete(filter.refs, update.Obj) + fu.ObjectSet = append(fu.ObjectSet, update) + } + } + + if len(fu.ObjectSet) != 0 { + set.FilterSet = append(set.FilterSet, fu) + } + } + if len(set.FilterSet) != 0 { + pc.pending = pageUpdateSet(body.Res.Returnval, maxObject) + return body + } + if oneUpdate { + body.Res.Returnval = nil + return body + } + } + } +} + +// WaitForUpdates is deprecated, but pyvmomi is still using it at the moment. +func (pc *PropertyCollector) WaitForUpdates(ctx *Context, r *types.WaitForUpdates) soap.HasFault { + body := &methods.WaitForUpdatesBody{} + + res := pc.WaitForUpdatesEx(ctx, &types.WaitForUpdatesEx{ + This: r.This, + Version: r.Version, + }) + + if res.Fault() != nil { + body.Fault_ = res.Fault() + } else { + body.Res = &types.WaitForUpdatesResponse{ + Returnval: *res.(*methods.WaitForUpdatesExBody).Res.Returnval, + } + } + + return body +} + +// Fetch is not documented in the vSphere SDK, but ovftool depends on it. +// A Fetch request is converted to a RetrievePropertiesEx method call by vcsim. +func (pc *PropertyCollector) Fetch(ctx *Context, req *internal.Fetch) soap.HasFault { + body := new(internal.FetchBody) + + if req.This == vim25.ServiceInstance && req.Prop == "content" { + content := ctx.Map.content() + // ovftool uses API version for 6.0 and fails when these fields are non-nil; TODO + content.VStorageObjectManager = nil + content.HostProfileManager = nil + content.HostSpecManager = nil + content.CryptoManager = nil + content.HostProfileManager = nil + content.HealthUpdateManager = nil + content.FailoverClusterConfigurator = nil + content.FailoverClusterManager = nil + body.Res = &internal.FetchResponse{ + Returnval: content, + } + return body + } + + if ctx.Map.Get(req.This) == nil { + // The Fetch method supports use of super class types, this is a quick hack to support the cases used by ovftool + switch req.This.Type { + case "ManagedEntity": + for o := range ctx.Map.objects { + if o.Value == req.This.Value { + req.This.Type = o.Type + break + } + } + case "ComputeResource": + req.This.Type = "Cluster" + req.This.Type + } + } + + res := pc.RetrievePropertiesEx(ctx, &types.RetrievePropertiesEx{ + SpecSet: []types.PropertyFilterSpec{{ + PropSet: []types.PropertySpec{{ + Type: req.This.Type, + PathSet: []string{req.Prop}, + }}, + ObjectSet: []types.ObjectSpec{{ + Obj: req.This, + }}, + }}}) + + if res.Fault() != nil { + return res + } + + obj := res.(*methods.RetrievePropertiesExBody).Res.Returnval.Objects[0] + if len(obj.PropSet) == 0 { + if len(obj.MissingSet) > 0 { + fault := obj.MissingSet[0].Fault + body.Fault_ = Fault(fault.LocalizedMessage, fault.Fault) + return body + } + return res + } + + body.Res = &internal.FetchResponse{ + Returnval: obj.PropSet[0].Val, + } + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/property_filter.go b/vendor/github.com/vmware/govmomi/simulator/property_filter.go new file mode 100644 index 0000000000..e69446acb4 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/property_filter.go @@ -0,0 +1,162 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "reflect" + "strings" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type PropertyFilter struct { + mo.PropertyFilter + + pc *PropertyCollector + refs map[types.ManagedObjectReference]struct{} + sync bool +} + +func (f *PropertyFilter) UpdateObject(ctx *Context, o mo.Reference, changes []types.PropertyChange) { + // A PropertyFilter's traversal spec is "applied" on the initial call to WaitForUpdates, + // with matching objects tracked in the `refs` field. + // New and deleted objects matching the filter are accounted for within PropertyCollector. + // But when an object used for the traversal itself is updated (e.g. ListView), + // we need to update the tracked `refs` on the next call to WaitForUpdates. + ref := o.Reference() + + for _, set := range f.Spec.ObjectSet { + if set.Obj == ref && len(set.SelectSet) != 0 { + ctx.WithLock(f, func() { f.sync = true }) + break + } + } +} + +func (_ *PropertyFilter) PutObject(_ mo.Reference) {} + +func (_ *PropertyFilter) RemoveObject(_ *Context, _ types.ManagedObjectReference) {} + +func (f *PropertyFilter) DestroyPropertyFilter(ctx *Context, c *types.DestroyPropertyFilter) soap.HasFault { + body := &methods.DestroyPropertyFilterBody{} + + RemoveReference(&f.pc.Filter, c.This) + + ctx.Session.Remove(ctx, c.This) + + body.Res = &types.DestroyPropertyFilterResponse{} + + return body +} + +func (f *PropertyFilter) collect(ctx *Context) (*types.RetrieveResult, types.BaseMethodFault) { + req := &types.RetrievePropertiesEx{ + SpecSet: []types.PropertyFilterSpec{f.Spec}, + } + return collect(ctx, req) +} + +func (f *PropertyFilter) update(ctx *Context) { + ctx.WithLock(f, func() { + if f.sync { + f.sync = false + clear(f.refs) + _, _ = f.collect(ctx) + } + }) +} + +// matches returns true if the change matches one of the filter Spec.PropSet +func (f *PropertyFilter) matches(ctx *Context, ref types.ManagedObjectReference, change *types.PropertyChange) bool { + var kind reflect.Type + + for _, p := range f.Spec.PropSet { + if p.Type != ref.Type { + if kind == nil { + kind = getManagedObject(ctx.Map.Get(ref)).Type() + } + // e.g. ManagedEntity, ComputeResource + field, ok := kind.FieldByName(p.Type) + if !(ok && field.Anonymous) { + continue + } + } + + if isTrue(p.All) { + return true + } + + for _, name := range p.PathSet { + if name == change.Name { + return true + } + + var field mo.Field + if field.FromString(name) && field.Item != "" { + // "field[key].item" -> "field[key]" + item := field.Item + field.Item = "" + if field.String() == change.Name { + change.Name = name + change.Val, _ = fieldValue(reflect.ValueOf(change.Val), item) + return true + } + } + + if field.FromString(change.Name) && field.Key != nil { + continue // case below does not apply to property index + } + + // strings.HasPrefix("runtime.powerState", "runtime") == parent field matches + if strings.HasPrefix(change.Name, name) { + if obj := ctx.Map.Get(ref); obj != nil { // object may have since been deleted + change.Name = name + change.Val, _ = fieldValue(reflect.ValueOf(obj), name) + } + + return true + } + } + } + + return false +} + +// apply the PropertyFilter.Spec to the given ObjectUpdate +func (f *PropertyFilter) apply(ctx *Context, change types.ObjectUpdate) types.ObjectUpdate { + parents := make(map[string]bool) + set := change.ChangeSet + change.ChangeSet = nil + + for i, p := range set { + if f.matches(ctx, change.Obj, &p) { + if p.Name != set[i].Name { + // update matches a parent field from the spec. + if parents[p.Name] { + continue // only return 1 instance of the parent + } + parents[p.Name] = true + } + change.ChangeSet = append(change.ChangeSet, p) + } + } + + return change +} diff --git a/vendor/github.com/vmware/govmomi/simulator/registry.go b/vendor/github.com/vmware/govmomi/simulator/registry.go new file mode 100644 index 0000000000..8fbfea1834 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/registry.go @@ -0,0 +1,690 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "encoding/json" + "fmt" + "log" + "os" + "reflect" + "strings" + "sync" + "sync/atomic" + + "github.com/vmware/govmomi/simulator/internal" + "github.com/vmware/govmomi/vim25" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +// This is a map from a reference type name to a reference value name prefix. +// It's a convention that VirtualCenter follows. The map is not complete, but +// it should cover the most popular objects. +var refValueMap = map[string]string{ + "DistributedVirtualPortgroup": "dvportgroup", + "EnvironmentBrowser": "envbrowser", + "HostSystem": "host", + "ResourcePool": "resgroup", + "VirtualMachine": "vm", + "VirtualMachineSnapshot": "snapshot", + "VmwareDistributedVirtualSwitch": "dvs", + "DistributedVirtualSwitch": "dvs", + "ClusterComputeResource": "domain-c", + "Folder": "group", + "StoragePod": "group-p", +} + +// Map is the default Registry instance. +// +// TODO/WIP: To support the eventual removal of this unsyncronized global +// variable, the Map should be accessed through any Context.Map that is passed +// in to functions that may need it. +var Map = NewRegistry() + +// RegisterObject interface supports callbacks when objects are created, updated and deleted from the Registry +type RegisterObject interface { + mo.Reference + PutObject(mo.Reference) + UpdateObject(*Context, mo.Reference, []types.PropertyChange) + RemoveObject(*Context, types.ManagedObjectReference) +} + +// Registry manages a map of mo.Reference objects +type Registry struct { + counter int64 // Keep first to ensure 64-bit alignment + m sync.Mutex + objects map[types.ManagedObjectReference]mo.Reference + handlers map[types.ManagedObjectReference]RegisterObject + locks map[types.ManagedObjectReference]*internal.ObjectLock + + Namespace string + Path string + Handler func(*Context, *Method) (mo.Reference, types.BaseMethodFault) + + tagManager tagManager +} + +// tagManager is an interface to simplify internal interaction with the vapi tag manager simulator. +type tagManager interface { + AttachedObjects(types.VslmTagEntry) ([]types.ManagedObjectReference, types.BaseMethodFault) + AttachedTags(id types.ManagedObjectReference) ([]types.VslmTagEntry, types.BaseMethodFault) + AttachTag(types.ManagedObjectReference, types.VslmTagEntry) types.BaseMethodFault + DetachTag(types.ManagedObjectReference, types.VslmTagEntry) types.BaseMethodFault +} + +// NewRegistry creates a new instances of Registry +func NewRegistry() *Registry { + r := &Registry{ + objects: make(map[types.ManagedObjectReference]mo.Reference), + handlers: make(map[types.ManagedObjectReference]RegisterObject), + locks: make(map[types.ManagedObjectReference]*internal.ObjectLock), + + Namespace: vim25.Namespace, + Path: vim25.Path, + } + + return r +} + +func (r *Registry) typeFunc(name string) (reflect.Type, bool) { + if r.Namespace != "" && r.Namespace != vim25.Namespace { + if kind, ok := defaultMapType(r.Namespace + ":" + name); ok { + return kind, ok + } + } + return defaultMapType(name) +} + +// typeName returns the type of the given object. +func typeName(item mo.Reference) string { + return reflect.TypeOf(item).Elem().Name() +} + +// valuePrefix returns the value name prefix of a given object +func valuePrefix(typeName string) string { + v, ok := refValueMap[typeName] + if ok { + if strings.Contains(v, "-") { + return v + } + } else { + v = strings.ToLower(typeName) + } + + return v + "-" +} + +// newReference returns a new MOR, where Type defaults to type of the given item +// and Value defaults to a unique id for the given type. +func (r *Registry) newReference(item mo.Reference) types.ManagedObjectReference { + ref := item.Reference() + + if ref.Type == "" { + ref.Type = typeName(item) + } + + if ref.Value == "" { + n := atomic.AddInt64(&r.counter, 1) + ref.Value = fmt.Sprintf("%s%d", valuePrefix(ref.Type), n) + } + + return ref +} + +func (r *Registry) setReference(item mo.Reference, ref types.ManagedObjectReference) { + // mo.Reference() returns a value, not a pointer so use reflect to set the Self field + reflect.ValueOf(item).Elem().FieldByName("Self").Set(reflect.ValueOf(ref)) +} + +// AddHandler adds a RegisterObject handler to the Registry. +func (r *Registry) AddHandler(h RegisterObject) { + r.m.Lock() + r.handlers[h.Reference()] = h + r.m.Unlock() +} + +// RemoveHandler removes a RegisterObject handler from the Registry. +func (r *Registry) RemoveHandler(h RegisterObject) { + r.m.Lock() + delete(r.handlers, h.Reference()) + r.m.Unlock() +} + +// NewEntity sets Entity().Self with a new, unique Value. +// Useful for creating object instances from templates. +func (r *Registry) NewEntity(item mo.Entity) mo.Entity { + e := item.Entity() + e.Self.Value = "" + e.Self = r.newReference(item) + return item +} + +// PutEntity sets item.Parent to that of parent.Self before adding item to the Registry. +func (r *Registry) PutEntity(parent mo.Entity, item mo.Entity) mo.Entity { + e := item.Entity() + + if parent != nil { + e.Parent = &parent.Entity().Self + } + + r.Put(item) + + return item +} + +// Get returns the object for the given reference. +func (r *Registry) Get(ref types.ManagedObjectReference) mo.Reference { + r.m.Lock() + defer r.m.Unlock() + + return r.objects[ref] +} + +// Any returns the first instance of entity type specified by kind. +func (r *Registry) Any(kind string) mo.Entity { + r.m.Lock() + defer r.m.Unlock() + + for ref, val := range r.objects { + if ref.Type == kind { + return val.(mo.Entity) + } + } + + return nil +} + +// All returns all entities of type specified by kind. +// If kind is empty - all entities will be returned. +func (r *Registry) All(kind string) []mo.Entity { + r.m.Lock() + defer r.m.Unlock() + + var entities []mo.Entity + for ref, val := range r.objects { + if kind == "" || ref.Type == kind { + if e, ok := val.(mo.Entity); ok { + entities = append(entities, e) + } + } + } + + return entities +} + +// AllReference returns all mo.Reference objects of type specified by kind. +// If kind is empty - all objects will be returned. +func (r *Registry) AllReference(kind string) []mo.Reference { + r.m.Lock() + defer r.m.Unlock() + + var objs []mo.Reference + for ref, val := range r.objects { + if kind == "" || ref.Type == kind { + objs = append(objs, val) + } + } + + return objs +} + +// applyHandlers calls the given func for each r.handlers +func (r *Registry) applyHandlers(f func(o RegisterObject)) { + r.m.Lock() + handlers := make([]RegisterObject, 0, len(r.handlers)) + for _, handler := range r.handlers { + handlers = append(handlers, handler) + } + r.m.Unlock() + + for i := range handlers { + f(handlers[i]) + } +} + +func (r *Registry) reference(item mo.Reference) types.ManagedObjectReference { + ref := item.Reference() + if ref.Type == "" || ref.Value == "" { + ref = r.newReference(item) + r.setReference(item, ref) + } + return ref +} + +// Put adds a new object to Registry, generating a ManagedObjectReference if not already set. +func (r *Registry) Put(item mo.Reference) mo.Reference { + r.m.Lock() + + if me, ok := item.(mo.Entity); ok { + me.Entity().ConfigStatus = types.ManagedEntityStatusGreen + me.Entity().OverallStatus = types.ManagedEntityStatusGreen + me.Entity().EffectiveRole = []int32{-1} // Admin + } + + r.objects[r.reference(item)] = item + + r.m.Unlock() + + r.applyHandlers(func(o RegisterObject) { + o.PutObject(item) + }) + + return item +} + +// Remove removes an object from the Registry. +func (r *Registry) Remove(ctx *Context, item types.ManagedObjectReference) { + r.applyHandlers(func(o RegisterObject) { + o.RemoveObject(ctx, item) + }) + + r.m.Lock() + delete(r.objects, item) + delete(r.handlers, item) + delete(r.locks, item) + r.m.Unlock() +} + +// Update dispatches object property changes to RegisterObject handlers, +// such as any PropertyCollector instances with in-progress WaitForUpdates calls. +// The changes are also applied to the given object via mo.ApplyPropertyChange, +// so there is no need to set object fields directly. +func (r *Registry) Update(ctx *Context, obj mo.Reference, changes []types.PropertyChange) { + for i := range changes { + if changes[i].Op == "" { + changes[i].Op = types.PropertyChangeOpAssign + } + if changes[i].Val != nil { + rval := reflect.ValueOf(changes[i].Val) + changes[i].Val = wrapValue(rval, rval.Type()) + } + } + + val := getManagedObject(obj).Addr().Interface().(mo.Reference) + + mo.ApplyPropertyChange(val, changes) + + r.applyHandlers(func(o RegisterObject) { + o.UpdateObject(ctx, val, changes) + }) +} + +func (r *Registry) AtomicUpdate(ctx *Context, obj mo.Reference, changes []types.PropertyChange) { + r.WithLock(ctx, obj, func() { + ctx.Update(obj, changes) + }) +} + +// getEntityParent traverses up the inventory and returns the first object of type kind. +// If no object of type kind is found, the method will panic when it reaches the +// inventory root Folder where the Parent field is nil. +func (r *Registry) getEntityParent(item mo.Entity, kind string) mo.Entity { + var ok bool + for { + parent := item.Entity().Parent + + item, ok = r.Get(*parent).(mo.Entity) + if !ok { + return nil + } + if item.Reference().Type == kind { + return item + } + } +} + +// getEntityDatacenter returns the Datacenter containing the given item +func (r *Registry) getEntityDatacenter(item mo.Entity) *Datacenter { + dc, ok := r.getEntityParent(item, "Datacenter").(*Datacenter) + if ok { + return dc + } + return nil +} + +func (r *Registry) getEntityFolder(item mo.Entity, kind string) *mo.Folder { + dc := r.getEntityDatacenter(item) + + var ref types.ManagedObjectReference + + switch kind { + case "datastore": + ref = dc.DatastoreFolder + } + + folder, _ := asFolderMO(r.Get(ref)) + + // If Model was created with Folder option, use that Folder; else use top-level folder + for _, child := range folder.ChildEntity { + if child.Type == "Folder" { + folder, _ = asFolderMO(r.Get(child)) + break + } + } + + return folder +} + +// getEntityComputeResource returns the ComputeResource parent for the given item. +// A ResourcePool for example may have N Parents of type ResourcePool, but the top +// most Parent pool is always a ComputeResource child. +func (r *Registry) getEntityComputeResource(item mo.Entity) mo.Entity { + for { + parent := item.Entity().Parent + + item = r.Get(*parent).(mo.Entity) + + switch item.Reference().Type { + case "ComputeResource": + return item + case "ClusterComputeResource": + return item + } + } +} + +func entityName(e mo.Entity) string { + name := e.Entity().Name + if name != "" { + return name + } + + obj := getManagedObject(e).Addr().Interface() + + // The types below have their own 'Name' field, so ManagedEntity.Name (me.Name) is empty. + // See also mo.Ancestors + switch x := obj.(type) { + case *mo.Network: + return x.Name + case *mo.DistributedVirtualSwitch: + return x.Name + case *mo.DistributedVirtualPortgroup: + return x.Name + case *mo.OpaqueNetwork: + return x.Name + } + + log.Panicf("%T object %s does not have a Name", obj, e.Reference()) + return name +} + +// FindByName returns the first mo.Entity of the given refs whose Name field is equal to the given name. +// If there is no match, nil is returned. +// This method is useful for cases where objects are required to have a unique name, such as Datastore with +// a HostStorageSystem or HostSystem within a ClusterComputeResource. +func (r *Registry) FindByName(name string, refs []types.ManagedObjectReference) mo.Entity { + for _, ref := range refs { + if e, ok := r.Get(ref).(mo.Entity); ok { + if name == entityName(e) { + return e + } + } + } + + return nil +} + +// FindReference returns the 1st match found in refs, or nil if not found. +func FindReference(refs []types.ManagedObjectReference, match ...types.ManagedObjectReference) *types.ManagedObjectReference { + for _, ref := range refs { + for _, m := range match { + if ref == m { + return &ref + } + } + } + + return nil +} + +// AppendReference appends the given refs to field. +func (r *Registry) AppendReference(ctx *Context, obj mo.Reference, field *[]types.ManagedObjectReference, ref ...types.ManagedObjectReference) { + r.WithLock(ctx, obj, func() { + *field = append(*field, ref...) + }) +} + +// AddReference appends ref to field if not already in the given field. +func (r *Registry) AddReference(ctx *Context, obj mo.Reference, field *[]types.ManagedObjectReference, ref types.ManagedObjectReference) { + r.WithLock(ctx, obj, func() { + if FindReference(*field, ref) == nil { + *field = append(*field, ref) + } + }) +} + +// RemoveReference removes ref from the given field. +func RemoveReference(field *[]types.ManagedObjectReference, ref types.ManagedObjectReference) { + for i, r := range *field { + if r == ref { + *field = append((*field)[:i], (*field)[i+1:]...) + break + } + } +} + +// RemoveReference removes ref from the given field. +func (r *Registry) RemoveReference(ctx *Context, obj mo.Reference, field *[]types.ManagedObjectReference, ref types.ManagedObjectReference) { + r.WithLock(ctx, obj, func() { + RemoveReference(field, ref) + }) +} + +func (r *Registry) removeString(ctx *Context, obj mo.Reference, field *[]string, val string) { + r.WithLock(ctx, obj, func() { + for i, name := range *field { + if name == val { + *field = append((*field)[:i], (*field)[i+1:]...) + break + } + } + }) +} + +func (r *Registry) content() types.ServiceContent { + return r.Get(vim25.ServiceInstance).(*ServiceInstance).Content +} + +// IsESX returns true if this Registry maps an ESX model +func (r *Registry) IsESX() bool { + return r.content().About.ApiType == "HostAgent" +} + +// IsVPX returns true if this Registry maps a VPX model +func (r *Registry) IsVPX() bool { + return !r.IsESX() +} + +// SearchIndex returns the SearchIndex singleton +func (r *Registry) SearchIndex() *SearchIndex { + return r.Get(r.content().SearchIndex.Reference()).(*SearchIndex) +} + +// AlarmManager returns the AlarmManager singleton +func (r *Registry) AlarmManager() *AlarmManager { + ref := r.content().AlarmManager + if ref == nil { + return nil // ESX + } + return r.Get(*ref).(*AlarmManager) +} + +// EventManager returns the EventManager singleton +func (r *Registry) EventManager() *EventManager { + return r.Get(r.content().EventManager.Reference()).(*EventManager) +} + +// FileManager returns the FileManager singleton +func (r *Registry) FileManager() *FileManager { + return r.Get(r.content().FileManager.Reference()).(*FileManager) +} + +// CryptoManager returns the CryptoManagerKmip singleton +func (r *Registry) CryptoManager() *CryptoManagerKmip { + return r.Get(r.content().CryptoManager.Reference()).(*CryptoManagerKmip) +} + +type VirtualDiskManagerInterface interface { + mo.Reference + MO() mo.VirtualDiskManager + CreateVirtualDiskTask(*Context, *types.CreateVirtualDisk_Task) soap.HasFault + DeleteVirtualDiskTask(*Context, *types.DeleteVirtualDisk_Task) soap.HasFault + MoveVirtualDiskTask(*Context, *types.MoveVirtualDisk_Task) soap.HasFault + CopyVirtualDiskTask(*Context, *types.CopyVirtualDisk_Task) soap.HasFault + QueryVirtualDiskUuid(*Context, *types.QueryVirtualDiskUuid) soap.HasFault + SetVirtualDiskUuid(*Context, *types.SetVirtualDiskUuid) soap.HasFault +} + +// VirtualDiskManager returns the VirtualDiskManager singleton +func (r *Registry) VirtualDiskManager() VirtualDiskManagerInterface { + return r.Get(r.content().VirtualDiskManager.Reference()).(VirtualDiskManagerInterface) +} + +// ViewManager returns the ViewManager singleton +func (r *Registry) ViewManager() *ViewManager { + return r.Get(r.content().ViewManager.Reference()).(*ViewManager) +} + +// UserDirectory returns the UserDirectory singleton +func (r *Registry) UserDirectory() *UserDirectory { + return r.Get(r.content().UserDirectory.Reference()).(*UserDirectory) +} + +// SessionManager returns the SessionManager singleton +func (r *Registry) SessionManager() *SessionManager { + return r.Get(r.content().SessionManager.Reference()).(*SessionManager) +} + +// OptionManager returns the OptionManager singleton +func (r *Registry) OptionManager() *OptionManager { + return r.Get(r.content().Setting.Reference()).(*OptionManager) +} + +// CustomFieldsManager returns CustomFieldsManager singleton +func (r *Registry) CustomFieldsManager() *CustomFieldsManager { + return r.Get(r.content().CustomFieldsManager.Reference()).(*CustomFieldsManager) +} + +// TenantManager returns TenantManager singleton +func (r *Registry) TenantManager() *TenantManager { + return r.Get(r.content().TenantManager.Reference()).(*TenantManager) +} + +// VmCompatibilityChecker returns VmCompatibilityChecker singleton +func (r *Registry) VmCompatibilityChecker() *VmCompatibilityChecker { + return r.Get(r.content().VmCompatibilityChecker.Reference()).(*VmCompatibilityChecker) +} + +// VmProvisioningChecker returns VmProvisioningChecker singleton +func (r *Registry) VmProvisioningChecker() *VmProvisioningChecker { + return r.Get(r.content().VmProvisioningChecker.Reference()).(*VmProvisioningChecker) +} + +// ExtensionManager returns the ExtensionManager singleton +func (r *Registry) ExtensionManager() *ExtensionManager { + return r.Get(r.content().ExtensionManager.Reference()).(*ExtensionManager) +} + +func (r *Registry) MarshalJSON() ([]byte, error) { + r.m.Lock() + defer r.m.Unlock() + + vars := struct { + Objects int `json:"objects"` + Locks int `json:"locks"` + }{ + len(r.objects), + len(r.locks), + } + + return json.Marshal(vars) +} + +func (r *Registry) locker(obj mo.Reference) *internal.ObjectLock { + var ref types.ManagedObjectReference + + switch x := obj.(type) { + case types.ManagedObjectReference: + ref = x + obj = r.Get(ref) // to check for sync.Locker + case *types.ManagedObjectReference: + ref = *x + obj = r.Get(ref) // to check for sync.Locker + default: + // Use of obj.Reference() may cause a read race, prefer the mo 'Self' field to avoid this + self := reflect.ValueOf(obj).Elem().FieldByName("Self") + if self.IsValid() { + ref = self.Interface().(types.ManagedObjectReference) + } else { + ref = obj.Reference() + } + } + + if mu, ok := obj.(sync.Locker); ok { + // Objects that opt out of default locking are responsible for + // implementing their own lock sharing, if needed. Returning + // nil as heldBy means that WithLock will call Lock/Unlock + // every time. + return internal.NewObjectLock(mu) + } + + r.m.Lock() + mu, ok := r.locks[ref] + if !ok { + mu = internal.NewObjectLock(new(sync.Mutex)) + r.locks[ref] = mu + } + r.m.Unlock() + + return mu +} + +var enableLocker = os.Getenv("VCSIM_LOCKER") != "false" + +// WithLock holds a lock for the given object while then given function is run. +func (r *Registry) WithLock(onBehalfOf *Context, obj mo.Reference, f func()) { + unlock := r.AcquireLock(onBehalfOf, obj) + f() + unlock() +} + +// AcquireLock acquires the lock for onBehalfOf then returns. The lock MUST be +// released by calling the returned function. WithLock should be preferred +// wherever possible. +func (r *Registry) AcquireLock(onBehalfOf *Context, obj mo.Reference) func() { + if onBehalfOf == nil { + panic(fmt.Sprintf("Attempt to lock %v with nil onBehalfOf", obj)) + } + + if !enableLocker { + return func() {} + } + + l := r.locker(obj) + l.Acquire(onBehalfOf) + return func() { + l.Release(onBehalfOf) + } +} + +// nopLocker can be embedded to opt-out of auto-locking (see Registry.WithLock) +type nopLocker struct{} + +func (*nopLocker) Lock() {} +func (*nopLocker) Unlock() {} diff --git a/vendor/github.com/vmware/govmomi/simulator/resource_pool.go b/vendor/github.com/vmware/govmomi/simulator/resource_pool.go new file mode 100644 index 0000000000..0ecd6f6f03 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/resource_pool.go @@ -0,0 +1,536 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "net/url" + "path" + "strings" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type ResourcePool struct { + mo.ResourcePool +} + +func asResourcePoolMO(obj mo.Reference) (*mo.ResourcePool, bool) { + rp, ok := getManagedObject(obj).Addr().Interface().(*mo.ResourcePool) + return rp, ok +} + +func resourcePoolHosts(ctx *Context, pool *ResourcePool) []types.ManagedObjectReference { + switch owner := ctx.Map.Get(pool.Owner).(type) { + case *ClusterComputeResource: + return owner.Host + case *mo.ComputeResource: + return owner.Host + default: + return nil + } +} + +func NewResourcePool() *ResourcePool { + pool := &ResourcePool{ + ResourcePool: esx.ResourcePool, + } + + if Map.IsVPX() { + pool.DisabledMethod = nil // Enable VApp methods for VC + } + + return pool +} + +func allResourceFieldsSet(info *types.ResourceAllocationInfo) bool { + return info.Reservation != nil && + info.Limit != nil && + info.ExpandableReservation != nil && + info.Shares != nil +} + +func allResourceFieldsValid(info *types.ResourceAllocationInfo) bool { + if info.Reservation != nil { + if *info.Reservation < 0 { + return false + } + } + + if info.Limit != nil { + if *info.Limit < -1 { + return false + } + } + + if info.Shares != nil { + if info.Shares.Level == types.SharesLevelCustom { + if info.Shares.Shares < 0 { + return false + } + } + } + + if info.OverheadLimit != nil { + return false + } + + return true +} + +func (p *ResourcePool) createChild(name string, spec types.ResourceConfigSpec) (*ResourcePool, *soap.Fault) { + if e := Map.FindByName(name, p.ResourcePool.ResourcePool); e != nil { + return nil, Fault("", &types.DuplicateName{ + Name: e.Entity().Name, + Object: e.Reference(), + }) + } + + if !(allResourceFieldsSet(&spec.CpuAllocation) && allResourceFieldsValid(&spec.CpuAllocation)) { + return nil, Fault("", &types.InvalidArgument{ + InvalidProperty: "spec.cpuAllocation", + }) + } + + if !(allResourceFieldsSet(&spec.MemoryAllocation) && allResourceFieldsValid(&spec.MemoryAllocation)) { + return nil, Fault("", &types.InvalidArgument{ + InvalidProperty: "spec.memoryAllocation", + }) + } + + child := NewResourcePool() + + child.Name = name + child.Owner = p.Owner + child.Summary.GetResourcePoolSummary().Name = name + child.Config.CpuAllocation = spec.CpuAllocation + child.Config.MemoryAllocation = spec.MemoryAllocation + child.Config.Entity = spec.Entity + + return child, nil +} + +func (p *ResourcePool) CreateResourcePool(c *types.CreateResourcePool) soap.HasFault { + body := &methods.CreateResourcePoolBody{} + + child, err := p.createChild(c.Name, c.Spec) + if err != nil { + body.Fault_ = err + return body + } + + Map.PutEntity(p, Map.NewEntity(child)) + + p.ResourcePool.ResourcePool = append(p.ResourcePool.ResourcePool, child.Reference()) + + body.Res = &types.CreateResourcePoolResponse{ + Returnval: child.Reference(), + } + + return body +} + +func updateResourceAllocation(kind string, src, dst *types.ResourceAllocationInfo) types.BaseMethodFault { + if !allResourceFieldsValid(src) { + return &types.InvalidArgument{ + InvalidProperty: fmt.Sprintf("spec.%sAllocation", kind), + } + } + + if src.Reservation != nil { + dst.Reservation = src.Reservation + } + + if src.Limit != nil { + dst.Limit = src.Limit + } + + if src.Shares != nil { + dst.Shares = src.Shares + } + + return nil +} + +func (p *ResourcePool) UpdateConfig(c *types.UpdateConfig) soap.HasFault { + body := &methods.UpdateConfigBody{} + + if c.Name != "" { + if e := Map.FindByName(c.Name, p.ResourcePool.ResourcePool); e != nil { + body.Fault_ = Fault("", &types.DuplicateName{ + Name: e.Entity().Name, + Object: e.Reference(), + }) + return body + } + + p.Name = c.Name + } + + spec := c.Config + + if spec != nil { + if err := updateResourceAllocation("memory", &spec.MemoryAllocation, &p.Config.MemoryAllocation); err != nil { + body.Fault_ = Fault("", err) + return body + } + + if err := updateResourceAllocation("cpu", &spec.CpuAllocation, &p.Config.CpuAllocation); err != nil { + body.Fault_ = Fault("", err) + return body + } + } + + body.Res = &types.UpdateConfigResponse{} + + return body +} + +func (a *VirtualApp) ImportVApp(ctx *Context, req *types.ImportVApp) soap.HasFault { + return (&ResourcePool{ResourcePool: a.ResourcePool}).ImportVApp(ctx, req) +} + +func (p *ResourcePool) ImportVApp(ctx *Context, req *types.ImportVApp) soap.HasFault { + body := new(methods.ImportVAppBody) + + spec, ok := req.Spec.(*types.VirtualMachineImportSpec) + if !ok { + body.Fault_ = Fault(fmt.Sprintf("%T: type not supported", spec), &types.InvalidArgument{InvalidProperty: "spec"}) + return body + } + + dc := ctx.Map.getEntityDatacenter(p) + folder := ctx.Map.Get(dc.VmFolder).(*Folder) + if req.Folder != nil { + if p.Self.Type == "VirtualApp" { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "pool"}) + return body + } + folder = ctx.Map.Get(*req.Folder).(*Folder) + } + + lease := newHttpNfcLease(ctx) + ref := lease.Reference() + + CreateTask(p, "ImportVAppLRO", func(*Task) (types.AnyType, types.BaseMethodFault) { + if vapp, ok := spec.ConfigSpec.VAppConfig.(*types.VAppConfigSpec); ok { + for _, p := range vapp.Property { + if p.Info == nil || isTrue(p.Info.UserConfigurable) { + continue + } + + if p.Info.Value == "" || p.Info.Value == p.Info.DefaultValue { + continue + } + + fault := &types.NotUserConfigurableProperty{ + VAppPropertyFault: types.VAppPropertyFault{ + Id: p.Info.Id, + Category: p.Info.Category, + Label: p.Info.Label, + Type: p.Info.Type, + Value: p.Info.Value, + }, + } + + lease.error(ctx, &types.LocalizedMethodFault{ + LocalizedMessage: fmt.Sprintf("Property %s.%s is not user configurable", p.Info.ClassId, p.Info.Id), + Fault: fault, + }) + + return nil, fault + } + } + + res := folder.CreateVMTask(ctx, &types.CreateVM_Task{ + This: folder.Self, + Config: spec.ConfigSpec, + Pool: p.Self, + Host: req.Host, + }) + + ctask := ctx.Map.Get(res.(*methods.CreateVM_TaskBody).Res.Returnval).(*Task) + ctask.Wait() + + if ctask.Info.Error != nil { + lease.error(ctx, ctask.Info.Error) + return nil, ctask.Info.Error.Fault + } + + mref := ctask.Info.Result.(types.ManagedObjectReference) + vm := ctx.Map.Get(mref).(*VirtualMachine) + device := object.VirtualDeviceList(vm.Config.Hardware.Device) + ndevice := make(map[string]int) + var urls []types.HttpNfcLeaseDeviceUrl + + for _, d := range device { + info, ok := d.GetVirtualDevice().Backing.(types.BaseVirtualDeviceFileBackingInfo) + if !ok { + continue + } + var file object.DatastorePath + file.FromString(info.GetVirtualDeviceFileBackingInfo().FileName) + name := path.Base(file.Path) + ds := vm.findDatastore(file.Datastore) + lease.files[name] = path.Join(ds.Info.GetDatastoreInfo().Url, file.Path) + + _, disk := d.(*types.VirtualDisk) + kind := device.Type(d) + n := ndevice[kind] + ndevice[kind]++ + + urls = append(urls, types.HttpNfcLeaseDeviceUrl{ + Key: fmt.Sprintf("/%s/%s:%d", vm.Self.Value, kind, n), + ImportKey: fmt.Sprintf("/%s/%s:%d", vm.Name, kind, n), + Url: (&url.URL{ + Scheme: "https", + Host: "*", + Path: nfcPrefix + path.Join(ref.Value, name), + }).String(), + SslThumbprint: "", + Disk: types.NewBool(disk), + TargetId: name, + DatastoreKey: "", + FileSize: 0, + }) + } + + lease.ready(ctx, mref, urls) + + // TODO: keep this task running until lease timeout or marked completed by the client + + return nil, nil + }).Run(ctx) + + body.Res = &types.ImportVAppResponse{ + Returnval: ref, + } + + return body +} + +type VirtualApp struct { + mo.VirtualApp +} + +func NewVAppConfigSpec() types.VAppConfigSpec { + spec := types.VAppConfigSpec{ + Annotation: "vcsim", + VmConfigSpec: types.VmConfigSpec{ + Product: []types.VAppProductSpec{ + { + Info: &types.VAppProductInfo{ + Name: "vcsim", + Vendor: "VMware", + VendorUrl: "http://www.vmware.com/", + Version: "0.1", + }, + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: types.ArrayUpdateOperationAdd, + }, + }, + }, + }, + } + + return spec +} + +func (p *ResourcePool) CreateVApp(req *types.CreateVApp) soap.HasFault { + body := &methods.CreateVAppBody{} + + pool, err := p.createChild(req.Name, req.ResSpec) + if err != nil { + body.Fault_ = err + return body + } + + child := &VirtualApp{} + child.ResourcePool = pool.ResourcePool + child.Self.Type = "VirtualApp" + child.ParentFolder = req.VmFolder + + if child.ParentFolder == nil { + folder := Map.getEntityDatacenter(p).VmFolder + child.ParentFolder = &folder + } + + child.VAppConfig = &types.VAppConfigInfo{ + VmConfigInfo: types.VmConfigInfo{}, + Annotation: req.ConfigSpec.Annotation, + } + + for _, product := range req.ConfigSpec.Product { + child.VAppConfig.Product = append(child.VAppConfig.Product, *product.Info) + } + + Map.PutEntity(p, Map.NewEntity(child)) + + p.ResourcePool.ResourcePool = append(p.ResourcePool.ResourcePool, child.Reference()) + + body.Res = &types.CreateVAppResponse{ + Returnval: child.Reference(), + } + + return body +} + +func (a *VirtualApp) CreateChildVMTask(ctx *Context, req *types.CreateChildVM_Task) soap.HasFault { + body := &methods.CreateChildVM_TaskBody{} + + folder := ctx.Map.Get(*a.ParentFolder).(*Folder) + + res := folder.CreateVMTask(ctx, &types.CreateVM_Task{ + This: folder.Self, + Config: req.Config, + Host: req.Host, + Pool: req.This, + }) + + body.Res = &types.CreateChildVM_TaskResponse{ + Returnval: res.(*methods.CreateVM_TaskBody).Res.Returnval, + } + + return body +} + +func (a *VirtualApp) CloneVAppTask(ctx *Context, req *types.CloneVApp_Task) soap.HasFault { + task := CreateTask(a, "cloneVapp", func(t *Task) (types.AnyType, types.BaseMethodFault) { + folder := req.Spec.VmFolder + if folder == nil { + folder = a.ParentFolder + } + + rspec := req.Spec.ResourceSpec + if rspec == nil { + s := types.DefaultResourceConfigSpec() + rspec = &s + } + + res := a.CreateVApp(&types.CreateVApp{ + This: a.Self, + Name: req.Name, + ResSpec: *rspec, + ConfigSpec: types.VAppConfigSpec{}, + VmFolder: folder, + }) + + if res.Fault() != nil { + return nil, res.Fault().VimFault().(types.BaseMethodFault) + } + + target := res.(*methods.CreateVAppBody).Res.Returnval + + for _, ref := range a.Vm { + vm := ctx.Map.Get(ref).(*VirtualMachine) + + res := vm.CloneVMTask(ctx, &types.CloneVM_Task{ + This: ref, + Folder: *folder, + Name: req.Name, + Spec: types.VirtualMachineCloneSpec{ + Location: types.VirtualMachineRelocateSpec{ + Pool: &target, + Host: req.Spec.Host, + }, + }, + }) + + ctask := ctx.Map.Get(res.(*methods.CloneVM_TaskBody).Res.Returnval).(*Task) + ctask.Wait() + if ctask.Info.Error != nil { + return nil, ctask.Info.Error.Fault + } + } + + return target, nil + }) + + return &methods.CloneVApp_TaskBody{ + Res: &types.CloneVApp_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (a *VirtualApp) CreateVApp(req *types.CreateVApp) soap.HasFault { + return (&ResourcePool{ResourcePool: a.ResourcePool}).CreateVApp(req) +} + +func (a *VirtualApp) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + return (&ResourcePool{ResourcePool: a.ResourcePool}).DestroyTask(ctx, req) +} + +func (p *ResourcePool) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + task := CreateTask(p, "destroy", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if strings.HasSuffix(p.Parent.Type, "ComputeResource") { + // Can't destroy the root pool + return nil, &types.InvalidArgument{} + } + + parent, _ := asResourcePoolMO(ctx.Map.Get(*p.Parent)) + + // Remove child reference from rp + ctx.WithLock(parent, func() { + RemoveReference(&parent.ResourcePool, req.This) + + // The grandchildren become children of the parent (rp) + for _, ref := range p.ResourcePool.ResourcePool { + child := ctx.Map.Get(ref).(*ResourcePool) + ctx.WithLock(child, func() { child.Parent = &parent.Self }) + parent.ResourcePool = append(parent.ResourcePool, ref) + } + }) + + // And VMs move to the parent + vms := p.ResourcePool.Vm + for _, ref := range vms { + vm := ctx.Map.Get(ref).(*VirtualMachine) + ctx.WithLock(vm, func() { vm.ResourcePool = &parent.Self }) + } + + ctx.WithLock(parent, func() { + parent.Vm = append(parent.Vm, vms...) + }) + + ctx.Map.Remove(ctx, req.This) + + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (p *ResourcePool) DestroyChildren(ctx *Context, req *types.DestroyChildren) soap.HasFault { + walk(p, func(child types.ManagedObjectReference) { + if child.Type != "ResourcePool" { + return + } + ctx.Map.Get(child).(*ResourcePool).DestroyTask(ctx, &types.Destroy_Task{This: child}) + }) + + return &methods.DestroyChildrenBody{Res: new(types.DestroyChildrenResponse)} +} diff --git a/vendor/github.com/vmware/govmomi/simulator/search_index.go b/vendor/github.com/vmware/govmomi/simulator/search_index.go new file mode 100644 index 0000000000..7919386210 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/search_index.go @@ -0,0 +1,273 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type SearchIndex struct { + mo.SearchIndex +} + +func (s *SearchIndex) FindByDatastorePath(r *types.FindByDatastorePath) soap.HasFault { + res := &methods.FindByDatastorePathBody{Res: new(types.FindByDatastorePathResponse)} + + Map.m.Lock() + defer Map.m.Unlock() + + for ref, obj := range Map.objects { + vm, ok := asVirtualMachineMO(obj) + if !ok { + continue + } + + if vm.Config.Files.VmPathName == r.Path { + res.Res.Returnval = &ref + break + } + } + + return res +} + +func (s *SearchIndex) FindByInventoryPath(req *types.FindByInventoryPath) soap.HasFault { + body := &methods.FindByInventoryPathBody{Res: new(types.FindByInventoryPathResponse)} + + root := Map.content().RootFolder + o := &root + + if req.InventoryPath == "/" { + body.Res.Returnval = o + return body + } + + split := func(c rune) bool { + return c == '/' + } + path := strings.FieldsFunc(req.InventoryPath, split) + if len(path) < 1 { + return body + } + + for _, name := range path { + f := s.FindChild(&types.FindChild{Entity: *o, Name: name}) + + o = f.(*methods.FindChildBody).Res.Returnval + if o == nil { + break + } + } + + body.Res.Returnval = o + + return body +} + +func (s *SearchIndex) FindChild(req *types.FindChild) soap.HasFault { + body := &methods.FindChildBody{} + + obj := Map.Get(req.Entity) + + if obj == nil { + body.Fault_ = Fault("", &types.ManagedObjectNotFound{Obj: req.Entity}) + return body + } + + body.Res = new(types.FindChildResponse) + + var children []types.ManagedObjectReference + + switch e := obj.(type) { + case *Datacenter: + children = []types.ManagedObjectReference{e.VmFolder, e.HostFolder, e.DatastoreFolder, e.NetworkFolder} + case *Folder: + children = e.ChildEntity + case *mo.ComputeResource: + children = e.Host + children = append(children, *e.ResourcePool) + case *ClusterComputeResource: + children = e.Host + children = append(children, *e.ResourcePool) + case *ResourcePool: + children = e.ResourcePool.ResourcePool + children = append(children, e.Vm...) + case *VirtualApp: + children = e.ResourcePool.ResourcePool + children = append(children, e.Vm...) + } + + match := Map.FindByName(req.Name, children) + + if match != nil { + ref := match.Reference() + body.Res.Returnval = &ref + } + + return body +} + +func (s *SearchIndex) FindByUuid(req *types.FindByUuid) soap.HasFault { + body := &methods.FindByUuidBody{Res: new(types.FindByUuidResponse)} + + Map.m.Lock() + defer Map.m.Unlock() + + if req.VmSearch { + // Find Virtual Machine using UUID + for ref, obj := range Map.objects { + vm, ok := asVirtualMachineMO(obj) + if !ok { + continue + } + if req.InstanceUuid != nil && *req.InstanceUuid { + if vm.Config.InstanceUuid == req.Uuid { + body.Res.Returnval = &ref + break + } + } else { + if vm.Config.Uuid == req.Uuid { + body.Res.Returnval = &ref + break + } + } + } + } else { + // Find Host System using UUID + for ref, obj := range Map.objects { + host, ok := asHostSystemMO(obj) + if !ok { + continue + } + if host.Summary.Hardware.Uuid == req.Uuid { + body.Res.Returnval = &ref + break + } + } + } + + return body +} + +func (s *SearchIndex) FindByDnsName(req *types.FindByDnsName) soap.HasFault { + body := &methods.FindByDnsNameBody{Res: new(types.FindByDnsNameResponse)} + + all := types.FindAllByDnsName(*req) + + switch r := s.FindAllByDnsName(&all).(type) { + case *methods.FindAllByDnsNameBody: + if len(r.Res.Returnval) > 0 { + body.Res.Returnval = &r.Res.Returnval[0] + } + default: + // no need until FindAllByDnsName below returns a Fault + } + + return body +} + +func (s *SearchIndex) FindAllByDnsName(req *types.FindAllByDnsName) soap.HasFault { + body := &methods.FindAllByDnsNameBody{Res: new(types.FindAllByDnsNameResponse)} + + Map.m.Lock() + defer Map.m.Unlock() + + if req.VmSearch { + // Find Virtual Machine using DNS name + for ref, obj := range Map.objects { + vm, ok := asVirtualMachineMO(obj) + if !ok { + continue + } + if vm.Guest.HostName == req.DnsName { + body.Res.Returnval = append(body.Res.Returnval, ref) + } + } + } else { + // Find Host System using DNS name + for ref, obj := range Map.objects { + host, ok := asHostSystemMO(obj) + if !ok { + continue + } + for _, net := range host.Config.Network.NetStackInstance { + if net.DnsConfig.GetHostDnsConfig().HostName == req.DnsName { + body.Res.Returnval = append(body.Res.Returnval, ref) + } + } + } + } + + return body +} + +func (s *SearchIndex) FindByIp(req *types.FindByIp) soap.HasFault { + body := &methods.FindByIpBody{Res: new(types.FindByIpResponse)} + + all := types.FindAllByIp(*req) + + switch r := s.FindAllByIp(&all).(type) { + case *methods.FindAllByIpBody: + if len(r.Res.Returnval) > 0 { + body.Res.Returnval = &r.Res.Returnval[0] + } + default: + // no need until FindAllByIp below returns a Fault + } + + return body +} + +func (s *SearchIndex) FindAllByIp(req *types.FindAllByIp) soap.HasFault { + body := &methods.FindAllByIpBody{Res: new(types.FindAllByIpResponse)} + + Map.m.Lock() + defer Map.m.Unlock() + + if req.VmSearch { + // Find Virtual Machine using IP + for ref, obj := range Map.objects { + vm, ok := asVirtualMachineMO(obj) + if !ok { + continue + } + if vm.Guest.IpAddress == req.Ip { + body.Res.Returnval = append(body.Res.Returnval, ref) + } + } + } else { + // Find Host System using IP + for ref, obj := range Map.objects { + host, ok := asHostSystemMO(obj) + if !ok { + continue + } + for _, net := range host.Config.Network.Vnic { + if net.Spec.Ip.IpAddress == req.Ip { + body.Res.Returnval = append(body.Res.Returnval, ref) + } + } + } + } + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/service_instance.go b/vendor/github.com/vmware/govmomi/simulator/service_instance.go new file mode 100644 index 0000000000..3524d15499 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/service_instance.go @@ -0,0 +1,99 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/simulator/internal" + "github.com/vmware/govmomi/vim25" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type ServiceInstance struct { + mo.ServiceInstance +} + +func NewServiceInstance(ctx *Context, content types.ServiceContent, folder mo.Folder) *ServiceInstance { + // TODO: This function ignores the passed in Map and operates on the + // global Map. + Map = NewRegistry() + ctx.Map = Map + + s := &ServiceInstance{} + + s.Self = vim25.ServiceInstance + s.Content = content + + Map.Put(s) + + f := &Folder{Folder: folder} + Map.Put(f) + + if content.About.ApiType == "HostAgent" { + CreateDefaultESX(ctx, f) + } else { + content.About.InstanceUuid = uuid.New().String() + } + + refs := mo.References(content) + + for i := range refs { + if Map.Get(refs[i]) != nil { + continue + } + content := types.ObjectContent{Obj: refs[i]} + o, err := loadObject(content) + if err != nil { + panic(err) + } + Map.Put(o) + } + + return s +} + +func (s *ServiceInstance) RetrieveServiceContent(*types.RetrieveServiceContent) soap.HasFault { + return &methods.RetrieveServiceContentBody{ + Res: &types.RetrieveServiceContentResponse{ + Returnval: s.Content, + }, + } +} + +func (*ServiceInstance) CurrentTime(*types.CurrentTime) soap.HasFault { + return &methods.CurrentTimeBody{ + Res: &types.CurrentTimeResponse{ + Returnval: time.Now(), + }, + } +} + +func (s *ServiceInstance) RetrieveInternalContent(*internal.RetrieveInternalContent) soap.HasFault { + return &internal.RetrieveInternalContentBody{ + Res: &internal.RetrieveInternalContentResponse{ + Returnval: internal.InternalServiceInstanceContent{ + NfcService: types.ManagedObjectReference{Type: "NfcService", Value: "NfcService"}, + }, + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/session_manager.go b/vendor/github.com/vmware/govmomi/simulator/session_manager.go new file mode 100644 index 0000000000..85ed81538b --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/session_manager.go @@ -0,0 +1,490 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "context" + "fmt" + "net/http" + "net/url" + "os" + "reflect" + "strings" + "sync" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/session" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type SessionManager struct { + mo.SessionManager + nopLocker + + ServiceHostName string + TLSCert func() string + ValidLogin func(*types.Login) bool + + sessions map[string]Session +} + +func (m *SessionManager) init(*Registry) { + m.sessions = make(map[string]Session) +} + +var ( + // SessionIdleTimeout duration used to expire idle sessions + SessionIdleTimeout time.Duration + + sessionMutex sync.Mutex + + // secureCookies enables Set-Cookie.Secure=true + // We can't do this by default as simulator.Service defaults to no TLS by default and + // Go's cookiejar does not send Secure cookies unless the URL scheme is https. + secureCookies = os.Getenv("VCSIM_SECURE_COOKIES") == "true" +) + +func createSession(ctx *Context, name string, locale string) types.UserSession { + now := time.Now().UTC() + + if locale == "" { + locale = session.Locale + } + + session := Session{ + UserSession: types.UserSession{ + Key: uuid.New().String(), + UserName: name, + FullName: name, + LoginTime: now, + LastActiveTime: now, + Locale: locale, + MessageLocale: locale, + ExtensionSession: types.NewBool(false), + }, + Registry: NewRegistry(), + } + + ctx.SetSession(session, true) + + return ctx.Session.UserSession +} + +func (m *SessionManager) getSession(id string) (Session, bool) { + sessionMutex.Lock() + defer sessionMutex.Unlock() + s, ok := m.sessions[id] + return s, ok +} + +func (m *SessionManager) findSession(user string) (Session, bool) { + sessionMutex.Lock() + defer sessionMutex.Unlock() + for _, session := range m.sessions { + if session.UserName == user { + return session, true + } + } + return Session{}, false +} + +func (m *SessionManager) delSession(id string) { + sessionMutex.Lock() + defer sessionMutex.Unlock() + delete(m.sessions, id) +} + +func (m *SessionManager) putSession(s Session) { + sessionMutex.Lock() + defer sessionMutex.Unlock() + m.sessions[s.Key] = s +} + +func (s *SessionManager) Authenticate(u url.URL, req *types.Login) bool { + if u.User == nil || u.User == DefaultLogin { + return req.UserName != "" && req.Password != "" + } + + if s.ValidLogin != nil { + return s.ValidLogin(req) + } + + pass, _ := u.User.Password() + return req.UserName == u.User.Username() && req.Password == pass +} + +func (s *SessionManager) Login(ctx *Context, req *types.Login) soap.HasFault { + body := new(methods.LoginBody) + + if ctx.Session == nil && s.Authenticate(*ctx.svc.Listen, req) { + body.Res = &types.LoginResponse{ + Returnval: createSession(ctx, req.UserName, req.Locale), + } + } else { + body.Fault_ = invalidLogin + } + + return body +} + +func (s *SessionManager) LoginExtensionByCertificate(ctx *Context, req *types.LoginExtensionByCertificate) soap.HasFault { + body := new(methods.LoginExtensionByCertificateBody) + + if ctx.req.TLS == nil || len(ctx.req.TLS.PeerCertificates) == 0 { + body.Fault_ = Fault("", new(types.NoClientCertificate)) + return body + } + + if req.ExtensionKey == "" || ctx.Session != nil { + body.Fault_ = invalidLogin + } else { + body.Res = &types.LoginExtensionByCertificateResponse{ + Returnval: createSession(ctx, req.ExtensionKey, req.Locale), + } + } + + return body +} + +func (s *SessionManager) LoginByToken(ctx *Context, req *types.LoginByToken) soap.HasFault { + body := new(methods.LoginByTokenBody) + + if ctx.Session != nil { + body.Fault_ = invalidLogin + } else { + var subject struct { + ID string `xml:"Assertion>Subject>NameID"` + } + + if s, ok := ctx.Header.Security.(*Element); ok { + _ = s.Decode(&subject) + } + + if subject.ID == "" { + body.Fault_ = invalidLogin + return body + } + + body.Res = &types.LoginByTokenResponse{ + Returnval: createSession(ctx, subject.ID, req.Locale), + } + } + + return body +} + +func (s *SessionManager) Logout(ctx *Context, _ *types.Logout) soap.HasFault { + session := ctx.Session + s.delSession(session.Key) + pc := ctx.Map.content().PropertyCollector + + for ref, obj := range ctx.Session.Registry.objects { + if ref == pc { + continue // don't unregister the PropertyCollector singleton + } + if _, ok := obj.(RegisterObject); ok { + ctx.Map.Remove(ctx, ref) // Remove RegisterObject handlers + } + } + + ctx.postEvent(&types.UserLogoutSessionEvent{ + IpAddress: session.IpAddress, + UserAgent: session.UserAgent, + SessionId: session.Key, + LoginTime: &session.LoginTime, + }) + + return &methods.LogoutBody{Res: new(types.LogoutResponse)} +} + +func (s *SessionManager) TerminateSession(ctx *Context, req *types.TerminateSession) soap.HasFault { + body := new(methods.TerminateSessionBody) + + for _, id := range req.SessionId { + if id == ctx.Session.Key { + body.Fault_ = Fault("", new(types.InvalidArgument)) + return body + } + if _, ok := s.getSession(id); !ok { + body.Fault_ = Fault("", new(types.NotFound)) + return body + } + s.delSession(id) + } + + body.Res = new(types.TerminateSessionResponse) + return body +} + +func (s *SessionManager) SessionIsActive(ctx *Context, req *types.SessionIsActive) soap.HasFault { + body := new(methods.SessionIsActiveBody) + + if ctx.Map.IsESX() { + body.Fault_ = Fault("", new(types.NotImplemented)) + return body + } + + body.Res = new(types.SessionIsActiveResponse) + + if session, exists := s.getSession(req.SessionID); exists { + body.Res.Returnval = session.UserName == req.UserName + } + + return body +} + +func (s *SessionManager) AcquireCloneTicket(ctx *Context, _ *types.AcquireCloneTicket) soap.HasFault { + session := *ctx.Session + session.Key = uuid.New().String() + s.putSession(session) + + return &methods.AcquireCloneTicketBody{ + Res: &types.AcquireCloneTicketResponse{ + Returnval: session.Key, + }, + } +} + +func (s *SessionManager) CloneSession(ctx *Context, ticket *types.CloneSession) soap.HasFault { + body := new(methods.CloneSessionBody) + + session, exists := s.getSession(ticket.CloneTicket) + + if exists { + s.delSession(ticket.CloneTicket) // A clone ticket can only be used once + session.Key = uuid.New().String() + ctx.SetSession(session, true) + + body.Res = &types.CloneSessionResponse{ + Returnval: session.UserSession, + } + } else { + body.Fault_ = invalidLogin + } + + return body +} + +func (s *SessionManager) ImpersonateUser(ctx *Context, req *types.ImpersonateUser) soap.HasFault { + body := new(methods.ImpersonateUserBody) + + session, exists := s.findSession(req.UserName) + + if exists { + session.Key = uuid.New().String() + ctx.SetSession(session, true) + + body.Res = &types.ImpersonateUserResponse{ + Returnval: session.UserSession, + } + } else { + body.Fault_ = invalidLogin + } + + return body +} + +func (s *SessionManager) AcquireGenericServiceTicket(ticket *types.AcquireGenericServiceTicket) soap.HasFault { + return &methods.AcquireGenericServiceTicketBody{ + Res: &types.AcquireGenericServiceTicketResponse{ + Returnval: types.SessionManagerGenericServiceTicket{ + Id: uuid.New().String(), + HostName: s.ServiceHostName, + }, + }, + } +} + +var invalidLogin = Fault("Login failure", new(types.InvalidLogin)) + +// Context provides per-request Session management. +type Context struct { + req *http.Request + res http.ResponseWriter + svc *Service + + context.Context + Session *Session + Header soap.Header + Caller *types.ManagedObjectReference + Map *Registry +} + +// mapSession maps an HTTP cookie to a Session. +func (c *Context) mapSession() { + if cookie, err := c.req.Cookie(soap.SessionCookieName); err == nil { + if val, ok := c.svc.sm.getSession(cookie.Value); ok { + c.SetSession(val, false) + } + } +} + +func (m *SessionManager) expiredSession(id string, now time.Time) bool { + expired := true + + s, ok := m.getSession(id) + if ok { + expired = now.Sub(s.LastActiveTime) > SessionIdleTimeout + if expired { + m.delSession(id) + } + } + + return expired +} + +// SessionIdleWatch starts a goroutine that calls func expired() at SessionIdleTimeout intervals. +// The goroutine exits if the func returns true. +func SessionIdleWatch(ctx context.Context, id string, expired func(string, time.Time) bool) { + if SessionIdleTimeout == 0 { + return + } + + go func() { + for t := time.NewTimer(SessionIdleTimeout); ; { + select { + case <-ctx.Done(): + return + case now := <-t.C: + if expired(id, now) { + return + } + t.Reset(SessionIdleTimeout) + } + } + }() +} + +// SetSession should be called after successful authentication. +func (c *Context) SetSession(session Session, login bool) { + session.UserAgent = c.req.UserAgent() + session.IpAddress = strings.Split(c.req.RemoteAddr, ":")[0] + session.LastActiveTime = time.Now() + session.CallCount++ + + c.svc.sm.putSession(session) + c.Session = &session + + if login { + http.SetCookie(c.res, &http.Cookie{ + Name: soap.SessionCookieName, + Value: session.Key, + Secure: secureCookies, + HttpOnly: true, + }) + + c.postEvent(&types.UserLoginSessionEvent{ + SessionId: session.Key, + IpAddress: session.IpAddress, + UserAgent: session.UserAgent, + Locale: session.Locale, + }) + + SessionIdleWatch(c.Context, session.Key, c.svc.sm.expiredSession) + } +} + +// WithLock holds a lock for the given object while the given function is run. +// It will skip locking if this context already holds the given object's lock. +func (c *Context) WithLock(obj mo.Reference, f func()) { + // TODO: This is not always going to be correct. An object should + // really be locked by the registry that "owns it", which is not always + // Map. This function will need to take the Registry as an additional + // argument to accomplish this. + // Basic mutex locking will work even if obj doesn't belong to Map, but + // if obj implements sync.Locker, that custom locking will not be used. + c.Map.WithLock(c, obj, f) +} + +func (c *Context) Update(obj mo.Reference, changes []types.PropertyChange) { + c.Map.Update(c, obj, changes) +} + +// postEvent wraps EventManager.PostEvent for internal use, with a lock on the EventManager. +func (c *Context) postEvent(events ...types.BaseEvent) { + m := c.Map.EventManager() + c.WithLock(m, func() { + for _, event := range events { + m.PostEvent(c, &types.PostEvent{EventToPost: event}) + } + }) +} + +// Session combines a UserSession and a Registry for per-session managed objects. +type Session struct { + types.UserSession + *Registry +} + +func (s *Session) setReference(item mo.Reference) { + ref := item.Reference() + if ref.Value == "" { + ref.Value = fmt.Sprintf("session[%s]%s", s.Key, uuid.New()) + } + if ref.Type == "" { + ref.Type = typeName(item) + } + s.Registry.setReference(item, ref) +} + +// Put wraps Registry.Put, setting the moref value to include the session key. +func (s *Session) Put(item mo.Reference) mo.Reference { + s.setReference(item) + return s.Registry.Put(item) +} + +// Get wraps Registry.Get, session-izing singleton objects such as SessionManager and the root PropertyCollector. +func (s *Session) Get(ref types.ManagedObjectReference) mo.Reference { + obj := s.Registry.Get(ref) + if obj != nil { + return obj + } + + // Return a session "view" of certain singleton objects + switch ref.Type { + case "SessionManager": + // Clone SessionManager so the PropertyCollector can properly report CurrentSession + m := *Map.SessionManager() + m.CurrentSession = &s.UserSession + + // TODO: we could maintain SessionList as part of the SessionManager singleton + sessionMutex.Lock() + for _, session := range m.sessions { + m.SessionList = append(m.SessionList, session.UserSession) + } + sessionMutex.Unlock() + + return &m + case "PropertyCollector": + if ref == Map.content().PropertyCollector { + // Per-session instance of the PropertyCollector singleton. + // Using reflection here as PropertyCollector might be wrapped with a custom type. + obj = Map.Get(ref) + pc := reflect.New(reflect.TypeOf(obj).Elem()) + obj = pc.Interface().(mo.Reference) + s.Registry.setReference(obj, ref) + return s.Put(obj) + } + } + + return Map.Get(ref) +} diff --git a/vendor/github.com/vmware/govmomi/simulator/simulator.go b/vendor/github.com/vmware/govmomi/simulator/simulator.go new file mode 100644 index 0000000000..71c0037cd6 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/simulator.go @@ -0,0 +1,992 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "bytes" + "context" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "encoding/pem" + "fmt" + "io" + "log" + "net" + "net/http" + "net/url" + "os" + "path" + "reflect" + "sort" + "strconv" + "strings" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/find" + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/internal" + "github.com/vmware/govmomi/vim25" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" + "github.com/vmware/govmomi/vim25/xml" +) + +var ( + // Trace when set to true, writes SOAP traffic to stderr + Trace = false + + // TraceFile is the output file when Trace = true + TraceFile = os.Stderr + + // DefaultLogin for authentication + DefaultLogin = url.UserPassword("user", "pass") +) + +// Method encapsulates a decoded SOAP client request +type Method struct { + Name string + This types.ManagedObjectReference + Header soap.Header + Body types.AnyType +} + +// Service decodes incoming requests and dispatches to a Handler +type Service struct { + client *vim25.Client + sm *SessionManager + sdk map[string]*Registry + funcs []handleFunc + delay *DelayConfig + + readAll func(io.Reader) ([]byte, error) + + Listen *url.URL + TLS *tls.Config + ServeMux *http.ServeMux + // RegisterEndpoints will initialize any endpoints added via RegisterEndpoint + RegisterEndpoints bool +} + +// Server provides a simulator Service over HTTP +type Server struct { + *internal.Server + URL *url.URL + Tunnel int + + caFile string +} + +// New returns an initialized simulator Service instance +func New(instance *ServiceInstance) *Service { + s := &Service{ + readAll: io.ReadAll, + sm: Map.SessionManager(), + sdk: make(map[string]*Registry), + } + + s.client, _ = vim25.NewClient(context.Background(), s) + + return s +} + +type serverFaultBody struct { + Reason *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` +} + +func (b *serverFaultBody) Fault() *soap.Fault { return b.Reason } + +func serverFault(msg string) soap.HasFault { + return &serverFaultBody{Reason: Fault(msg, &types.InvalidRequest{})} +} + +// Fault wraps the given message and fault in a soap.Fault +func Fault(msg string, fault types.BaseMethodFault) *soap.Fault { + f := &soap.Fault{ + Code: "ServerFaultCode", + String: msg, + } + + f.Detail.Fault = fault + + return f +} + +func tracef(format string, v ...interface{}) { + if Trace { + log.Printf(format, v...) + } +} + +func (s *Service) call(ctx *Context, method *Method) soap.HasFault { + handler := ctx.Map.Get(method.This) + session := ctx.Session + ctx.Caller = &method.This + + if ctx.Map.Handler != nil { + h, fault := ctx.Map.Handler(ctx, method) + if fault != nil { + return &serverFaultBody{Reason: Fault("", fault)} + } + if h != nil { + handler = h + } + } + + if session == nil { + switch method.Name { + case "RetrieveServiceContent", "PbmRetrieveServiceContent", "Fetch", "List", "Login", "LoginByToken", "LoginExtensionByCertificate", "RetrieveProperties", "RetrievePropertiesEx", "CloneSession": + // ok for now, TODO: authz + default: + fault := &types.NotAuthenticated{ + NoPermission: types.NoPermission{ + Object: &method.This, + PrivilegeId: "System.View", + }, + } + return &serverFaultBody{Reason: Fault("", fault)} + } + } else { + // Prefer the Session.Registry, ServiceContent.PropertyCollector filter field for example is per-session + if h := session.Get(method.This); h != nil { + handler = h + } + } + + if handler == nil { + msg := fmt.Sprintf("managed object not found: %s", method.This) + log.Print(msg) + fault := &types.ManagedObjectNotFound{Obj: method.This} + return &serverFaultBody{Reason: Fault(msg, fault)} + } + + // Lowercase methods can't be accessed outside their package + name := strings.Title(method.Name) + + if strings.HasSuffix(name, vTaskSuffix) { + // Make golint happy renaming "Foo_Task" -> "FooTask" + name = name[:len(name)-len(vTaskSuffix)] + sTaskSuffix + } + + m := reflect.ValueOf(handler).MethodByName(name) + if !m.IsValid() { + msg := fmt.Sprintf("%s does not implement: %s", method.This, method.Name) + log.Print(msg) + fault := &types.MethodNotFound{Receiver: method.This, Method: method.Name} + return &serverFaultBody{Reason: Fault(msg, fault)} + } + + if e, ok := handler.(mo.Entity); ok { + for _, dm := range e.Entity().DisabledMethod { + if name == dm { + msg := fmt.Sprintf("%s method is disabled: %s", method.This, method.Name) + fault := &types.MethodDisabled{} + return &serverFaultBody{Reason: Fault(msg, fault)} + } + } + } + + // We have a valid call. Introduce a delay if requested + if s.delay != nil { + s.delay.delay(method.Name) + } + + var args, res []reflect.Value + if m.Type().NumIn() == 2 { + args = append(args, reflect.ValueOf(ctx)) + } + args = append(args, reflect.ValueOf(method.Body)) + ctx.Map.WithLock(ctx, handler, func() { + res = m.Call(args) + }) + + return res[0].Interface().(soap.HasFault) +} + +// internalSession is the session for use by the in-memory client (Service.RoundTrip) +var internalSession = &Session{ + UserSession: types.UserSession{ + Key: uuid.New().String(), + }, + Registry: NewRegistry(), +} + +// RoundTrip implements the soap.RoundTripper interface in process. +// Rather than encode/decode SOAP over HTTP, this implementation uses reflection. +func (s *Service) RoundTrip(ctx context.Context, request, response soap.HasFault) error { + field := func(r soap.HasFault, name string) reflect.Value { + return reflect.ValueOf(r).Elem().FieldByName(name) + } + + // Every struct passed to soap.RoundTrip has "Req" and "Res" fields + req := field(request, "Req") + + // Every request has a "This" field. + this := req.Elem().FieldByName("This") + // Copy request body + body := reflect.New(req.Type().Elem()) + deepCopy(req.Interface(), body.Interface()) + + method := &Method{ + Name: req.Elem().Type().Name(), + This: this.Interface().(types.ManagedObjectReference), + Body: body.Interface(), + } + + res := s.call(&Context{ + Map: Map, + Context: ctx, + Session: internalSession, + }, method) + + if err := res.Fault(); err != nil { + return soap.WrapSoapFault(err) + } + + field(response, "Res").Set(field(res, "Res")) + + return nil +} + +// soapEnvelope is a copy of soap.Envelope, with namespace changed to "soapenv", +// and additional namespace attributes required by some client libraries. +// Go still has issues decoding with such a namespace, but encoding is ok. +type soapEnvelope struct { + XMLName xml.Name `xml:"soapenv:Envelope"` + Enc string `xml:"xmlns:soapenc,attr"` + Env string `xml:"xmlns:soapenv,attr"` + XSD string `xml:"xmlns:xsd,attr"` + XSI string `xml:"xmlns:xsi,attr"` + Body interface{} `xml:"soapenv:Body"` +} + +type faultDetail struct { + Fault types.AnyType +} + +// soapFault is a copy of soap.Fault, with the same changes as soapEnvelope +type soapFault struct { + XMLName xml.Name `xml:"soapenv:Fault"` + Code string `xml:"faultcode"` + String string `xml:"faultstring"` + Detail struct { + Fault *faultDetail + } `xml:"detail"` +} + +// MarshalXML renames the start element from "Fault" to "${Type}Fault" +func (d *faultDetail) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + kind := reflect.TypeOf(d.Fault).Elem().Name() + start.Name.Local = kind + "Fault" + start.Attr = append(start.Attr, + xml.Attr{ + Name: xml.Name{Local: "xmlns"}, + Value: "urn:" + vim25.Namespace, + }, + xml.Attr{ + Name: xml.Name{Local: "xsi:type"}, + Value: kind, + }) + return e.EncodeElement(d.Fault, start) +} + +// response sets xml.Name.Space when encoding Body. +// Note that namespace is intentionally omitted in the vim25/methods/methods.go Body.Res field tags. +type response struct { + Namespace string + Body soap.HasFault +} + +func (r *response) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + body := reflect.ValueOf(r.Body).Elem() + val := body.FieldByName("Res") + if !val.IsValid() { + return fmt.Errorf("%T: invalid response type (missing 'Res' field)", r.Body) + } + if val.IsNil() { + return fmt.Errorf("%T: invalid response (nil 'Res' field)", r.Body) + } + + // Default response namespace + ns := "urn:" + r.Namespace + // Override namespace from struct tag if defined + field, _ := body.Type().FieldByName("Res") + if tag := field.Tag.Get("xml"); tag != "" { + tags := strings.Split(tag, " ") + if len(tags) > 0 && strings.HasPrefix(tags[0], "urn") { + ns = tags[0] + } + } + + res := xml.StartElement{ + Name: xml.Name{ + Space: ns, + Local: val.Elem().Type().Name(), + }, + } + if err := e.EncodeToken(start); err != nil { + return err + } + if err := e.EncodeElement(val.Interface(), res); err != nil { + return err + } + return e.EncodeToken(start.End()) +} + +// About generates some info about the simulator. +func (s *Service) About(w http.ResponseWriter, r *http.Request) { + var about struct { + Methods []string `json:"methods"` + Types []string `json:"types"` + } + + seen := make(map[string]bool) + + f := reflect.TypeOf((*soap.HasFault)(nil)).Elem() + + for _, sdk := range s.sdk { + for _, obj := range sdk.objects { + kind := obj.Reference().Type + if seen[kind] { + continue + } + seen[kind] = true + + about.Types = append(about.Types, kind) + + t := reflect.TypeOf(obj) + for i := 0; i < t.NumMethod(); i++ { + m := t.Method(i) + if seen[m.Name] { + continue + } + seen[m.Name] = true + + in := m.Type.NumIn() + if in < 2 || in > 3 { // at least 2 params (receiver and request), optionally a 3rd param (context) + continue + } + if m.Type.NumOut() != 1 || m.Type.Out(0) != f { // all methods return soap.HasFault + continue + } + + about.Methods = append(about.Methods, strings.Replace(m.Name, "Task", "_Task", 1)) + } + } + } + + sort.Strings(about.Methods) + sort.Strings(about.Types) + + w.Header().Set("Content-Type", "application/json") + enc := json.NewEncoder(w) + enc.SetIndent("", " ") + _ = enc.Encode(&about) +} + +var endpoints []func(*Service, *Registry) + +// RegisterEndpoint funcs are called after the Server is initialized if Service.RegisterEndpoints=true. +// Such a func would typically register a SOAP endpoint via Service.RegisterSDK or REST endpoint via Service.Handle +func RegisterEndpoint(endpoint func(*Service, *Registry)) { + endpoints = append(endpoints, endpoint) +} + +// Handle registers the handler for the given pattern with Service.ServeMux. +func (s *Service) Handle(pattern string, handler http.Handler) { + s.ServeMux.Handle(pattern, handler) + // Not ideal, but avoids having to add yet another registration mechanism + // so we can optionally use vapi/simulator internally. + if m, ok := handler.(tagManager); ok { + s.sdk[vim25.Path].tagManager = m + } +} + +type muxHandleFunc interface { + HandleFunc(string, func(http.ResponseWriter, *http.Request)) +} + +type handleFunc struct { + pattern string + handler func(http.ResponseWriter, *http.Request) +} + +// HandleFunc dispatches to http.ServeMux.HandleFunc after all endpoints have been registered. +// This allows dispatching to an endpoint's HandleFunc impl, such as vapi/simulator for example. +func (s *Service) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) { + s.funcs = append(s.funcs, handleFunc{pattern, handler}) +} + +// RegisterSDK adds an HTTP handler for the Registry's Path and Namespace. +// If r.Path is already registered, r's objects are added to the existing Registry. +// An optional set of aliases can be provided to register the same handler for +// multiple paths. +func (s *Service) RegisterSDK(r *Registry, alias ...string) { + if existing, ok := s.sdk[r.Path]; ok { + for id, obj := range r.objects { + existing.objects[id] = obj + } + return + } + + if s.ServeMux == nil { + s.ServeMux = http.NewServeMux() + } + + s.sdk[r.Path] = r + s.ServeMux.HandleFunc(r.Path, s.ServeSDK) + + for _, p := range alias { + s.sdk[p] = r + s.ServeMux.HandleFunc(p, s.ServeSDK) + } +} + +// StatusSDK can be used to simulate an /sdk HTTP response code other than 200. +// The value of StatusSDK is restored to http.StatusOK after 1 response. +// This can be useful to test vim25.Retry() for example. +var StatusSDK = http.StatusOK + +// ServeSDK implements the http.Handler interface +func (s *Service) ServeSDK(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + if StatusSDK != http.StatusOK { + w.WriteHeader(StatusSDK) + StatusSDK = http.StatusOK // reset + return + } + + body, err := s.readAll(r.Body) + _ = r.Body.Close() + if err != nil { + log.Printf("error reading body: %s", err) + w.WriteHeader(http.StatusBadRequest) + return + } + + if Trace { + fmt.Fprintf(TraceFile, "Request: %s\n", string(body)) + } + + ctx := &Context{ + req: r, + res: w, + svc: s, + + Map: s.sdk[r.URL.Path], + Context: context.Background(), + } + ctx.Map.WithLock(ctx, s.sm, ctx.mapSession) + + var res soap.HasFault + var soapBody interface{} + + method, err := UnmarshalBody(ctx.Map.typeFunc, body) + if err != nil { + res = serverFault(err.Error()) + } else { + ctx.Header = method.Header + if method.Name == "Fetch" { + // Redirect any Fetch method calls to the PropertyCollector singleton + method.This = ctx.Map.content().PropertyCollector + } + res = s.call(ctx, method) + } + + if f := res.Fault(); f != nil { + w.WriteHeader(http.StatusInternalServerError) + + // the generated method/*Body structs use the '*soap.Fault' type, + // so we need our own Body type to use the modified '*soapFault' type. + soapBody = struct { + Fault *soapFault + }{ + &soapFault{ + Code: f.Code, + String: f.String, + Detail: struct { + Fault *faultDetail + }{&faultDetail{f.Detail.Fault}}, + }, + } + } else { + w.WriteHeader(http.StatusOK) + + soapBody = &response{ctx.Map.Namespace, res} + } + + var out bytes.Buffer + + fmt.Fprint(&out, xml.Header) + e := xml.NewEncoder(&out) + err = e.Encode(&soapEnvelope{ + Enc: "http://schemas.xmlsoap.org/soap/encoding/", + Env: "http://schemas.xmlsoap.org/soap/envelope/", + XSD: "http://www.w3.org/2001/XMLSchema", + XSI: "http://www.w3.org/2001/XMLSchema-instance", + Body: soapBody, + }) + if err == nil { + err = e.Flush() + } + + if err != nil { + log.Printf("error encoding %s response: %s", method.Name, err) + return + } + + if Trace { + fmt.Fprintf(TraceFile, "Response: %s\n", out.String()) + } + + _, _ = w.Write(out.Bytes()) +} + +func (s *Service) findDatastore(query url.Values) (*Datastore, error) { + ctx := context.Background() + + finder := find.NewFinder(s.client, false) + dc, err := finder.DatacenterOrDefault(ctx, query.Get("dcPath")) + if err != nil { + return nil, err + } + + finder.SetDatacenter(dc) + + ds, err := finder.DatastoreOrDefault(ctx, query.Get("dsName")) + if err != nil { + return nil, err + } + + return Map.Get(ds.Reference()).(*Datastore), nil +} + +const folderPrefix = "/folder/" + +// ServeDatastore handler for Datastore access via /folder path. +func (s *Service) ServeDatastore(w http.ResponseWriter, r *http.Request) { + ds, ferr := s.findDatastore(r.URL.Query()) + if ferr != nil { + log.Printf("failed to locate datastore with query params: %s", r.URL.RawQuery) + w.WriteHeader(http.StatusNotFound) + return + } + + r.URL.Path = strings.TrimPrefix(r.URL.Path, folderPrefix) + p := path.Join(ds.Info.GetDatastoreInfo().Url, r.URL.Path) + + switch r.Method { + case http.MethodPost: + _, err := os.Stat(p) + if err == nil { + // File exists + w.WriteHeader(http.StatusConflict) + return + } + + // File does not exist, fallthrough to create via PUT logic + fallthrough + case http.MethodPut: + dir := path.Dir(p) + _ = os.MkdirAll(dir, 0700) + + f, err := os.Create(p) + if err != nil { + log.Printf("failed to %s '%s': %s", r.Method, p, err) + w.WriteHeader(http.StatusInternalServerError) + return + } + defer f.Close() + + _, _ = io.Copy(f, r.Body) + default: + fs := http.FileServer(http.Dir(ds.Info.GetDatastoreInfo().Url)) + + fs.ServeHTTP(w, r) + } +} + +// ServiceVersions handler for the /sdk/vimServiceVersions.xml path. +func (s *Service) ServiceVersions(w http.ResponseWriter, r *http.Request) { + const versions = xml.Header + ` + + urn:vim25 + %s + + 6.0 + 5.5 + + + +` + fmt.Fprintf(w, versions, s.client.ServiceContent.About.ApiVersion) +} + +// ServiceVersionsVsan handler for the /sdk/vsanServiceVersions.xml path. +func (s *Service) ServiceVersionsVsan(w http.ResponseWriter, r *http.Request) { + const versions = xml.Header + ` + + urn:vsan + %s + + 6.7 + 6.6 + + + +` + fmt.Fprintf(w, versions, s.client.ServiceContent.About.ApiVersion) +} + +// defaultIP returns addr.IP if specified, otherwise attempts to find a non-loopback ipv4 IP +func defaultIP(addr *net.TCPAddr) string { + if !addr.IP.IsUnspecified() { + return addr.IP.String() + } + + nics, err := net.Interfaces() + if err != nil { + return addr.IP.String() + } + + for _, nic := range nics { + if nic.Name == "docker0" || strings.HasPrefix(nic.Name, "vmnet") { + continue + } + addrs, aerr := nic.Addrs() + if aerr != nil { + continue + } + for _, addr := range addrs { + if ip, ok := addr.(*net.IPNet); ok && !ip.IP.IsLoopback() { + if ip.IP.To4() != nil { + return ip.IP.String() + } + } + } + } + + return addr.IP.String() +} + +// NewServer returns an http Server instance for the given service +func (s *Service) NewServer() *Server { + s.RegisterSDK(Map, Map.Path+"/vimService") + + mux := s.ServeMux + mux.HandleFunc(Map.Path+"/vimServiceVersions.xml", s.ServiceVersions) + mux.HandleFunc(Map.Path+"/vsanServiceVersions.xml", s.ServiceVersionsVsan) + mux.HandleFunc(folderPrefix, s.ServeDatastore) + mux.HandleFunc(guestPrefix, ServeGuest) + mux.HandleFunc(nfcPrefix, ServeNFC) + mux.HandleFunc("/about", s.About) + + if s.Listen == nil { + s.Listen = new(url.URL) + } + ts := internal.NewUnstartedServer(mux, s.Listen.Host) + addr := ts.Listener.Addr().(*net.TCPAddr) + port := strconv.Itoa(addr.Port) + u := &url.URL{ + Scheme: "http", + Host: net.JoinHostPort(defaultIP(addr), port), + Path: Map.Path, + } + if s.TLS != nil { + u.Scheme += "s" + } + + // Redirect clients to this http server, rather than HostSystem.Name + Map.SessionManager().ServiceHostName = u.Host + + // Add vcsim config to OptionManager for use by SDK handlers (see lookup/simulator for example) + m := Map.OptionManager() + for i := range m.Setting { + setting := m.Setting[i].GetOptionValue() + + if strings.HasSuffix(setting.Key, ".uri") { + // Rewrite any URIs with vcsim's host:port + endpoint, err := url.Parse(setting.Value.(string)) + if err == nil { + endpoint.Scheme = u.Scheme + endpoint.Host = u.Host + setting.Value = endpoint.String() + } + } + } + m.Setting = append(m.Setting, + &types.OptionValue{ + Key: "vcsim.server.url", + Value: u.String(), + }, + ) + + u.User = s.Listen.User + if u.User == nil { + u.User = DefaultLogin + } + s.Listen = u + + if s.RegisterEndpoints { + for i := range endpoints { + endpoints[i](s, Map) + } + } + + for _, f := range s.funcs { + pattern := &url.URL{Path: f.pattern} + endpoint, _ := s.ServeMux.Handler(&http.Request{URL: pattern}) + + if mux, ok := endpoint.(muxHandleFunc); ok { + mux.HandleFunc(f.pattern, f.handler) // e.g. vapi/simulator + } else { + s.ServeMux.HandleFunc(f.pattern, f.handler) + } + } + + if s.TLS != nil { + ts.TLS = s.TLS + ts.TLS.ClientAuth = tls.RequestClientCert // Used by SessionManager.LoginExtensionByCertificate + Map.SessionManager().TLSCert = func() string { + return base64.StdEncoding.EncodeToString(ts.TLS.Certificates[0].Certificate[0]) + } + ts.StartTLS() + } else { + ts.Start() + } + + return &Server{ + Server: ts, + URL: u, + } +} + +// Certificate returns the TLS certificate for the Server if started with TLS enabled. +// This method will panic if TLS is not enabled for the server. +func (s *Server) Certificate() *x509.Certificate { + // By default httptest.StartTLS uses http/internal.LocalhostCert, which we can access here: + cert, _ := x509.ParseCertificate(s.TLS.Certificates[0].Certificate[0]) + return cert +} + +// CertificateInfo returns Server.Certificate() as object.HostCertificateInfo +func (s *Server) CertificateInfo() *object.HostCertificateInfo { + info := new(object.HostCertificateInfo) + info.FromCertificate(s.Certificate()) + return info +} + +// CertificateFile returns a file name, where the file contains the PEM encoded Server.Certificate. +// The temporary file is removed when Server.Close() is called. +func (s *Server) CertificateFile() (string, error) { + if s.caFile != "" { + return s.caFile, nil + } + + f, err := os.CreateTemp("", "vcsim-") + if err != nil { + return "", err + } + defer f.Close() + + s.caFile = f.Name() + cert := s.Certificate() + return s.caFile, pem.Encode(f, &pem.Block{Type: "CERTIFICATE", Bytes: cert.Raw}) +} + +// proxy tunnels SDK requests +func (s *Server) proxy(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodConnect { + http.Error(w, "", http.StatusMethodNotAllowed) + return + } + + dst, err := net.Dial("tcp", s.URL.Host) + if err != nil { + http.Error(w, err.Error(), http.StatusBadGateway) + return + } + w.WriteHeader(http.StatusOK) + + src, _, err := w.(http.Hijacker).Hijack() + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + go io.Copy(src, dst) + go func() { + _, _ = io.Copy(dst, src) + _ = dst.Close() + _ = src.Close() + }() +} + +// StartTunnel runs an HTTP proxy for tunneling SDK requests that require TLS client certificate authentication. +func (s *Server) StartTunnel() error { + tunnel := &http.Server{ + Addr: fmt.Sprintf("%s:%d", s.URL.Hostname(), s.Tunnel), + Handler: http.HandlerFunc(s.proxy), + } + + l, err := net.Listen("tcp", tunnel.Addr) + if err != nil { + return err + } + + if s.Tunnel == 0 { + s.Tunnel = l.Addr().(*net.TCPAddr).Port + } + + // Set client proxy port (defaults to vCenter host port 80 in real life) + q := s.URL.Query() + q.Set("GOVMOMI_TUNNEL_PROXY_PORT", strconv.Itoa(s.Tunnel)) + s.URL.RawQuery = q.Encode() + + go tunnel.Serve(l) + + return nil +} + +// Close shuts down the server and blocks until all outstanding +// requests on this server have completed. +func (s *Server) Close() { + s.Server.Close() + if s.caFile != "" { + _ = os.Remove(s.caFile) + } +} + +var ( + vim25MapType = types.TypeFunc() +) + +func defaultMapType(name string) (reflect.Type, bool) { + typ, ok := vim25MapType(name) + if !ok { + // See TestIssue945, in which case Go does not resolve the namespace and name == "ns1:TraversalSpec" + // Without this hack, the SelectSet would be all nil's + kind := strings.SplitN(name, ":", 2) + if len(kind) == 2 { + typ, ok = vim25MapType(kind[1]) + } + } + return typ, ok +} + +// Element can be used to defer decoding of an XML node. +type Element struct { + start xml.StartElement + inner struct { + Content string `xml:",innerxml"` + } + typeFunc func(string) (reflect.Type, bool) +} + +func (e *Element) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + e.start = start + + return d.DecodeElement(&e.inner, &start) +} + +func (e *Element) decoder() *xml.Decoder { + decoder := xml.NewDecoder(strings.NewReader(e.inner.Content)) + decoder.TypeFunc = e.typeFunc // required to decode interface types + return decoder +} + +func (e *Element) Decode(val interface{}) error { + return e.decoder().DecodeElement(val, &e.start) +} + +// UnmarshalBody extracts the Body from a soap.Envelope and unmarshals to the corresponding govmomi type +func UnmarshalBody(typeFunc func(string) (reflect.Type, bool), data []byte) (*Method, error) { + body := &Element{typeFunc: typeFunc} + req := soap.Envelope{ + Header: &soap.Header{ + Security: new(Element), + }, + Body: body, + } + + err := xml.Unmarshal(data, &req) + if err != nil { + return nil, fmt.Errorf("xml.Unmarshal: %s", err) + } + + var start xml.StartElement + var ok bool + decoder := body.decoder() + + for { + tok, derr := decoder.Token() + if derr != nil { + return nil, fmt.Errorf("decoding: %s", derr) + } + if start, ok = tok.(xml.StartElement); ok { + break + } + } + + if !ok { + return nil, fmt.Errorf("decoding: method token not found") + } + + kind := start.Name.Local + rtype, ok := typeFunc(kind) + if !ok { + return nil, fmt.Errorf("no vmomi type defined for '%s'", kind) + } + + val := reflect.New(rtype).Interface() + + err = decoder.DecodeElement(val, &start) + if err != nil { + return nil, fmt.Errorf("decoding %s: %s", kind, err) + } + + method := &Method{Name: kind, Header: *req.Header, Body: val} + + field := reflect.ValueOf(val).Elem().FieldByName("This") + + method.This = field.Interface().(types.ManagedObjectReference) + + return method, nil +} + +func newInvalidStateFault(format string, args ...any) *types.InvalidState { + msg := fmt.Sprintf(format, args...) + return &types.InvalidState{ + VimFault: types.VimFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{ + Reason: msg, + }, + LocalizedMessage: msg, + }, + }, + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/snapshot.go b/vendor/github.com/vmware/govmomi/simulator/snapshot.go new file mode 100644 index 0000000000..4abfbfcd58 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/snapshot.go @@ -0,0 +1,176 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "os" + "path" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type VirtualMachineSnapshot struct { + mo.VirtualMachineSnapshot + DataSets map[string]*DataSet +} + +func (v *VirtualMachineSnapshot) createSnapshotFiles() types.BaseMethodFault { + vm := Map.Get(v.Vm).(*VirtualMachine) + + snapshotDirectory := vm.Config.Files.SnapshotDirectory + if snapshotDirectory == "" { + snapshotDirectory = vm.Config.Files.VmPathName + } + + index := 1 + for { + fileName := fmt.Sprintf("%s-Snapshot%d.vmsn", vm.Name, index) + f, err := vm.createFile(snapshotDirectory, fileName, false) + if err != nil { + switch err.(type) { + case *types.FileAlreadyExists: + index++ + continue + default: + return err + } + } + + _ = f.Close() + + p, _ := parseDatastorePath(snapshotDirectory) + vm.useDatastore(p.Datastore) + datastorePath := object.DatastorePath{ + Datastore: p.Datastore, + Path: path.Join(p.Path, fileName), + } + + dataLayoutKey := vm.addFileLayoutEx(datastorePath, 0) + vm.addSnapshotLayout(v.Self, dataLayoutKey) + vm.addSnapshotLayoutEx(v.Self, dataLayoutKey, -1) + + return nil + } +} + +func (v *VirtualMachineSnapshot) removeSnapshotFiles(ctx *Context) types.BaseMethodFault { + // TODO: also remove delta disks that were created when snapshot was taken + + vm := ctx.Map.Get(v.Vm).(*VirtualMachine) + + for idx, sLayout := range vm.Layout.Snapshot { + if sLayout.Key == v.Self { + vm.Layout.Snapshot = append(vm.Layout.Snapshot[:idx], vm.Layout.Snapshot[idx+1:]...) + break + } + } + + for idx, sLayoutEx := range vm.LayoutEx.Snapshot { + if sLayoutEx.Key == v.Self { + for _, file := range vm.LayoutEx.File { + if file.Key == sLayoutEx.DataKey || file.Key == sLayoutEx.MemoryKey { + p, fault := parseDatastorePath(file.Name) + if fault != nil { + return fault + } + + host := ctx.Map.Get(*vm.Runtime.Host).(*HostSystem) + datastore := ctx.Map.FindByName(p.Datastore, host.Datastore).(*Datastore) + dFilePath := path.Join(datastore.Info.GetDatastoreInfo().Url, p.Path) + + _ = os.Remove(dFilePath) + } + } + + vm.LayoutEx.Snapshot = append(vm.LayoutEx.Snapshot[:idx], vm.LayoutEx.Snapshot[idx+1:]...) + } + } + + vm.RefreshStorageInfo(ctx, nil) + + return nil +} + +func (v *VirtualMachineSnapshot) RemoveSnapshotTask(ctx *Context, req *types.RemoveSnapshot_Task) soap.HasFault { + task := CreateTask(v.Vm, "removeSnapshot", func(t *Task) (types.AnyType, types.BaseMethodFault) { + var changes []types.PropertyChange + + vm := ctx.Map.Get(v.Vm).(*VirtualMachine) + ctx.WithLock(vm, func() { + if vm.Snapshot.CurrentSnapshot != nil && *vm.Snapshot.CurrentSnapshot == req.This { + parent := findParentSnapshotInTree(vm.Snapshot.RootSnapshotList, req.This) + changes = append(changes, types.PropertyChange{Name: "snapshot.currentSnapshot", Val: parent}) + } + + rootSnapshots := removeSnapshotInTree(vm.Snapshot.RootSnapshotList, req.This, req.RemoveChildren) + changes = append(changes, types.PropertyChange{Name: "snapshot.rootSnapshotList", Val: rootSnapshots}) + + rootSnapshotRefs := make([]types.ManagedObjectReference, len(rootSnapshots)) + for i, rs := range rootSnapshots { + rootSnapshotRefs[i] = rs.Snapshot + } + changes = append(changes, types.PropertyChange{Name: "rootSnapshot", Val: rootSnapshotRefs}) + + if len(rootSnapshots) == 0 { + changes = []types.PropertyChange{ + {Name: "snapshot", Val: nil}, + {Name: "rootSnapshot", Val: nil}, + } + } + + ctx.Map.Get(req.This).(*VirtualMachineSnapshot).removeSnapshotFiles(ctx) + + ctx.Update(vm, changes) + }) + + ctx.Map.Remove(ctx, req.This) + + return nil, nil + }) + + return &methods.RemoveSnapshot_TaskBody{ + Res: &types.RemoveSnapshot_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (v *VirtualMachineSnapshot) RevertToSnapshotTask(ctx *Context, req *types.RevertToSnapshot_Task) soap.HasFault { + task := CreateTask(v.Vm, "revertToSnapshot", func(t *Task) (types.AnyType, types.BaseMethodFault) { + vm := ctx.Map.Get(v.Vm).(*VirtualMachine) + + ctx.WithLock(vm, func() { + vm.DataSets = copyDataSetsForVmClone(v.DataSets) + ctx.Update(vm, []types.PropertyChange{ + {Name: "snapshot.currentSnapshot", Val: v.Self}, + }) + }) + + return nil, nil + }) + + return &methods.RevertToSnapshot_TaskBody{ + Res: &types.RevertToSnapshot_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/storage_resource_manager.go b/vendor/github.com/vmware/govmomi/simulator/storage_resource_manager.go new file mode 100644 index 0000000000..d169d6d079 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/storage_resource_manager.go @@ -0,0 +1,184 @@ +/* +Copyright (c) 2018 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strconv" + "time" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type StorageResourceManager struct { + mo.StorageResourceManager +} + +func (m *StorageResourceManager) ConfigureStorageDrsForPodTask(ctx *Context, req *types.ConfigureStorageDrsForPod_Task) soap.HasFault { + task := CreateTask(m, "configureStorageDrsForPod", func(*Task) (types.AnyType, types.BaseMethodFault) { + cluster := Map.Get(req.Pod).(*StoragePod) + + if s := req.Spec.PodConfigSpec; s != nil { + config := &cluster.PodStorageDrsEntry.StorageDrsConfig.PodConfig + + if s.Enabled != nil { + config.Enabled = *s.Enabled + } + if s.DefaultVmBehavior != "" { + config.DefaultVmBehavior = s.DefaultVmBehavior + } + } + + return nil, nil + }) + + return &methods.ConfigureStorageDrsForPod_TaskBody{ + Res: &types.ConfigureStorageDrsForPod_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *StorageResourceManager) pod(ref *types.ManagedObjectReference) *StoragePod { + if ref == nil { + return nil + } + cluster := Map.Get(*ref).(*StoragePod) + config := &cluster.PodStorageDrsEntry.StorageDrsConfig.PodConfig + + if !config.Enabled { + return nil + } + + if len(cluster.ChildEntity) == 0 { + return nil + } + + return cluster +} + +func (m *StorageResourceManager) RecommendDatastores(req *types.RecommendDatastores) soap.HasFault { + spec := req.StorageSpec.PodSelectionSpec + body := new(methods.RecommendDatastoresBody) + res := new(types.RecommendDatastoresResponse) + key := 0 + invalid := func(prop string) soap.HasFault { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: prop, + }) + return body + } + add := func(cluster *StoragePod, ds types.ManagedObjectReference) { + key++ + res.Returnval.Recommendations = append(res.Returnval.Recommendations, types.ClusterRecommendation{ + Key: strconv.Itoa(key), + Type: "V1", + Time: time.Now(), + Rating: 1, + Reason: "storagePlacement", + ReasonText: "Satisfy storage initial placement requests", + WarningText: "", + WarningDetails: (*types.LocalizableMessage)(nil), + Prerequisite: nil, + Action: []types.BaseClusterAction{ + &types.StoragePlacementAction{ + ClusterAction: types.ClusterAction{ + Type: "StoragePlacementV1", + Target: (*types.ManagedObjectReference)(nil), + }, + Vm: (*types.ManagedObjectReference)(nil), + RelocateSpec: types.VirtualMachineRelocateSpec{ + Service: (*types.ServiceLocator)(nil), + Folder: (*types.ManagedObjectReference)(nil), + Datastore: &ds, + DiskMoveType: "moveAllDiskBackingsAndAllowSharing", + Pool: (*types.ManagedObjectReference)(nil), + Host: (*types.ManagedObjectReference)(nil), + Disk: nil, + Transform: "", + DeviceChange: nil, + Profile: nil, + }, + Destination: ds, + SpaceUtilBefore: 5.00297212600708, + SpaceDemandBefore: 5.00297212600708, + SpaceUtilAfter: 5.16835880279541, + SpaceDemandAfter: 5.894514083862305, + IoLatencyBefore: 0, + }, + }, + Target: &cluster.Self, + }) + } + + var devices object.VirtualDeviceList + + switch types.StoragePlacementSpecPlacementType(req.StorageSpec.Type) { + case types.StoragePlacementSpecPlacementTypeCreate: + if req.StorageSpec.ResourcePool == nil { + return invalid("resourcePool") + } + if req.StorageSpec.ConfigSpec == nil { + return invalid("configSpec") + } + for _, d := range req.StorageSpec.ConfigSpec.DeviceChange { + devices = append(devices, d.GetVirtualDeviceConfigSpec().Device) + } + cluster := m.pod(spec.StoragePod) + if cluster == nil { + if f := req.StorageSpec.ConfigSpec.Files; f == nil || f.VmPathName == "" { + return invalid("configSpec.files") + } + } + case types.StoragePlacementSpecPlacementTypeClone: + if req.StorageSpec.Folder == nil { + return invalid("folder") + } + if req.StorageSpec.Vm == nil { + return invalid("vm") + } + if req.StorageSpec.CloneName == "" { + return invalid("cloneName") + } + if req.StorageSpec.CloneSpec == nil { + return invalid("cloneSpec") + } + } + + for _, placement := range spec.InitialVmConfig { + cluster := m.pod(&placement.StoragePod) + if cluster == nil { + return invalid("podSelectionSpec.storagePod") + } + + for _, disk := range placement.Disk { + if devices.FindByKey(disk.DiskId) == nil { + return invalid("podSelectionSpec.initialVmConfig.disk.fileBacking") + } + } + + for _, ds := range cluster.ChildEntity { + add(cluster, ds) + } + } + + body.Res = res + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/task.go b/vendor/github.com/vmware/govmomi/simulator/task.go new file mode 100644 index 0000000000..d41274e6de --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/task.go @@ -0,0 +1,273 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "reflect" + "strings" + "time" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +const vTaskSuffix = "_Task" // vmomi suffix +const sTaskSuffix = "Task" // simulator suffix (avoiding golint warning) + +// TaskDelay applies to all tasks. +// Names for DelayConfig.MethodDelay will differ for task and api delays. API +// level names often look like PowerOff_Task, whereas the task name is simply +// PowerOff. +var TaskDelay = DelayConfig{} + +type Task struct { + mo.Task + + ctx *Context + Execute func(*Task) (types.AnyType, types.BaseMethodFault) +} + +func NewTask(runner TaskRunner) *Task { + ref := runner.Reference() + name := reflect.TypeOf(runner).Elem().Name() + name = strings.Replace(name, "VM", "Vm", 1) // "VM" for the type to make go-lint happy, but "Vm" for the vmodl ID + return CreateTask(ref, name, runner.Run) +} + +func CreateTask(e mo.Reference, name string, run func(*Task) (types.AnyType, types.BaseMethodFault)) *Task { + ref := e.Reference() + id := name + + if strings.HasSuffix(id, sTaskSuffix) { + id = id[:len(id)-len(sTaskSuffix)] + name = id + vTaskSuffix + } + + task := &Task{ + Execute: run, + } + + task.Self = Map.newReference(task) + task.Info.Key = task.Self.Value + task.Info.Task = task.Self + task.Info.Name = ucFirst(name) + task.Info.DescriptionId = fmt.Sprintf("%s.%s", ref.Type, id) + task.Info.Entity = &ref + task.Info.EntityName = ref.Value + task.Info.Reason = &types.TaskReasonUser{UserName: "vcsim"} // TODO: Context.Session.User + task.Info.QueueTime = time.Now() + task.Info.State = types.TaskInfoStateQueued + + Map.Put(task) + + return task +} + +type TaskRunner interface { + mo.Reference + + Run(*Task) (types.AnyType, types.BaseMethodFault) +} + +// taskReference is a helper struct so we can call AcquireLock in Run() +type taskReference struct { + Self types.ManagedObjectReference +} + +func (tr *taskReference) Reference() types.ManagedObjectReference { + return tr.Self +} + +func (t *Task) Run(ctx *Context) types.ManagedObjectReference { + t.ctx = ctx + // alias the global Map to reduce data races in tests that reset the + // global Map variable. + vimMap := Map + + vimMap.AtomicUpdate(t.ctx, t, []types.PropertyChange{ + {Name: "info.startTime", Val: time.Now()}, + {Name: "info.state", Val: types.TaskInfoStateRunning}, + }) + + tr := &taskReference{ + Self: *t.Info.Entity, + } + + // in most cases, the caller already holds this lock, and we would like + // the lock to be held across the "hand off" to the async goroutine. + // however, with a TaskDelay, PropertyCollector (for example) cannot read + // any object properties while the lock is held. + handoff := true + if v, ok := TaskDelay.MethodDelay["LockHandoff"]; ok { + handoff = v != 0 + } + var unlock func() + if handoff { + unlock = vimMap.AcquireLock(ctx, tr) + } + go func() { + TaskDelay.delay(t.Info.Name) + if !handoff { + unlock = vimMap.AcquireLock(ctx, tr) + } + res, err := t.Execute(t) + unlock() + + state := types.TaskInfoStateSuccess + var fault interface{} + if err != nil { + state = types.TaskInfoStateError + fault = types.LocalizedMethodFault{ + Fault: err, + LocalizedMessage: fmt.Sprintf("%T", err), + } + } + + vimMap.AtomicUpdate(t.ctx, t, []types.PropertyChange{ + {Name: "info.completeTime", Val: time.Now()}, + {Name: "info.state", Val: state}, + {Name: "info.result", Val: res}, + {Name: "info.error", Val: fault}, + }) + }() + + return t.Self +} + +// RunBlocking() should only be used when an async simulator task needs to wait +// on another async simulator task. +// It polls for task completion to avoid the need to set up a PropertyCollector. +func (t *Task) RunBlocking(ctx *Context) { + _ = t.Run(ctx) + t.Wait() +} + +// Wait blocks until the task is complete. +func (t *Task) Wait() { + // we do NOT want to share our lock with the tasks's context, because + // the goroutine that executes the task will use ctx to update the + // state (among other things). + isolatedLockingContext := &Context{} + + isRunning := func() bool { + var running bool + Map.WithLock(isolatedLockingContext, t, func() { + switch t.Info.State { + case types.TaskInfoStateSuccess, types.TaskInfoStateError: + running = false + default: + running = true + } + }) + return running + } + + for isRunning() { + time.Sleep(10 * time.Millisecond) + } +} + +func (t *Task) isDone() bool { + return t.Info.State == types.TaskInfoStateError || t.Info.State == types.TaskInfoStateSuccess +} + +func (t *Task) SetTaskState(ctx *Context, req *types.SetTaskState) soap.HasFault { + body := new(methods.SetTaskStateBody) + + if t.isDone() { + body.Fault_ = Fault("", new(types.InvalidState)) + return body + } + + changes := []types.PropertyChange{ + {Name: "info.state", Val: req.State}, + } + + switch req.State { + case types.TaskInfoStateRunning: + changes = append(changes, types.PropertyChange{Name: "info.startTime", Val: time.Now()}) + case types.TaskInfoStateError, types.TaskInfoStateSuccess: + changes = append(changes, types.PropertyChange{Name: "info.completeTime", Val: time.Now()}) + + if req.Fault != nil { + changes = append(changes, types.PropertyChange{Name: "info.error", Val: req.Fault}) + } + if req.Result != nil { + changes = append(changes, types.PropertyChange{Name: "info.result", Val: req.Result}) + } + } + + ctx.Update(t, changes) + + body.Res = new(types.SetTaskStateResponse) + return body +} + +func (t *Task) SetTaskDescription(ctx *Context, req *types.SetTaskDescription) soap.HasFault { + body := new(methods.SetTaskDescriptionBody) + + if t.isDone() { + body.Fault_ = Fault("", new(types.InvalidState)) + return body + } + + ctx.Update(t, []types.PropertyChange{{Name: "info.description", Val: req.Description}}) + + body.Res = new(types.SetTaskDescriptionResponse) + return body +} + +func (t *Task) UpdateProgress(ctx *Context, req *types.UpdateProgress) soap.HasFault { + body := new(methods.UpdateProgressBody) + + if t.Info.State != types.TaskInfoStateRunning { + body.Fault_ = Fault("", new(types.InvalidState)) + return body + } + + ctx.Update(t, []types.PropertyChange{{Name: "info.progress", Val: req.PercentDone}}) + + body.Res = new(types.UpdateProgressResponse) + return body +} + +func (t *Task) CancelTask(ctx *Context, req *types.CancelTask) soap.HasFault { + body := new(methods.CancelTaskBody) + + if t.isDone() { + body.Fault_ = Fault("", new(types.InvalidState)) + return body + } + + changes := []types.PropertyChange{ + {Name: "info.cancelled", Val: true}, + {Name: "info.completeTime", Val: time.Now()}, + {Name: "info.state", Val: types.TaskInfoStateError}, + {Name: "info.error", Val: &types.LocalizedMethodFault{ + Fault: &types.RequestCanceled{}, + LocalizedMessage: "The task was canceled by a user", + }}, + } + + ctx.Update(t, changes) + + body.Res = new(types.CancelTaskResponse) + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/task_manager.go b/vendor/github.com/vmware/govmomi/simulator/task_manager.go new file mode 100644 index 0000000000..f04787bc04 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/task_manager.go @@ -0,0 +1,398 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "container/list" + "sync" + "time" + + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/simulator/vpx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var recentTaskMax = 200 // the VC limit + +type TaskManager struct { + mo.TaskManager + sync.Mutex + + history *history +} + +func (m *TaskManager) init(r *Registry) { + if len(m.Description.MethodInfo) == 0 { + if r.IsVPX() { + m.Description = vpx.Description + } else { + m.Description = esx.Description + } + } + + if m.MaxCollector == 0 { + // In real VC this default can be changed via OptionManager "task.maxCollectors" + m.MaxCollector = maxCollectors + } + + m.history = newHistory() + + r.AddHandler(m) +} + +func recentTask(recent []types.ManagedObjectReference, ref types.ManagedObjectReference) []types.PropertyChange { + // TODO: tasks completed > 10m ago should be removed + recent = append(recent, ref) + if len(recent) > recentTaskMax { + recent = recent[1:] + } + return []types.PropertyChange{{Name: "recentTask", Val: recent}} +} + +func (m *TaskManager) PutObject(obj mo.Reference) { + task, ok := obj.(*Task) + if !ok { + return + } + + ctx := SpoofContext() + + // propagate new Tasks to: + // - TaskManager.RecentTask + // - TaskHistoryCollector instances, if Filter matches + // - $MO.RecentTask + m.Lock() + ctx.Update(m, recentTask(m.RecentTask, task.Self)) + + pushHistory(m.history.page, task) + + for _, hc := range m.history.collectors { + c := hc.(*TaskHistoryCollector) + ctx.WithLock(c, func() { + if c.taskMatches(ctx, &task.Info) { + pushHistory(c.page, task) + ctx.Update(c, []types.PropertyChange{{Name: "latestPage", Val: c.GetLatestPage()}}) + } + }) + } + m.Unlock() + + entity := ctx.Map.Get(*task.Info.Entity) + if e, ok := entity.(mo.Entity); ok { + ctx.Update(entity, recentTask(e.Entity().RecentTask, task.Self)) + } +} + +func taskStateChanged(pc []types.PropertyChange) bool { + for i := range pc { + if pc[i].Name == "info.state" { + return true + } + } + return false +} + +func (m *TaskManager) UpdateObject(ctx *Context, obj mo.Reference, pc []types.PropertyChange) { + task, ok := obj.(*mo.Task) + if !ok { + return + } + + if !taskStateChanged(pc) { + // real vCenter only updates latestPage when Tasks are created (see PutObject above) and + // if Task.Info.State changes. + // Changes to Task.Info.{Description,Progress} does not update lastestPage. + return + } + + m.Lock() + for _, hc := range m.history.collectors { + c := hc.(*TaskHistoryCollector) + ctx.WithLock(c, func() { + if c.hasTask(ctx, &task.Info) { + ctx.Update(c, []types.PropertyChange{{Name: "latestPage", Val: c.GetLatestPage()}}) + } + }) + } + m.Unlock() +} + +func (*TaskManager) RemoveObject(*Context, types.ManagedObjectReference) {} + +func validTaskID(ctx *Context, taskID string) bool { + m := ctx.Map.ExtensionManager() + + for _, x := range m.ExtensionList { + for _, task := range x.TaskList { + if task.TaskID == taskID { + return true + } + } + } + + return false +} + +func (m *TaskManager) CreateTask(ctx *Context, req *types.CreateTask) soap.HasFault { + body := &methods.CreateTaskBody{} + + if !validTaskID(ctx, req.TaskTypeId) { + body.Fault_ = Fault("", &types.InvalidArgument{ + InvalidProperty: "taskType", + }) + return body + } + + task := &Task{} + + task.Self = ctx.Map.newReference(task) + task.Info.Key = task.Self.Value + task.Info.Task = task.Self + task.Info.DescriptionId = req.TaskTypeId + task.Info.Cancelable = req.Cancelable + task.Info.Entity = &req.Obj + task.Info.EntityName = req.Obj.Value + task.Info.Reason = &types.TaskReasonUser{UserName: ctx.Session.UserName} + task.Info.QueueTime = time.Now() + task.Info.State = types.TaskInfoStateQueued + + body.Res = &types.CreateTaskResponse{Returnval: task.Info} + + go ctx.Map.Put(task) + + return body +} + +type TaskHistoryCollector struct { + mo.TaskHistoryCollector + + *HistoryCollector +} + +func (m *TaskManager) createCollector(ctx *Context, req *types.CreateCollectorForTasks) (*TaskHistoryCollector, *soap.Fault) { + if len(m.history.collectors) >= int(m.MaxCollector) { + return nil, Fault("Too many task collectors to create", new(types.InvalidState)) + } + + collector := &TaskHistoryCollector{ + HistoryCollector: newHistoryCollector(ctx, m.history, defaultPageSize), + } + collector.Filter = req.Filter + + return collector, nil +} + +// taskFilterChildren returns true if a child of self is the task entity. +func taskFilterChildren(ctx *Context, root types.ManagedObjectReference, task *types.TaskInfo) bool { + seen := false + + var match func(types.ManagedObjectReference) + + match = func(child types.ManagedObjectReference) { + if child == *task.Entity { + seen = true + return + } + + walk(ctx.Map.Get(child), match) + } + + walk(ctx.Map.Get(root), match) + + return seen +} + +// entityMatches returns true if the spec Entity filter matches the task entity. +func (c *TaskHistoryCollector) entityMatches(ctx *Context, task *types.TaskInfo, spec types.TaskFilterSpec) bool { + e := spec.Entity + if e == nil { + return true + } + + isSelf := *task.Entity == e.Entity + + switch e.Recursion { + case types.TaskFilterSpecRecursionOptionSelf: + return isSelf + case types.TaskFilterSpecRecursionOptionChildren: + return taskFilterChildren(ctx, e.Entity, task) + case types.TaskFilterSpecRecursionOptionAll: + return isSelf || taskFilterChildren(ctx, e.Entity, task) + } + + return false +} + +func (c *TaskHistoryCollector) stateMatches(_ *Context, task *types.TaskInfo, spec types.TaskFilterSpec) bool { + if len(spec.State) == 0 { + return true + } + + for _, state := range spec.State { + if task.State == state { + return true + + } + } + + return false +} + +func (c *TaskHistoryCollector) timeMatches(_ *Context, task *types.TaskInfo, spec types.TaskFilterSpec) bool { + if spec.Time == nil { + return true + } + + created := task.QueueTime + + if begin := spec.Time.BeginTime; begin != nil { + if created.Before(*begin) { + return false + } + } + + if end := spec.Time.EndTime; end != nil { + if created.After(*end) { + return false + } + } + + return true +} + +// taskMatches returns true one of the filters matches the task. +func (c *TaskHistoryCollector) taskMatches(ctx *Context, task *types.TaskInfo) bool { + spec := c.Filter.(types.TaskFilterSpec) + + matchers := []func(*Context, *types.TaskInfo, types.TaskFilterSpec) bool{ + c.stateMatches, + c.timeMatches, + c.entityMatches, + // TODO: spec.UserName, etc + } + + for _, match := range matchers { + if !match(ctx, task, spec) { + return false + } + } + + return true +} + +func (c *TaskHistoryCollector) hasTask(_ *Context, task *types.TaskInfo) bool { + for e := c.page.Front(); e != nil; e = e.Next() { + if e.Value.(*Task).Info.Key == task.Key { + return true + } + } + return false +} + +// fillPage copies the manager's latest tasks into the collector's page with Filter applied. +func (m *TaskManager) fillPage(ctx *Context, c *TaskHistoryCollector) { + m.history.Lock() + defer m.history.Unlock() + + for e := m.history.page.Front(); e != nil; e = e.Next() { + task := e.Value.(*Task) + + if c.taskMatches(ctx, &task.Info) { + pushHistory(c.page, task) + } + } +} + +func (m *TaskManager) CreateCollectorForTasks(ctx *Context, req *types.CreateCollectorForTasks) soap.HasFault { + body := new(methods.CreateCollectorForTasksBody) + + if ctx.Map.IsESX() { + body.Fault_ = Fault("", new(types.NotSupported)) + return body + } + + collector, err := m.createCollector(ctx, req) + if err != nil { + body.Fault_ = err + return body + } + + collector.fill = func(x *Context) { m.fillPage(x, collector) } + collector.fill(ctx) + + body.Res = &types.CreateCollectorForTasksResponse{ + Returnval: m.history.add(ctx, collector), + } + + return body +} + +func (c *TaskHistoryCollector) ReadNextTasks(ctx *Context, req *types.ReadNextTasks) soap.HasFault { + body := new(methods.ReadNextTasksBody) + if req.MaxCount <= 0 { + body.Fault_ = Fault("", errInvalidArgMaxCount) + return body + } + body.Res = new(types.ReadNextTasksResponse) + + c.next(req.MaxCount, func(e *list.Element) { + body.Res.Returnval = append(body.Res.Returnval, e.Value.(*Task).Info) + }) + + return body +} + +func (c *TaskHistoryCollector) ReadPreviousTasks(ctx *Context, req *types.ReadPreviousTasks) soap.HasFault { + body := new(methods.ReadPreviousTasksBody) + if req.MaxCount <= 0 { + body.Fault_ = Fault("", errInvalidArgMaxCount) + return body + } + body.Res = new(types.ReadPreviousTasksResponse) + + c.prev(req.MaxCount, func(e *list.Element) { + body.Res.Returnval = append(body.Res.Returnval, e.Value.(*Task).Info) + }) + + return body +} + +func (c *TaskHistoryCollector) GetLatestPage() []types.TaskInfo { + var latestPage []types.TaskInfo + + e := c.page.Back() + for i := 0; i < c.size; i++ { + if e == nil { + break + } + latestPage = append(latestPage, e.Value.(*Task).Info) + e = e.Prev() + } + + return latestPage +} + +func (c *TaskHistoryCollector) Get() mo.Reference { + clone := *c + + clone.LatestPage = clone.GetLatestPage() + + return &clone +} diff --git a/vendor/github.com/vmware/govmomi/simulator/tenant_manager.go b/vendor/github.com/vmware/govmomi/simulator/tenant_manager.go new file mode 100644 index 0000000000..51f06d6195 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/tenant_manager.go @@ -0,0 +1,79 @@ +/* +Copyright (c) 2021 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type TenantManager struct { + mo.TenantTenantManager + + spEntities map[types.ManagedObjectReference]bool +} + +func (t *TenantManager) init(r *Registry) { + t.spEntities = make(map[types.ManagedObjectReference]bool) +} + +func (t *TenantManager) markEntities(entities []types.ManagedObjectReference) { + for _, e := range entities { + t.spEntities[e] = true + } +} + +func (t *TenantManager) unmarkEntities(entities []types.ManagedObjectReference) { + for _, e := range entities { + _, ok := t.spEntities[e] + if ok { + delete(t.spEntities, e) + } + } +} + +func (t *TenantManager) getEntities() []types.ManagedObjectReference { + entities := []types.ManagedObjectReference{} + for e := range t.spEntities { + entities = append(entities, e) + } + return entities +} + +func (t *TenantManager) MarkServiceProviderEntities(req *types.MarkServiceProviderEntities) soap.HasFault { + body := new(methods.MarkServiceProviderEntitiesBody) + t.markEntities(req.Entity) + body.Res = &types.MarkServiceProviderEntitiesResponse{} + return body +} + +func (t *TenantManager) UnmarkServiceProviderEntities(req *types.UnmarkServiceProviderEntities) soap.HasFault { + body := new(methods.UnmarkServiceProviderEntitiesBody) + t.unmarkEntities(req.Entity) + body.Res = &types.UnmarkServiceProviderEntitiesResponse{} + return body +} + +func (t *TenantManager) RetrieveServiceProviderEntities(req *types.RetrieveServiceProviderEntities) soap.HasFault { + body := new(methods.RetrieveServiceProviderEntitiesBody) + body.Res = &types.RetrieveServiceProviderEntitiesResponse{ + Returnval: t.getEntities(), + } + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/user_directory.go b/vendor/github.com/vmware/govmomi/simulator/user_directory.go new file mode 100644 index 0000000000..929409b0fa --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/user_directory.go @@ -0,0 +1,104 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "strings" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +var DefaultUserGroup = []*types.UserSearchResult{ + {FullName: "root", Group: true, Principal: "root"}, + {FullName: "root", Group: false, Principal: "root"}, + {FullName: "administrator", Group: false, Principal: "admin"}, +} + +type UserDirectory struct { + mo.UserDirectory + + userGroup []*types.UserSearchResult +} + +func (m *UserDirectory) init(*Registry) { + m.userGroup = DefaultUserGroup +} + +func (u *UserDirectory) RetrieveUserGroups(req *types.RetrieveUserGroups) soap.HasFault { + compare := compareFunc(req.SearchStr, req.ExactMatch) + + res := u.search(req.FindUsers, req.FindGroups, compare) + + body := &methods.RetrieveUserGroupsBody{ + Res: &types.RetrieveUserGroupsResponse{ + Returnval: res, + }, + } + + return body +} + +func (u *UserDirectory) search(findUsers, findGroups bool, compare func(string) bool) (res []types.BaseUserSearchResult) { + for _, ug := range u.userGroup { + if findUsers && !ug.Group || findGroups && ug.Group { + if compare(ug.Principal) { + res = append(res, ug) + } + } + } + + return res +} + +func (u *UserDirectory) addUser(id string) { + u.add(id, false) +} + +func (u *UserDirectory) removeUser(id string) { + u.remove(id, false) +} + +func (u *UserDirectory) add(id string, group bool) { + user := &types.UserSearchResult{ + FullName: id, + Group: group, + Principal: id, + } + + u.userGroup = append(u.userGroup, user) +} + +func (u *UserDirectory) remove(id string, group bool) { + for i, ug := range u.userGroup { + if ug.Group == group && ug.Principal == id { + u.userGroup = append(u.userGroup[:i], u.userGroup[i+1:]...) + return + } + } +} + +func compareFunc(compared string, exactly bool) func(string) bool { + return func(s string) bool { + if exactly { + return s == compared + } + return strings.Contains(strings.ToLower(s), strings.ToLower(compared)) + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/view_manager.go b/vendor/github.com/vmware/govmomi/simulator/view_manager.go new file mode 100644 index 0000000000..147f202d12 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/view_manager.go @@ -0,0 +1,304 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "reflect" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type ViewManager struct { + mo.ViewManager + + entities map[string]bool +} + +var entities = []struct { + Type reflect.Type + Container bool +}{ + {reflect.TypeOf((*mo.ManagedEntity)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.Folder)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.StoragePod)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.Datacenter)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.ComputeResource)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.ClusterComputeResource)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.HostSystem)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.ResourcePool)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.VirtualApp)(nil)).Elem(), true}, + {reflect.TypeOf((*mo.VirtualMachine)(nil)).Elem(), false}, + {reflect.TypeOf((*mo.Datastore)(nil)).Elem(), false}, + {reflect.TypeOf((*mo.Network)(nil)).Elem(), false}, + {reflect.TypeOf((*mo.OpaqueNetwork)(nil)).Elem(), false}, + {reflect.TypeOf((*mo.DistributedVirtualPortgroup)(nil)).Elem(), false}, + {reflect.TypeOf((*mo.DistributedVirtualSwitch)(nil)).Elem(), false}, + {reflect.TypeOf((*mo.VmwareDistributedVirtualSwitch)(nil)).Elem(), false}, +} + +func (m *ViewManager) init(*Registry) { + m.entities = make(map[string]bool, len(entities)) + for _, e := range entities { + m.entities[e.Type.Name()] = e.Container + } +} + +func destroyView(ref types.ManagedObjectReference) soap.HasFault { + return &methods.DestroyViewBody{ + Res: &types.DestroyViewResponse{}, + } +} + +func (m *ViewManager) CreateContainerView(ctx *Context, req *types.CreateContainerView) soap.HasFault { + body := &methods.CreateContainerViewBody{} + + root := ctx.Map.Get(req.Container) + if root == nil { + body.Fault_ = Fault("", &types.ManagedObjectNotFound{Obj: req.Container}) + return body + } + + if !m.entities[root.Reference().Type] { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "container"}) + return body + } + + container := &ContainerView{ + mo.ContainerView{ + Container: root.Reference(), + Recursive: req.Recursive, + Type: req.Type, + }, + root, + make(map[string]bool), + } + + for _, ctype := range container.Type { + if _, ok := m.entities[ctype]; !ok { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "type"}) + return body + } + + container.types[ctype] = true + + for _, e := range entities { + // Check for embedded types + if f, ok := e.Type.FieldByName(ctype); ok && f.Anonymous { + container.types[e.Type.Name()] = true + } + } + } + + ctx.Session.setReference(container) + + body.Res = &types.CreateContainerViewResponse{ + Returnval: container.Self, + } + + seen := make(map[types.ManagedObjectReference]bool) + container.add(root, seen) + + ctx.Session.Registry.Put(container) + ctx.Map.AddHandler(container) + + return body +} + +type ContainerView struct { + mo.ContainerView + + root mo.Reference + types map[string]bool +} + +func (v *ContainerView) DestroyView(ctx *Context, c *types.DestroyView) soap.HasFault { + ctx.Map.RemoveHandler(v) + ctx.Session.Remove(ctx, c.This) + return destroyView(c.This) +} + +func (v *ContainerView) include(o types.ManagedObjectReference) bool { + if len(v.types) == 0 { + return true + } + + return v.types[o.Type] +} + +func walk(root mo.Reference, f func(child types.ManagedObjectReference)) { + if _, ok := root.(types.ManagedObjectReference); ok || root == nil { + return + } + + var children []types.ManagedObjectReference + + switch e := getManagedObject(root).Addr().Interface().(type) { + case *mo.Datacenter: + children = []types.ManagedObjectReference{e.VmFolder, e.HostFolder, e.DatastoreFolder, e.NetworkFolder} + case *mo.Folder: + children = e.ChildEntity + case *mo.StoragePod: + children = e.ChildEntity + case *mo.ComputeResource: + children = e.Host + children = append(children, *e.ResourcePool) + case *mo.ClusterComputeResource: + children = e.Host + children = append(children, *e.ResourcePool) + case *mo.ResourcePool: + children = e.ResourcePool + children = append(children, e.Vm...) + case *mo.VirtualApp: + children = e.ResourcePool.ResourcePool + children = append(children, e.Vm...) + case *mo.HostSystem: + children = e.Vm + } + + for _, child := range children { + f(child) + } +} + +func (v *ContainerView) add(root mo.Reference, seen map[types.ManagedObjectReference]bool) { + walk(root, func(child types.ManagedObjectReference) { + if v.include(child) { + if !seen[child] { + seen[child] = true + v.View = append(v.View, child) + } + } + + if v.Recursive { + v.add(Map.Get(child), seen) + } + }) +} + +func (v *ContainerView) find(root mo.Reference, ref types.ManagedObjectReference, found *bool) bool { + walk(root, func(child types.ManagedObjectReference) { + if *found { + return + } + if child == ref { + *found = true + return + } + if v.Recursive { + *found = v.find(Map.Get(child), ref, found) + } + }) + + return *found +} + +func (v *ContainerView) PutObject(obj mo.Reference) { + ref := obj.Reference() + + ctx := SpoofContext() + ctx.WithLock(v, func() { + if v.include(ref) && v.find(v.root, ref, types.NewBool(false)) { + ctx.Update(v, []types.PropertyChange{{Name: "view", Val: append(v.View, ref)}}) + } + }) +} + +func (v *ContainerView) RemoveObject(ctx *Context, obj types.ManagedObjectReference) { + ctx.WithLock(v, func() { + ctx.Map.RemoveReference(ctx, v, &v.View, obj) + }) +} + +func (*ContainerView) UpdateObject(*Context, mo.Reference, []types.PropertyChange) {} + +func (m *ViewManager) CreateListView(ctx *Context, req *types.CreateListView) soap.HasFault { + body := new(methods.CreateListViewBody) + list := new(ListView) + + if refs := list.add(ctx, req.Obj); len(refs) != 0 { + body.Fault_ = Fault("", &types.ManagedObjectNotFound{Obj: refs[0]}) + return body + } + + ctx.Session.Put(list) + + body.Res = &types.CreateListViewResponse{ + Returnval: list.Self, + } + + return body +} + +type ListView struct { + mo.ListView +} + +func (v *ListView) update(ctx *Context) { + ctx.Update(v, []types.PropertyChange{{Name: "view", Val: v.View}}) +} + +func (v *ListView) add(ctx *Context, refs []types.ManagedObjectReference) []types.ManagedObjectReference { + var unresolved []types.ManagedObjectReference + for _, ref := range refs { + obj := ctx.Session.Get(ref) + if obj == nil { + unresolved = append(unresolved, ref) + } + v.View = append(v.View, ref) + } + return unresolved +} + +func (v *ListView) DestroyView(ctx *Context, c *types.DestroyView) soap.HasFault { + ctx.Session.Remove(ctx, c.This) + return destroyView(c.This) +} + +func (v *ListView) ModifyListView(ctx *Context, req *types.ModifyListView) soap.HasFault { + body := &methods.ModifyListViewBody{ + Res: new(types.ModifyListViewResponse), + } + + body.Res.Returnval = v.add(ctx, req.Add) + + for _, ref := range req.Remove { + RemoveReference(&v.View, ref) + } + + if len(req.Remove) != 0 || len(req.Add) != 0 { + v.update(ctx) + } + + return body +} + +func (v *ListView) ResetListView(ctx *Context, req *types.ResetListView) soap.HasFault { + body := &methods.ResetListViewBody{ + Res: new(types.ResetListViewResponse), + } + + v.View = nil + + body.Res.Returnval = v.add(ctx, req.Obj) + + v.update(ctx) + + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/virtual_disk_manager.go b/vendor/github.com/vmware/govmomi/simulator/virtual_disk_manager.go new file mode 100644 index 0000000000..3843bdf8eb --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/virtual_disk_manager.go @@ -0,0 +1,291 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "os" + "strconv" + "strings" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type VirtualDiskManager struct { + mo.VirtualDiskManager +} + +func (m *VirtualDiskManager) MO() mo.VirtualDiskManager { + return m.VirtualDiskManager +} + +func vdmNames(name string) []string { + return []string{ + strings.Replace(name, ".vmdk", "-flat.vmdk", 1), + name, + } +} + +func vdmCreateVirtualDisk(op types.VirtualDeviceConfigSpecFileOperation, req *types.CreateVirtualDisk_Task) types.BaseMethodFault { + fm := Map.FileManager() + + file, fault := fm.resolve(req.Datacenter, req.Name) + if fault != nil { + return fault + } + + shouldReplace := op == types.VirtualDeviceConfigSpecFileOperationReplace + shouldExist := op == "" + for _, name := range vdmNames(file) { + _, err := os.Stat(name) + if err == nil { + if shouldExist { + return nil + } + if shouldReplace { + if err = os.Truncate(file, 0); err != nil { + return fm.fault(name, err, new(types.CannotCreateFile)) + } + return nil + } + return fm.fault(name, nil, new(types.FileAlreadyExists)) + } else if shouldExist { + return fm.fault(name, nil, new(types.FileNotFound)) + } + + f, err := os.Create(name) + if err != nil { + return fm.fault(name, err, new(types.CannotCreateFile)) + } + + if req.Spec != nil { + var spec interface{} = req.Spec + fileBackedSpec, ok := spec.(*types.FileBackedVirtualDiskSpec) + + if !ok { + return fm.fault(name, nil, new(types.FileFault)) + } + + if _, err = f.WriteString(strconv.FormatInt(fileBackedSpec.CapacityKb, 10)); err != nil { + return fm.fault(name, err, new(types.FileFault)) + } + } + + _ = f.Close() + } + + return nil +} + +func vdmExtendVirtualDisk(req *types.ExtendVirtualDisk_Task) types.BaseMethodFault { + fm := Map.FileManager() + + file, fault := fm.resolve(req.Datacenter, req.Name) + if fault != nil { + return fault + } + + for _, name := range vdmNames(file) { + _, err := os.Stat(name) + if err == nil { + content, err := os.ReadFile(name) + if err != nil { + return fm.fault(name, err, new(types.FileFault)) + } + + capacity, err := strconv.Atoi(string(content)) + if err != nil { + return fm.fault(name, err, new(types.FileFault)) + } + + if int64(capacity) > req.NewCapacityKb { + // cannot shrink disk + return fm.fault(name, nil, new(types.FileFault)) + } + return nil + } else { + return fm.fault(name, nil, new(types.FileNotFound)) + } + } + + return nil +} + +func (m *VirtualDiskManager) CreateVirtualDiskTask(ctx *Context, req *types.CreateVirtualDisk_Task) soap.HasFault { + task := CreateTask(m, "createVirtualDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + if err := vdmCreateVirtualDisk(types.VirtualDeviceConfigSpecFileOperationCreate, req); err != nil { + return "", err + } + return req.Name, nil + }) + + return &methods.CreateVirtualDisk_TaskBody{ + Res: &types.CreateVirtualDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VirtualDiskManager) ExtendVirtualDiskTask(ctx *Context, req *types.ExtendVirtualDisk_Task) soap.HasFault { + task := CreateTask(m, "extendVirtualDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + if err := vdmExtendVirtualDisk(req); err != nil { + return "", err + } + return req.Name, nil + }) + + return &methods.ExtendVirtualDisk_TaskBody{ + Res: &types.ExtendVirtualDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VirtualDiskManager) DeleteVirtualDiskTask(ctx *Context, req *types.DeleteVirtualDisk_Task) soap.HasFault { + task := CreateTask(m, "deleteVirtualDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + fm := Map.FileManager() + + for _, name := range vdmNames(req.Name) { + err := fm.deleteDatastoreFile(&types.DeleteDatastoreFile_Task{ + Name: name, + Datacenter: req.Datacenter, + }) + + if err != nil { + return nil, err + } + } + + return nil, nil + }) + + return &methods.DeleteVirtualDisk_TaskBody{ + Res: &types.DeleteVirtualDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VirtualDiskManager) MoveVirtualDiskTask(ctx *Context, req *types.MoveVirtualDisk_Task) soap.HasFault { + task := CreateTask(m, "moveVirtualDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + fm := ctx.Map.FileManager() + + dest := vdmNames(req.DestName) + + for i, name := range vdmNames(req.SourceName) { + err := fm.moveDatastoreFile(&types.MoveDatastoreFile_Task{ + SourceName: name, + SourceDatacenter: req.SourceDatacenter, + DestinationName: dest[i], + DestinationDatacenter: req.DestDatacenter, + Force: req.Force, + }) + + if err != nil { + return nil, err + } + } + + return nil, nil + }) + + return &methods.MoveVirtualDisk_TaskBody{ + Res: &types.MoveVirtualDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VirtualDiskManager) CopyVirtualDiskTask(ctx *Context, req *types.CopyVirtualDisk_Task) soap.HasFault { + task := CreateTask(m, "copyVirtualDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + if req.DestSpec != nil { + if ctx.Map.IsVPX() { + return nil, new(types.NotImplemented) + } + } + + fm := ctx.Map.FileManager() + + dest := vdmNames(req.DestName) + + for i, name := range vdmNames(req.SourceName) { + err := fm.copyDatastoreFile(&types.CopyDatastoreFile_Task{ + SourceName: name, + SourceDatacenter: req.SourceDatacenter, + DestinationName: dest[i], + DestinationDatacenter: req.DestDatacenter, + Force: req.Force, + }) + + if err != nil { + return nil, err + } + } + + return nil, nil + }) + + return &methods.CopyVirtualDisk_TaskBody{ + Res: &types.CopyVirtualDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func virtualDiskUUID(dc *types.ManagedObjectReference, file string) string { + if dc != nil { + file = dc.String() + file + } + return uuid.NewSHA1(uuid.NameSpaceOID, []byte(file)).String() +} + +func (m *VirtualDiskManager) QueryVirtualDiskUuid(ctx *Context, req *types.QueryVirtualDiskUuid) soap.HasFault { + body := new(methods.QueryVirtualDiskUuidBody) + + fm := ctx.Map.FileManager() + + file, fault := fm.resolve(req.Datacenter, req.Name) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + _, err := os.Stat(file) + if err != nil { + fault = fm.fault(req.Name, err, new(types.CannotAccessFile)) + body.Fault_ = Fault(fmt.Sprintf("File %s was not found", req.Name), fault) + return body + } + + body.Res = &types.QueryVirtualDiskUuidResponse{ + Returnval: virtualDiskUUID(req.Datacenter, file), + } + + return body +} + +func (m *VirtualDiskManager) SetVirtualDiskUuid(_ *Context, req *types.SetVirtualDiskUuid) soap.HasFault { + body := new(methods.SetVirtualDiskUuidBody) + // TODO: validate uuid format and persist + body.Res = new(types.SetVirtualDiskUuidResponse) + return body +} diff --git a/vendor/github.com/vmware/govmomi/simulator/virtual_machine.go b/vendor/github.com/vmware/govmomi/simulator/virtual_machine.go new file mode 100644 index 0000000000..68f4528c8e --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/virtual_machine.go @@ -0,0 +1,3089 @@ +/* +Copyright (c) 2017-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "bytes" + "fmt" + "log" + "net" + "os" + "path" + "path/filepath" + "reflect" + "strconv" + "strings" + "sync/atomic" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/simulator/esx" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type VirtualMachine struct { + mo.VirtualMachine + DataSets map[string]*DataSet + + log string + sid int32 + svm *simVM + uid uuid.UUID + imc *types.CustomizationSpec +} + +func asVirtualMachineMO(obj mo.Reference) (*mo.VirtualMachine, bool) { + vm, ok := getManagedObject(obj).Addr().Interface().(*mo.VirtualMachine) + return vm, ok +} + +func NewVirtualMachine(ctx *Context, parent types.ManagedObjectReference, spec *types.VirtualMachineConfigSpec) (*VirtualMachine, types.BaseMethodFault) { + vm := &VirtualMachine{} + vm.Parent = &parent + ctx.Map.reference(vm) + + folder := ctx.Map.Get(parent) + + if spec.Name == "" { + return vm, &types.InvalidVmConfig{Property: "configSpec.name"} + } + + if spec.Files == nil || spec.Files.VmPathName == "" { + return vm, &types.InvalidVmConfig{Property: "configSpec.files.vmPathName"} + } + + rspec := types.DefaultResourceConfigSpec() + vm.Guest = &types.GuestInfo{} + vm.Config = &types.VirtualMachineConfigInfo{ + ExtraConfig: []types.BaseOptionValue{&types.OptionValue{Key: "govcsim", Value: "TRUE"}}, + Tools: &types.ToolsConfigInfo{}, + MemoryAllocation: &rspec.MemoryAllocation, + CpuAllocation: &rspec.CpuAllocation, + LatencySensitivity: &types.LatencySensitivity{Level: types.LatencySensitivitySensitivityLevelNormal}, + BootOptions: &types.VirtualMachineBootOptions{}, + CreateDate: types.NewTime(time.Now()), + } + vm.Layout = &types.VirtualMachineFileLayout{} + vm.LayoutEx = &types.VirtualMachineFileLayoutEx{ + Timestamp: time.Now(), + } + vm.Snapshot = nil // intentionally set to nil until a snapshot is created + vm.Storage = &types.VirtualMachineStorageInfo{ + Timestamp: time.Now(), + } + vm.Summary.Guest = &types.VirtualMachineGuestSummary{} + vm.Summary.Vm = &vm.Self + vm.Summary.Storage = &types.VirtualMachineStorageSummary{ + Timestamp: time.Now(), + } + + vmx := vm.vmx(spec) + if vmx.Path == "" { + // Append VM Name as the directory name if not specified + vmx.Path = spec.Name + } + + dc := ctx.Map.getEntityDatacenter(folder.(mo.Entity)) + ds := ctx.Map.FindByName(vmx.Datastore, dc.Datastore).(*Datastore) + dir := path.Join(ds.Info.GetDatastoreInfo().Url, vmx.Path) + + if path.Ext(vmx.Path) == ".vmx" { + dir = path.Dir(dir) + // Ignore error here, deferring to createFile + _ = os.Mkdir(dir, 0700) + } else { + // Create VM directory, renaming if already exists + name := dir + + for i := 0; i < 1024; /* just in case */ i++ { + err := os.Mkdir(name, 0700) + if err != nil { + if os.IsExist(err) { + name = fmt.Sprintf("%s (%d)", dir, i) + continue + } + return nil, &types.FileFault{File: name} + } + break + } + vmx.Path = path.Join(path.Base(name), spec.Name+".vmx") + } + + spec.Files.VmPathName = vmx.String() + + dsPath := path.Dir(spec.Files.VmPathName) + vm.uid = sha1UUID(spec.Files.VmPathName) + + defaults := types.VirtualMachineConfigSpec{ + NumCPUs: 1, + NumCoresPerSocket: 1, + MemoryMB: 32, + Uuid: vm.uid.String(), + InstanceUuid: newUUID(strings.ToUpper(spec.Files.VmPathName)), + Version: esx.HardwareVersion, + Firmware: string(types.GuestOsDescriptorFirmwareTypeBios), + VAppConfig: spec.VAppConfig, + Files: &types.VirtualMachineFileInfo{ + SnapshotDirectory: dsPath, + SuspendDirectory: dsPath, + LogDirectory: dsPath, + }, + } + + // Add the default devices + defaults.DeviceChange, _ = object.VirtualDeviceList(esx.VirtualDevice).ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd) + + err := vm.configure(ctx, &defaults) + if err != nil { + return vm, err + } + + vm.Runtime.PowerState = types.VirtualMachinePowerStatePoweredOff + vm.Runtime.ConnectionState = types.VirtualMachineConnectionStateConnected + vm.Summary.Runtime = vm.Runtime + + vm.Capability.ChangeTrackingSupported = types.NewBool(changeTrackingSupported(spec)) + + vm.Summary.QuickStats.GuestHeartbeatStatus = types.ManagedEntityStatusGray + vm.Summary.OverallStatus = types.ManagedEntityStatusGreen + vm.ConfigStatus = types.ManagedEntityStatusGreen + vm.DataSets = make(map[string]*DataSet) + + // put vm in the folder only if no errors occurred + f, _ := asFolderMO(folder) + folderPutChild(ctx, f, vm) + + return vm, nil +} + +func (o *VirtualMachine) RenameTask(ctx *Context, r *types.Rename_Task) soap.HasFault { + return RenameTask(ctx, o, r) +} + +func (*VirtualMachine) Reload(*types.Reload) soap.HasFault { + return &methods.ReloadBody{Res: new(types.ReloadResponse)} +} + +func (vm *VirtualMachine) event() types.VmEvent { + host := Map.Get(*vm.Runtime.Host).(*HostSystem) + + return types.VmEvent{ + Event: types.Event{ + Datacenter: datacenterEventArgument(host), + ComputeResource: host.eventArgumentParent(), + Host: host.eventArgument(), + Ds: Map.Get(vm.Datastore[0]).(*Datastore).eventArgument(), + Vm: &types.VmEventArgument{ + EntityEventArgument: types.EntityEventArgument{Name: vm.Name}, + Vm: vm.Self, + }, + }, + } +} + +func (vm *VirtualMachine) hostInMM(ctx *Context) bool { + return ctx.Map.Get(*vm.Runtime.Host).(*HostSystem).Runtime.InMaintenanceMode +} + +func (vm *VirtualMachine) apply(spec *types.VirtualMachineConfigSpec) { + if spec.Files == nil { + spec.Files = new(types.VirtualMachineFileInfo) + } + + apply := []struct { + src string + dst *string + }{ + {spec.AlternateGuestName, &vm.Config.AlternateGuestName}, + {spec.Annotation, &vm.Config.Annotation}, + {spec.Firmware, &vm.Config.Firmware}, + {spec.InstanceUuid, &vm.Config.InstanceUuid}, + {spec.LocationId, &vm.Config.LocationId}, + {spec.NpivWorldWideNameType, &vm.Config.NpivWorldWideNameType}, + {spec.Name, &vm.Name}, + {spec.Name, &vm.Config.Name}, + {spec.Name, &vm.Summary.Config.Name}, + {spec.GuestId, &vm.Config.GuestId}, + {spec.GuestId, &vm.Config.GuestFullName}, + {spec.GuestId, &vm.Summary.Guest.GuestId}, + {spec.GuestId, &vm.Summary.Config.GuestId}, + {spec.GuestId, &vm.Summary.Config.GuestFullName}, + {spec.Uuid, &vm.Config.Uuid}, + {spec.Uuid, &vm.Summary.Config.Uuid}, + {spec.InstanceUuid, &vm.Config.InstanceUuid}, + {spec.InstanceUuid, &vm.Summary.Config.InstanceUuid}, + {spec.Version, &vm.Config.Version}, + {spec.Version, &vm.Summary.Config.HwVersion}, + {spec.Files.VmPathName, &vm.Config.Files.VmPathName}, + {spec.Files.VmPathName, &vm.Summary.Config.VmPathName}, + {spec.Files.SnapshotDirectory, &vm.Config.Files.SnapshotDirectory}, + {spec.Files.SuspendDirectory, &vm.Config.Files.SuspendDirectory}, + {spec.Files.LogDirectory, &vm.Config.Files.LogDirectory}, + } + + for _, f := range apply { + if f.src != "" { + *f.dst = f.src + } + } + + applyb := []struct { + src *bool + dst **bool + }{ + {spec.NestedHVEnabled, &vm.Config.NestedHVEnabled}, + {spec.CpuHotAddEnabled, &vm.Config.CpuHotAddEnabled}, + {spec.CpuHotRemoveEnabled, &vm.Config.CpuHotRemoveEnabled}, + {spec.GuestAutoLockEnabled, &vm.Config.GuestAutoLockEnabled}, + {spec.MemoryHotAddEnabled, &vm.Config.MemoryHotAddEnabled}, + {spec.MemoryReservationLockedToMax, &vm.Config.MemoryReservationLockedToMax}, + {spec.MessageBusTunnelEnabled, &vm.Config.MessageBusTunnelEnabled}, + {spec.NpivTemporaryDisabled, &vm.Config.NpivTemporaryDisabled}, + {spec.NpivOnNonRdmDisks, &vm.Config.NpivOnNonRdmDisks}, + {spec.ChangeTrackingEnabled, &vm.Config.ChangeTrackingEnabled}, + } + + for _, f := range applyb { + if f.src != nil { + *f.dst = f.src + } + } + + if spec.Flags != nil { + vm.Config.Flags = *spec.Flags + } + + if spec.LatencySensitivity != nil { + vm.Config.LatencySensitivity = spec.LatencySensitivity + } + + if spec.ManagedBy != nil { + if spec.ManagedBy.ExtensionKey == "" { + spec.ManagedBy = nil + } + vm.Config.ManagedBy = spec.ManagedBy + vm.Summary.Config.ManagedBy = spec.ManagedBy + } + + if spec.BootOptions != nil { + vm.Config.BootOptions = spec.BootOptions + } + + if spec.RepConfig != nil { + vm.Config.RepConfig = spec.RepConfig + } + + if spec.Tools != nil { + vm.Config.Tools = spec.Tools + } + + if spec.ConsolePreferences != nil { + vm.Config.ConsolePreferences = spec.ConsolePreferences + } + + if spec.CpuAffinity != nil { + vm.Config.CpuAffinity = spec.CpuAffinity + } + + if spec.CpuAllocation != nil { + vm.Config.CpuAllocation = spec.CpuAllocation + } + + if spec.MemoryAffinity != nil { + vm.Config.MemoryAffinity = spec.MemoryAffinity + } + + if spec.MemoryAllocation != nil { + vm.Config.MemoryAllocation = spec.MemoryAllocation + } + + if spec.LatencySensitivity != nil { + vm.Config.LatencySensitivity = spec.LatencySensitivity + } + + if spec.MemoryMB != 0 { + vm.Config.Hardware.MemoryMB = int32(spec.MemoryMB) + vm.Summary.Config.MemorySizeMB = vm.Config.Hardware.MemoryMB + } + + if spec.NumCPUs != 0 { + vm.Config.Hardware.NumCPU = spec.NumCPUs + vm.Summary.Config.NumCpu = vm.Config.Hardware.NumCPU + } + + if spec.NumCoresPerSocket != 0 { + vm.Config.Hardware.NumCoresPerSocket = spec.NumCoresPerSocket + } + + if spec.GuestId != "" { + vm.Guest.GuestFamily = guestFamily(spec.GuestId) + } + + vm.Config.Modified = time.Now() +} + +// updateVAppProperty updates the simulator VM with the specified VApp properties. +func (vm *VirtualMachine) updateVAppProperty(spec *types.VmConfigSpec) types.BaseMethodFault { + if vm.Config.VAppConfig == nil { + vm.Config.VAppConfig = &types.VmConfigInfo{} + } + + info := vm.Config.VAppConfig.GetVmConfigInfo() + propertyInfo := info.Property + productInfo := info.Product + + for _, prop := range spec.Property { + var foundIndex int + exists := false + // Check if the specified property exists or not. This helps rejecting invalid + // operations (e.g., Adding a VApp property that already exists) + for i, p := range propertyInfo { + if p.Key == prop.Info.Key { + exists = true + foundIndex = i + break + } + } + + switch prop.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + propertyInfo = append(propertyInfo, *prop.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + propertyInfo[foundIndex] = *prop.Info + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + propertyInfo = append(propertyInfo[:foundIndex], propertyInfo[foundIndex+1:]...) + } + } + + for _, prod := range spec.Product { + var foundIndex int + exists := false + // Check if the specified product exists or not. This helps rejecting invalid + // operations (e.g., Adding a VApp product that already exists) + for i, p := range productInfo { + if p.Key == prod.Info.Key { + exists = true + foundIndex = i + break + } + } + + switch prod.Operation { + case types.ArrayUpdateOperationAdd: + if exists { + return new(types.InvalidArgument) + } + productInfo = append(productInfo, *prod.Info) + case types.ArrayUpdateOperationEdit: + if !exists { + return new(types.InvalidArgument) + } + productInfo[foundIndex] = *prod.Info + case types.ArrayUpdateOperationRemove: + if !exists { + return new(types.InvalidArgument) + } + productInfo = append(productInfo[:foundIndex], productInfo[foundIndex+1:]...) + } + } + + info.Product = productInfo + info.Property = propertyInfo + + return nil +} + +var extraConfigAlias = map[string]string{ + "ip0": "SET.guest.ipAddress", +} + +func extraConfigKey(key string) string { + if k, ok := extraConfigAlias[key]; ok { + return k + } + return key +} + +func (vm *VirtualMachine) applyExtraConfig(ctx *Context, spec *types.VirtualMachineConfigSpec) types.BaseMethodFault { + if len(spec.ExtraConfig) == 0 { + return nil + } + var removedContainerBacking bool + var changes []types.PropertyChange + field := mo.Field{Path: "config.extraConfig"} + + for _, c := range spec.ExtraConfig { + val := c.GetOptionValue() + key := strings.TrimPrefix(extraConfigKey(val.Key), "SET.") + if key == val.Key { + field.Key = key + op := types.PropertyChangeOpAssign + keyIndex := -1 + for i := range vm.Config.ExtraConfig { + bov := vm.Config.ExtraConfig[i] + if bov == nil { + continue + } + ov := bov.GetOptionValue() + if ov == nil { + continue + } + if ov.Key == key { + keyIndex = i + break + } + } + if keyIndex < 0 { + op = types.PropertyChangeOpAdd + vm.Config.ExtraConfig = append(vm.Config.ExtraConfig, c) + } else { + if s, ok := val.Value.(string); ok && s == "" { + op = types.PropertyChangeOpRemove + if key == ContainerBackingOptionKey { + removedContainerBacking = true + } + // Remove existing element + vm.Config.ExtraConfig = append( + vm.Config.ExtraConfig[:keyIndex], + vm.Config.ExtraConfig[keyIndex+1:]...) + val = nil + } else { + // Update existing element + vm.Config.ExtraConfig[keyIndex] = val + } + } + + changes = append(changes, types.PropertyChange{Name: field.String(), Val: val, Op: op}) + continue + } + changes = append(changes, types.PropertyChange{Name: key, Val: val.Value}) + + switch key { + case "guest.ipAddress": + if len(vm.Guest.Net) > 0 { + ip := val.Value.(string) + vm.Guest.Net[0].IpAddress = []string{ip} + changes = append(changes, + types.PropertyChange{Name: "summary." + key, Val: ip}, + types.PropertyChange{Name: "guest.net", Val: vm.Guest.Net}, + ) + } + case "guest.hostName": + changes = append(changes, + types.PropertyChange{Name: "summary." + key, Val: val.Value}, + ) + } + } + + // create the container backing before we publish the updates so the simVM is available before handlers + // get triggered + var fault types.BaseMethodFault + if vm.svm == nil { + vm.svm = createSimulationVM(vm) + + // check to see if the VM is already powered on - if so we need to retroactively hit that path here + if vm.Runtime.PowerState == types.VirtualMachinePowerStatePoweredOn { + err := vm.svm.start(ctx) + if err != nil { + // don't attempt to undo the changes already made - just return an error + // we'll retry the svm.start operation on pause/restart calls + fault = &types.VAppConfigFault{ + VimFault: types.VimFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{Reason: err.Error()}, + LocalizedMessage: err.Error()}}}} + } + } + } else if removedContainerBacking { + err := vm.svm.remove(ctx) + if err == nil { + // remove link from container to VM so callbacks no longer reflect state + vm.svm.vm = nil + // nil container backing reference to return this to a pure in-mem simulated VM + vm.svm = nil + + } else { + // don't attempt to undo the changes already made - just return an error + // we'll retry the svm.start operation on pause/restart calls + fault = &types.VAppConfigFault{ + VimFault: types.VimFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{Reason: err.Error()}, + LocalizedMessage: err.Error()}}}} + } + } + + change := types.PropertyChange{Name: field.Path, Val: vm.Config.ExtraConfig} + ctx.Update(vm, append(changes, change)) + + return fault +} + +func validateGuestID(id string) types.BaseMethodFault { + for _, x := range GuestID { + if id == string(x) { + return nil + } + } + + return &types.InvalidArgument{InvalidProperty: "configSpec.guestId"} +} + +func (vm *VirtualMachine) configure(ctx *Context, spec *types.VirtualMachineConfigSpec) (result types.BaseMethodFault) { + defer func() { + if result == nil { + vm.updateLastModifiedAndChangeVersion(ctx) + } + }() + + vm.apply(spec) + + if spec.MemoryAllocation != nil { + if err := updateResourceAllocation("memory", spec.MemoryAllocation, vm.Config.MemoryAllocation); err != nil { + return err + } + } + + if spec.CpuAllocation != nil { + if err := updateResourceAllocation("cpu", spec.CpuAllocation, vm.Config.CpuAllocation); err != nil { + return err + } + } + + if spec.GuestId != "" { + if err := validateGuestID(spec.GuestId); err != nil { + return err + } + } + + if o := spec.BootOptions; o != nil { + if isTrue(o.EfiSecureBootEnabled) && vm.Config.Firmware != string(types.GuestOsDescriptorFirmwareTypeEfi) { + return &types.InvalidVmConfig{Property: "msg.hostd.configSpec.efi"} + } + } + + if spec.VAppConfig != nil { + if err := vm.updateVAppProperty(spec.VAppConfig.GetVmConfigSpec()); err != nil { + return err + } + } + + if spec.Crypto != nil { + if err := vm.updateCrypto(ctx, spec.Crypto); err != nil { + return err + } + } + + return vm.configureDevices(ctx, spec) +} + +func getVMFileType(fileName string) types.VirtualMachineFileLayoutExFileType { + var fileType types.VirtualMachineFileLayoutExFileType + + fileExt := path.Ext(fileName) + fileNameNoExt := strings.TrimSuffix(fileName, fileExt) + + switch fileExt { + case ".vmx": + fileType = types.VirtualMachineFileLayoutExFileTypeConfig + case ".core": + fileType = types.VirtualMachineFileLayoutExFileTypeCore + case ".vmdk": + fileType = types.VirtualMachineFileLayoutExFileTypeDiskDescriptor + if strings.HasSuffix(fileNameNoExt, "-digest") { + fileType = types.VirtualMachineFileLayoutExFileTypeDigestDescriptor + } + + extentSuffixes := []string{"-flat", "-delta", "-s", "-rdm", "-rdmp"} + for _, suffix := range extentSuffixes { + if strings.HasSuffix(fileNameNoExt, suffix) { + fileType = types.VirtualMachineFileLayoutExFileTypeDiskExtent + } else if strings.HasSuffix(fileNameNoExt, "-digest"+suffix) { + fileType = types.VirtualMachineFileLayoutExFileTypeDigestExtent + } + } + case ".psf": + fileType = types.VirtualMachineFileLayoutExFileTypeDiskReplicationState + case ".vmxf": + fileType = types.VirtualMachineFileLayoutExFileTypeExtendedConfig + case ".vmft": + fileType = types.VirtualMachineFileLayoutExFileTypeFtMetadata + case ".log": + fileType = types.VirtualMachineFileLayoutExFileTypeLog + case ".nvram": + fileType = types.VirtualMachineFileLayoutExFileTypeNvram + case ".png", ".bmp": + fileType = types.VirtualMachineFileLayoutExFileTypeScreenshot + case ".vmsn": + fileType = types.VirtualMachineFileLayoutExFileTypeSnapshotData + case ".vmsd": + fileType = types.VirtualMachineFileLayoutExFileTypeSnapshotList + case ".xml": + if strings.HasSuffix(fileNameNoExt, "-aux") { + fileType = types.VirtualMachineFileLayoutExFileTypeSnapshotManifestList + } + case ".stat": + fileType = types.VirtualMachineFileLayoutExFileTypeStat + case ".vmss": + fileType = types.VirtualMachineFileLayoutExFileTypeSuspend + case ".vmem": + if strings.Contains(fileNameNoExt, "Snapshot") { + fileType = types.VirtualMachineFileLayoutExFileTypeSnapshotMemory + } else { + fileType = types.VirtualMachineFileLayoutExFileTypeSuspendMemory + } + case ".vswp": + if strings.HasPrefix(fileNameNoExt, "vmx-") { + fileType = types.VirtualMachineFileLayoutExFileTypeUwswap + } else { + fileType = types.VirtualMachineFileLayoutExFileTypeSwap + } + case "": + if strings.HasPrefix(fileNameNoExt, "imcf-") { + fileType = types.VirtualMachineFileLayoutExFileTypeGuestCustomization + } + } + + return fileType +} + +func (vm *VirtualMachine) addFileLayoutEx(datastorePath object.DatastorePath, fileSize int64) int32 { + var newKey int32 + for _, layoutFile := range vm.LayoutEx.File { + if layoutFile.Name == datastorePath.String() { + return layoutFile.Key + } + + if layoutFile.Key >= newKey { + newKey = layoutFile.Key + 1 + } + } + + fileType := getVMFileType(filepath.Base(datastorePath.Path)) + + switch fileType { + case types.VirtualMachineFileLayoutExFileTypeNvram, types.VirtualMachineFileLayoutExFileTypeSnapshotList: + vm.addConfigLayout(datastorePath.Path) + case types.VirtualMachineFileLayoutExFileTypeLog: + vm.addLogLayout(datastorePath.Path) + case types.VirtualMachineFileLayoutExFileTypeSwap: + vm.addSwapLayout(datastorePath.String()) + } + + vm.LayoutEx.File = append(vm.LayoutEx.File, types.VirtualMachineFileLayoutExFileInfo{ + Accessible: types.NewBool(true), + BackingObjectId: "", + Key: newKey, + Name: datastorePath.String(), + Size: fileSize, + Type: string(fileType), + UniqueSize: fileSize, + }) + + vm.LayoutEx.Timestamp = time.Now() + + vm.updateStorage() + + return newKey +} + +func (vm *VirtualMachine) addConfigLayout(name string) { + for _, config := range vm.Layout.ConfigFile { + if config == name { + return + } + } + + vm.Layout.ConfigFile = append(vm.Layout.ConfigFile, name) + + vm.updateStorage() +} + +func (vm *VirtualMachine) addLogLayout(name string) { + for _, log := range vm.Layout.LogFile { + if log == name { + return + } + } + + vm.Layout.LogFile = append(vm.Layout.LogFile, name) + + vm.updateStorage() +} + +func (vm *VirtualMachine) addSwapLayout(name string) { + vm.Layout.SwapFile = name + + vm.updateStorage() +} + +func (vm *VirtualMachine) addSnapshotLayout(snapshot types.ManagedObjectReference, dataKey int32) { + for _, snapshotLayout := range vm.Layout.Snapshot { + if snapshotLayout.Key == snapshot { + return + } + } + + var snapshotFiles []string + for _, file := range vm.LayoutEx.File { + if file.Key == dataKey || file.Type == "diskDescriptor" { + snapshotFiles = append(snapshotFiles, file.Name) + } + } + + vm.Layout.Snapshot = append(vm.Layout.Snapshot, types.VirtualMachineFileLayoutSnapshotLayout{ + Key: snapshot, + SnapshotFile: snapshotFiles, + }) + + vm.updateStorage() +} + +func (vm *VirtualMachine) addSnapshotLayoutEx(snapshot types.ManagedObjectReference, dataKey int32, memoryKey int32) { + for _, snapshotLayoutEx := range vm.LayoutEx.Snapshot { + if snapshotLayoutEx.Key == snapshot { + return + } + } + + vm.LayoutEx.Snapshot = append(vm.LayoutEx.Snapshot, types.VirtualMachineFileLayoutExSnapshotLayout{ + DataKey: dataKey, + Disk: vm.LayoutEx.Disk, + Key: snapshot, + MemoryKey: memoryKey, + }) + + vm.LayoutEx.Timestamp = time.Now() + + vm.updateStorage() +} + +// Updates both vm.Layout.Disk and vm.LayoutEx.Disk +func (vm *VirtualMachine) updateDiskLayouts() types.BaseMethodFault { + var disksLayout []types.VirtualMachineFileLayoutDiskLayout + var disksLayoutEx []types.VirtualMachineFileLayoutExDiskLayout + + disks := object.VirtualDeviceList(vm.Config.Hardware.Device).SelectByType((*types.VirtualDisk)(nil)) + for _, disk := range disks { + disk := disk.(*types.VirtualDisk) + diskBacking := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) + + diskLayout := &types.VirtualMachineFileLayoutDiskLayout{Key: disk.Key} + diskLayoutEx := &types.VirtualMachineFileLayoutExDiskLayout{Key: disk.Key} + + // Iterate through disk and its parents + for { + dFileName := diskBacking.GetVirtualDeviceFileBackingInfo().FileName + + var fileKeys []int32 + + // Add disk descriptor and extent files + for _, diskName := range vdmNames(dFileName) { + // get full path including datastore location + p, fault := parseDatastorePath(diskName) + if fault != nil { + return fault + } + + datastore := vm.useDatastore(p.Datastore) + dFilePath := path.Join(datastore.Info.GetDatastoreInfo().Url, p.Path) + + var fileSize int64 + // If file can not be opened - fileSize will be 0 + if dFileInfo, err := os.Stat(dFilePath); err == nil { + fileSize = dFileInfo.Size() + } + + diskKey := vm.addFileLayoutEx(*p, fileSize) + fileKeys = append(fileKeys, diskKey) + } + + diskLayout.DiskFile = append(diskLayout.DiskFile, dFileName) + diskLayoutEx.Chain = append(diskLayoutEx.Chain, types.VirtualMachineFileLayoutExDiskUnit{ + FileKey: fileKeys, + }) + + if parent := diskBacking.Parent; parent != nil { + diskBacking = parent + } else { + break + } + } + + disksLayout = append(disksLayout, *diskLayout) + disksLayoutEx = append(disksLayoutEx, *diskLayoutEx) + } + + vm.Layout.Disk = disksLayout + + vm.LayoutEx.Disk = disksLayoutEx + vm.LayoutEx.Timestamp = time.Now() + + vm.updateStorage() + + return nil +} + +func (vm *VirtualMachine) updateStorage() types.BaseMethodFault { + // Committed - sum of Size for each file in vm.LayoutEx.File + // Unshared - sum of Size for each disk (.vmdk) in vm.LayoutEx.File + // Uncommitted - disk capacity minus disk usage (only currently used disk) + var datastoresUsage []types.VirtualMachineUsageOnDatastore + + disks := object.VirtualDeviceList(vm.Config.Hardware.Device).SelectByType((*types.VirtualDisk)(nil)) + + for _, file := range vm.LayoutEx.File { + p, fault := parseDatastorePath(file.Name) + if fault != nil { + return fault + } + + datastore := vm.useDatastore(p.Datastore) + dsUsage := &types.VirtualMachineUsageOnDatastore{ + Datastore: datastore.Self, + } + + for idx, usage := range datastoresUsage { + if usage.Datastore == datastore.Self { + datastoresUsage = append(datastoresUsage[:idx], datastoresUsage[idx+1:]...) + dsUsage = &usage + break + } + } + + dsUsage.Committed = file.Size + + if path.Ext(file.Name) == ".vmdk" { + dsUsage.Unshared = file.Size + } + + for _, disk := range disks { + disk := disk.(*types.VirtualDisk) + backing := disk.Backing.(types.BaseVirtualDeviceFileBackingInfo).GetVirtualDeviceFileBackingInfo() + + if backing.FileName == file.Name { + dsUsage.Uncommitted = disk.CapacityInBytes + } + } + + datastoresUsage = append(datastoresUsage, *dsUsage) + } + + vm.Storage.PerDatastoreUsage = datastoresUsage + vm.Storage.Timestamp = time.Now() + + storageSummary := &types.VirtualMachineStorageSummary{ + Timestamp: time.Now(), + } + + for _, usage := range datastoresUsage { + storageSummary.Committed += usage.Committed + storageSummary.Uncommitted += usage.Uncommitted + storageSummary.Unshared += usage.Unshared + } + + vm.Summary.Storage = storageSummary + + return nil +} + +func (vm *VirtualMachine) RefreshStorageInfo(ctx *Context, req *types.RefreshStorageInfo) soap.HasFault { + body := new(methods.RefreshStorageInfoBody) + + if vm.Runtime.Host == nil { + // VM not fully created + return body + } + + // Validate that all files in vm.LayoutEx.File can still be found + for idx := len(vm.LayoutEx.File) - 1; idx >= 0; idx-- { + file := vm.LayoutEx.File[idx] + + p, fault := parseDatastorePath(file.Name) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + if _, err := os.Stat(p.String()); err != nil { + vm.LayoutEx.File = append(vm.LayoutEx.File[:idx], vm.LayoutEx.File[idx+1:]...) + } + } + + // Directories will be used to locate VM files. + // Does not include information about virtual disk file locations. + locations := []string{ + vm.Config.Files.VmPathName, + vm.Config.Files.SnapshotDirectory, + vm.Config.Files.LogDirectory, + vm.Config.Files.SuspendDirectory, + vm.Config.Files.FtMetadataDirectory, + } + + for _, directory := range locations { + if directory == "" { + continue + } + + p, fault := parseDatastorePath(directory) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + datastore := vm.useDatastore(p.Datastore) + directory := path.Join(datastore.Info.GetDatastoreInfo().Url, p.Path) + + if path.Ext(p.Path) == ".vmx" { + directory = path.Dir(directory) // vm.Config.Files.VmPathName can be a directory or full path to .vmx + } + + if _, err := os.Stat(directory); err != nil { + // Can not access the directory + continue + } + + files, err := os.ReadDir(directory) + if err != nil { + body.Fault_ = Fault("", ctx.Map.FileManager().fault(directory, err, new(types.CannotAccessFile))) + return body + } + + for _, file := range files { + datastorePath := object.DatastorePath{ + Datastore: p.Datastore, + Path: strings.TrimPrefix(file.Name(), datastore.Info.GetDatastoreInfo().Url), + } + info, _ := file.Info() + vm.addFileLayoutEx(datastorePath, info.Size()) + } + } + + fault := vm.updateDiskLayouts() + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + vm.LayoutEx.Timestamp = time.Now() + + body.Res = new(types.RefreshStorageInfoResponse) + + return body +} + +func (vm *VirtualMachine) findDatastore(name string) *Datastore { + host := Map.Get(*vm.Runtime.Host).(*HostSystem) + + return Map.FindByName(name, host.Datastore).(*Datastore) +} + +func (vm *VirtualMachine) useDatastore(name string) *Datastore { + ds := vm.findDatastore(name) + if FindReference(vm.Datastore, ds.Self) == nil { + vm.Datastore = append(vm.Datastore, ds.Self) + } + + return ds +} + +func (vm *VirtualMachine) vmx(spec *types.VirtualMachineConfigSpec) object.DatastorePath { + var p object.DatastorePath + vmx := vm.Config.Files.VmPathName + if spec != nil { + vmx = spec.Files.VmPathName + } + p.FromString(vmx) + return p +} + +func (vm *VirtualMachine) createFile(spec string, name string, register bool) (*os.File, types.BaseMethodFault) { + p, fault := parseDatastorePath(spec) + if fault != nil { + return nil, fault + } + + ds := vm.useDatastore(p.Datastore) + + nhost := len(ds.Host) + if ds.Name == "vsanDatastore" && nhost < 3 { + fault := new(types.CannotCreateFile) + fault.FaultMessage = []types.LocalizableMessage{ + { + Key: "vob.vsanprovider.object.creation.failed", + Message: "Failed to create object.", + }, + { + Key: "vob.vsan.clomd.needMoreFaultDomains2", + Message: fmt.Sprintf("There are currently %d usable fault domains. The operation requires %d more usable fault domains.", nhost, 3-nhost), + }, + } + fault.File = p.Path + return nil, fault + } + + file := path.Join(ds.Info.GetDatastoreInfo().Url, p.Path) + + if name != "" { + if path.Ext(p.Path) == ".vmx" { + file = path.Dir(file) // vm.Config.Files.VmPathName can be a directory or full path to .vmx + } + + file = path.Join(file, name) + } + + if register { + f, err := os.Open(filepath.Clean(file)) + if err != nil { + log.Printf("register %s: %s", vm.Reference(), err) + if os.IsNotExist(err) { + return nil, &types.NotFound{} + } + + return nil, &types.InvalidArgument{} + } + + return f, nil + } + + _, err := os.Stat(file) + if err == nil { + fault := &types.FileAlreadyExists{FileFault: types.FileFault{File: file}} + log.Printf("%T: %s", fault, file) + return nil, fault + } + + // Create parent directory if needed + dir := path.Dir(file) + _, err = os.Stat(dir) + if err != nil { + if os.IsNotExist(err) { + _ = os.Mkdir(dir, 0700) + } + } + + f, err := os.Create(file) + if err != nil { + log.Printf("create(%s): %s", file, err) + return nil, &types.FileFault{ + File: file, + } + } + + return f, nil +} + +// Rather than keep an fd open for each VM, open/close the log for each messages. +// This is ok for now as we do not do any heavy VM logging. +func (vm *VirtualMachine) logPrintf(format string, v ...interface{}) { + f, err := os.OpenFile(vm.log, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0) + if err != nil { + log.Println(err) + return + } + log.New(f, "vmx ", log.Flags()).Printf(format, v...) + _ = f.Close() +} + +func (vm *VirtualMachine) create(ctx *Context, spec *types.VirtualMachineConfigSpec, register bool) types.BaseMethodFault { + vm.apply(spec) + + if spec.Version != "" { + v := strings.TrimPrefix(spec.Version, "vmx-") + _, err := strconv.Atoi(v) + if err != nil { + log.Printf("unsupported hardware version: %s", spec.Version) + return new(types.NotSupported) + } + } + + files := []struct { + spec string + name string + use *string + }{ + {vm.Config.Files.VmPathName, "", nil}, + {vm.Config.Files.VmPathName, fmt.Sprintf("%s.nvram", vm.Name), nil}, + {vm.Config.Files.LogDirectory, "vmware.log", &vm.log}, + } + + for _, file := range files { + f, err := vm.createFile(file.spec, file.name, register) + if err != nil { + return err + } + if file.use != nil { + *file.use = f.Name() + } + _ = f.Close() + } + + vm.logPrintf("created") + + return vm.configureDevices(ctx, spec) +} + +var vmwOUI = net.HardwareAddr([]byte{0x0, 0xc, 0x29}) + +// From http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.vsphere.networking.doc%2FGUID-DC7478FF-DC44-4625-9AD7-38208C56A552.html +// "The host generates generateMAC addresses that consists of the VMware OUI 00:0C:29 and the last three octets in hexadecimal +// +// format of the virtual machine UUID. The virtual machine UUID is based on a hash calculated by using the UUID of the +// ESXi physical machine and the path to the configuration file (.vmx) of the virtual machine." +func (vm *VirtualMachine) generateMAC(unit int32) string { + id := []byte(vm.Config.Uuid) + + offset := len(id) - len(vmwOUI) + key := id[offset] + byte(unit) // add device unit number, giving each VM NIC a unique MAC + id = append([]byte{key}, id[offset+1:]...) + + mac := append(vmwOUI, id...) + + return mac.String() +} + +func numberToString(n int64, sep rune) string { + buf := &bytes.Buffer{} + if n < 0 { + n = -n + buf.WriteRune('-') + } + s := strconv.FormatInt(n, 10) + pos := 3 - (len(s) % 3) + for i := 0; i < len(s); i++ { + if pos == 3 { + if i != 0 { + buf.WriteRune(sep) + } + pos = 0 + } + pos++ + buf.WriteByte(s[i]) + } + + return buf.String() +} + +func getDiskSize(disk *types.VirtualDisk) int64 { + if disk.CapacityInBytes == 0 { + return disk.CapacityInKB * 1024 + } + return disk.CapacityInBytes +} + +func changedDiskSize(oldDisk *types.VirtualDisk, newDiskSpec *types.VirtualDisk) (int64, bool) { + // capacity cannot be decreased + if newDiskSpec.CapacityInBytes > 0 && newDiskSpec.CapacityInBytes < oldDisk.CapacityInBytes { + return 0, false + } + if newDiskSpec.CapacityInKB > 0 && newDiskSpec.CapacityInKB < oldDisk.CapacityInKB { + return 0, false + } + + // NOTE: capacity is ignored if specified value is same as before + if newDiskSpec.CapacityInBytes == oldDisk.CapacityInBytes { + return newDiskSpec.CapacityInKB * 1024, true + } + if newDiskSpec.CapacityInKB == oldDisk.CapacityInKB { + return newDiskSpec.CapacityInBytes, true + } + + // if both set, CapacityInBytes and CapacityInKB must be the same + if newDiskSpec.CapacityInBytes > 0 && newDiskSpec.CapacityInKB > 0 { + if newDiskSpec.CapacityInBytes != newDiskSpec.CapacityInKB*1024 { + return 0, false + } + } + + return newDiskSpec.CapacityInBytes, true +} + +func (vm *VirtualMachine) validateSwitchMembers(id string) types.BaseMethodFault { + var dswitch *DistributedVirtualSwitch + + var find func(types.ManagedObjectReference) + find = func(child types.ManagedObjectReference) { + s, ok := Map.Get(child).(*DistributedVirtualSwitch) + if ok && s.Uuid == id { + dswitch = s + return + } + walk(Map.Get(child), find) + } + f := Map.getEntityDatacenter(vm).NetworkFolder + walk(Map.Get(f), find) // search in NetworkFolder and any sub folders + + if dswitch == nil { + log.Printf("DVS %s cannot be found", id) + return new(types.NotFound) + } + + h := Map.Get(*vm.Runtime.Host).(*HostSystem) + c := hostParent(&h.HostSystem) + isMember := func(val types.ManagedObjectReference) bool { + for _, mem := range dswitch.Summary.HostMember { + if mem == val { + return true + } + } + log.Printf("%s is not a member of VDS %s", h.Name, dswitch.Name) + return false + } + + for _, ref := range c.Host { + if !isMember(ref) { + return &types.InvalidArgument{InvalidProperty: "spec.deviceChange.device.port.switchUuid"} + } + } + + return nil +} + +func (vm *VirtualMachine) configureDevice( + ctx *Context, + devices object.VirtualDeviceList, + spec *types.VirtualDeviceConfigSpec, + oldDevice types.BaseVirtualDevice) types.BaseMethodFault { + + device := spec.Device + d := device.GetVirtualDevice() + var controller types.BaseVirtualController + + key := d.Key + if d.Key <= 0 { + // Keys can't be negative; Key 0 is reserved + d.Key = devices.NewKey() + d.Key *= -1 + } + + // Update device controller's key reference + if key != d.Key { + if device := devices.FindByKey(d.ControllerKey); device != nil { + if c, ok := device.(types.BaseVirtualController); ok { + c := c.GetVirtualController() + for i := range c.Device { + if c.Device[i] == key { + c.Device[i] = d.Key + break + } + } + } + } + } + + // Choose a unique key + for { + if devices.FindByKey(d.Key) == nil { + break + } + d.Key++ + } + + label := devices.Name(device) + summary := label + dc := ctx.Map.getEntityDatacenter(ctx.Map.Get(*vm.Parent).(mo.Entity)) + + switch x := device.(type) { + case types.BaseVirtualEthernetCard: + controller = devices.PickController((*types.VirtualPCIController)(nil)) + var net types.ManagedObjectReference + var name string + + switch b := d.Backing.(type) { + case *types.VirtualEthernetCardNetworkBackingInfo: + name = b.DeviceName + summary = name + net = ctx.Map.FindByName(b.DeviceName, dc.Network).Reference() + b.Network = &net + case *types.VirtualEthernetCardDistributedVirtualPortBackingInfo: + summary = fmt.Sprintf("DVSwitch: %s", b.Port.SwitchUuid) + net.Type = "DistributedVirtualPortgroup" + net.Value = b.Port.PortgroupKey + if err := vm.validateSwitchMembers(b.Port.SwitchUuid); err != nil { + return err + } + } + + ctx.Update(vm, []types.PropertyChange{ + {Name: "summary.config.numEthernetCards", Val: vm.Summary.Config.NumEthernetCards + 1}, + {Name: "network", Val: append(vm.Network, net)}, + }) + + c := x.GetVirtualEthernetCard() + if c.MacAddress == "" { + if c.UnitNumber == nil { + devices.AssignController(device, controller) + } + c.MacAddress = vm.generateMAC(*c.UnitNumber - 7) // Note 7 == PCI offset + } + + vm.Guest.Net = append(vm.Guest.Net, types.GuestNicInfo{ + Network: name, + IpAddress: nil, + MacAddress: c.MacAddress, + Connected: true, + DeviceConfigId: c.Key, + }) + + if spec.Operation == types.VirtualDeviceConfigSpecOperationAdd { + if c.ResourceAllocation == nil { + c.ResourceAllocation = &types.VirtualEthernetCardResourceAllocation{ + Reservation: types.NewInt64(0), + Share: types.SharesInfo{ + Shares: 50, + Level: "normal", + }, + Limit: types.NewInt64(-1), + } + } + } + case *types.VirtualDisk: + if oldDevice == nil { + // NOTE: either of capacityInBytes and capacityInKB may not be specified + x.CapacityInBytes = getDiskSize(x) + x.CapacityInKB = getDiskSize(x) / 1024 + } else { + if oldDisk, ok := oldDevice.(*types.VirtualDisk); ok { + diskSize, ok := changedDiskSize(oldDisk, x) + if !ok { + return &types.InvalidDeviceOperation{} + } + x.CapacityInBytes = diskSize + x.CapacityInKB = diskSize / 1024 + } + } + + summary = fmt.Sprintf("%s KB", numberToString(x.CapacityInKB, ',')) + switch b := d.Backing.(type) { + case *types.VirtualDiskSparseVer2BackingInfo: + // Sparse disk creation not supported in ESX + return &types.DeviceUnsupportedForVmPlatform{ + InvalidDeviceSpec: types.InvalidDeviceSpec{ + InvalidVmConfig: types.InvalidVmConfig{Property: "VirtualDeviceSpec.device.backing"}, + }, + } + case types.BaseVirtualDeviceFileBackingInfo: + info := b.GetVirtualDeviceFileBackingInfo() + var path object.DatastorePath + path.FromString(info.FileName) + + if path.Path == "" { + filename, err := vm.genVmdkPath(path) + if err != nil { + return err + } + + info.FileName = filename + } + + err := vdmCreateVirtualDisk(spec.FileOperation, &types.CreateVirtualDisk_Task{ + Datacenter: &dc.Self, + Name: info.FileName, + }) + if err != nil { + return err + } + + ctx.Update(vm, []types.PropertyChange{ + {Name: "summary.config.numVirtualDisks", Val: vm.Summary.Config.NumVirtualDisks + 1}, + }) + + p, _ := parseDatastorePath(info.FileName) + ds := vm.findDatastore(p.Datastore) + info.Datastore = &ds.Self + + if oldDevice != nil { + if oldDisk, ok := oldDevice.(*types.VirtualDisk); ok { + // add previous capacity to datastore freespace + ctx.WithLock(ds, func() { + ds.Summary.FreeSpace += getDiskSize(oldDisk) + ds.Info.GetDatastoreInfo().FreeSpace = ds.Summary.FreeSpace + }) + } + } + + // then subtract new capacity from datastore freespace + // XXX: compare disk size and free space until windows stat is supported + ctx.WithLock(ds, func() { + ds.Summary.FreeSpace -= getDiskSize(x) + ds.Info.GetDatastoreInfo().FreeSpace = ds.Summary.FreeSpace + }) + + vm.updateDiskLayouts() + + if disk, ok := b.(*types.VirtualDiskFlatVer2BackingInfo); ok { + // These properties default to false + props := []**bool{ + &disk.EagerlyScrub, + &disk.ThinProvisioned, + &disk.WriteThrough, + &disk.Split, + &disk.DigestEnabled, + } + for _, prop := range props { + if *prop == nil { + *prop = types.NewBool(false) + } + } + disk.Uuid = virtualDiskUUID(&dc.Self, info.FileName) + } + } + case *types.VirtualCdrom: + if b, ok := d.Backing.(types.BaseVirtualDeviceFileBackingInfo); ok { + summary = "ISO " + b.GetVirtualDeviceFileBackingInfo().FileName + } + case *types.VirtualFloppy: + if b, ok := d.Backing.(types.BaseVirtualDeviceFileBackingInfo); ok { + summary = "Image " + b.GetVirtualDeviceFileBackingInfo().FileName + } + case *types.VirtualSerialPort: + switch b := d.Backing.(type) { + case types.BaseVirtualDeviceFileBackingInfo: + summary = "File " + b.GetVirtualDeviceFileBackingInfo().FileName + case *types.VirtualSerialPortURIBackingInfo: + summary = "Remote " + b.ServiceURI + } + } + + if d.UnitNumber == nil && controller != nil { + devices.AssignController(device, controller) + } + + if d.DeviceInfo == nil { + d.DeviceInfo = &types.Description{ + Label: label, + Summary: summary, + } + } else { + info := d.DeviceInfo.GetDescription() + if info.Label == "" { + info.Label = label + } + if info.Summary == "" { + info.Summary = summary + } + } + + switch device.(type) { + case types.BaseVirtualEthernetCard, *types.VirtualCdrom, *types.VirtualFloppy, *types.VirtualUSB, *types.VirtualSerialPort: + if d.Connectable == nil { + d.Connectable = &types.VirtualDeviceConnectInfo{StartConnected: true, Connected: true} + } + } + + // device can be connected only if vm is powered on + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOn { + if d.Connectable != nil { + d.Connectable.Connected = false + } + } + + return nil +} + +func (vm *VirtualMachine) removeDevice(ctx *Context, devices object.VirtualDeviceList, spec *types.VirtualDeviceConfigSpec) object.VirtualDeviceList { + key := spec.Device.GetVirtualDevice().Key + + for i, d := range devices { + if d.GetVirtualDevice().Key != key { + continue + } + + devices = append(devices[:i], devices[i+1:]...) + + switch device := spec.Device.(type) { + case *types.VirtualDisk: + if spec.FileOperation == types.VirtualDeviceConfigSpecFileOperationDestroy { + var file string + + switch b := device.Backing.(type) { + case types.BaseVirtualDeviceFileBackingInfo: + file = b.GetVirtualDeviceFileBackingInfo().FileName + + p, _ := parseDatastorePath(file) + ds := vm.findDatastore(p.Datastore) + + ctx.WithLock(ds, func() { + ds.Summary.FreeSpace += getDiskSize(device) + ds.Info.GetDatastoreInfo().FreeSpace = ds.Summary.FreeSpace + }) + } + + if file != "" { + dc := ctx.Map.getEntityDatacenter(vm) + dm := ctx.Map.VirtualDiskManager() + if dc == nil { + continue // parent was destroyed + } + res := dm.DeleteVirtualDiskTask(ctx, &types.DeleteVirtualDisk_Task{ + Name: file, + Datacenter: &dc.Self, + }) + ctask := ctx.Map.Get(res.(*methods.DeleteVirtualDisk_TaskBody).Res.Returnval).(*Task) + ctask.Wait() + } + } + ctx.Update(vm, []types.PropertyChange{ + {Name: "summary.config.numVirtualDisks", Val: vm.Summary.Config.NumVirtualDisks - 1}, + }) + + vm.updateDiskLayouts() + case types.BaseVirtualEthernetCard: + var net types.ManagedObjectReference + + switch b := device.GetVirtualEthernetCard().Backing.(type) { + case *types.VirtualEthernetCardNetworkBackingInfo: + net = *b.Network + case *types.VirtualEthernetCardDistributedVirtualPortBackingInfo: + net.Type = "DistributedVirtualPortgroup" + net.Value = b.Port.PortgroupKey + } + + for j, nicInfo := range vm.Guest.Net { + if nicInfo.DeviceConfigId == key { + vm.Guest.Net = append(vm.Guest.Net[:j], vm.Guest.Net[j+1:]...) + break + } + } + + networks := vm.Network + RemoveReference(&networks, net) + ctx.Update(vm, []types.PropertyChange{ + {Name: "summary.config.numEthernetCards", Val: vm.Summary.Config.NumEthernetCards - 1}, + {Name: "network", Val: networks}, + }) + } + + break + } + + return devices +} + +func (vm *VirtualMachine) genVmdkPath(p object.DatastorePath) (string, types.BaseMethodFault) { + if p.Datastore == "" { + p.FromString(vm.Config.Files.VmPathName) + } + if p.Path == "" { + p.Path = vm.Config.Name + } else { + p.Path = path.Dir(p.Path) + } + vmdir := p.String() + index := 0 + for { + var filename string + if index == 0 { + filename = fmt.Sprintf("%s.vmdk", vm.Config.Name) + } else { + filename = fmt.Sprintf("%s_%d.vmdk", vm.Config.Name, index) + } + + f, err := vm.createFile(vmdir, filename, false) + if err != nil { + switch err.(type) { + case *types.FileAlreadyExists: + index++ + continue + default: + return "", err + } + } + + _ = f.Close() + _ = os.Remove(f.Name()) + + return path.Join(vmdir, filename), nil + } +} + +// Encrypt requires powered off VM with no snapshots. +// Decrypt requires powered off VM. +// Deep recrypt requires powered off VM with no snapshots. +// Shallow recrypt works with VMs in any power state and even if snapshots are +// present as long as it is a single chain and not a tree. +func (vm *VirtualMachine) updateCrypto( + ctx *Context, + spec types.BaseCryptoSpec) types.BaseMethodFault { + + const configKeyId = "config.keyId" + + assertEncrypted := func() types.BaseMethodFault { + if vm.Config.KeyId == nil { + return newInvalidStateFault("vm is not encrypted") + } + return nil + } + + assertPoweredOff := func() types.BaseMethodFault { + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOff { + return &types.InvalidPowerState{ + ExistingState: vm.Runtime.PowerState, + RequestedState: types.VirtualMachinePowerStatePoweredOff, + } + } + return nil + } + + assertNoSnapshots := func(allowSingleChain bool) types.BaseMethodFault { + hasSnapshots := vm.Snapshot != nil && vm.Snapshot.CurrentSnapshot != nil + if !hasSnapshots { + return nil + } + if !allowSingleChain { + return newInvalidStateFault("vm has snapshots") + } + type node = types.VirtualMachineSnapshotTree + var isTreeFn func(nodes []node) types.BaseMethodFault + isTreeFn = func(nodes []node) types.BaseMethodFault { + switch len(nodes) { + case 0: + return nil + case 1: + return isTreeFn(nodes[0].ChildSnapshotList) + default: + return newInvalidStateFault("vm has snapshot tree") + } + } + return isTreeFn(vm.Snapshot.RootSnapshotList) + } + + doRecrypt := func(newKeyID types.CryptoKeyId) types.BaseMethodFault { + if err := assertEncrypted(); err != nil { + return err + } + + var providerID *types.KeyProviderId + if pid := newKeyID.ProviderId; pid != nil { + providerID = &types.KeyProviderId{ + Id: pid.Id, + } + } + + keyID := newKeyID.KeyId + if providerID == nil { + if p, k := getDefaultProvider(ctx, vm, true); p != "" && k != "" { + providerID = &types.KeyProviderId{ + Id: p, + } + keyID = k + } + } else if keyID == "" { + keyID = generateKeyForProvider(ctx, providerID.Id) + } + + ctx.Update(vm, []types.PropertyChange{ + { + Name: configKeyId, + Op: types.PropertyChangeOpAssign, + Val: &types.CryptoKeyId{ + KeyId: keyID, + ProviderId: providerID, + }, + }, + }) + return nil + } + + switch tspec := spec.(type) { + case *types.CryptoSpecDecrypt: + if err := assertPoweredOff(); err != nil { + return err + } + if err := assertNoSnapshots(false); err != nil { + return err + } + if err := assertEncrypted(); err != nil { + return err + } + ctx.Update(vm, []types.PropertyChange{ + { + Name: configKeyId, + Op: types.PropertyChangeOpRemove, + Val: nil, + }, + }) + + case *types.CryptoSpecDeepRecrypt: + if err := assertPoweredOff(); err != nil { + return err + } + if err := assertNoSnapshots(false); err != nil { + return err + } + return doRecrypt(tspec.NewKeyId) + + case *types.CryptoSpecShallowRecrypt: + if err := assertNoSnapshots(true); err != nil { + return err + } + return doRecrypt(tspec.NewKeyId) + + case *types.CryptoSpecEncrypt: + if err := assertPoweredOff(); err != nil { + return err + } + if err := assertNoSnapshots(false); err != nil { + return err + } + if vm.Config.KeyId != nil { + return newInvalidStateFault("vm is already encrypted") + } + + var providerID *types.KeyProviderId + if pid := tspec.CryptoKeyId.ProviderId; pid != nil { + providerID = &types.KeyProviderId{ + Id: pid.Id, + } + } + + keyID := tspec.CryptoKeyId.KeyId + if providerID == nil { + if p, k := getDefaultProvider(ctx, vm, true); p != "" && k != "" { + providerID = &types.KeyProviderId{ + Id: p, + } + keyID = k + } + } else if keyID == "" { + keyID = generateKeyForProvider(ctx, providerID.Id) + } + + ctx.Update(vm, []types.PropertyChange{ + { + Name: configKeyId, + Op: types.PropertyChangeOpAssign, + Val: &types.CryptoKeyId{ + KeyId: keyID, + ProviderId: providerID, + }, + }, + }) + + case *types.CryptoSpecNoOp, + *types.CryptoSpecRegister: + + // No-op + } + + return nil +} + +func (vm *VirtualMachine) configureDevices(ctx *Context, spec *types.VirtualMachineConfigSpec) types.BaseMethodFault { + var changes []types.PropertyChange + field := mo.Field{Path: "config.hardware.device"} + devices := object.VirtualDeviceList(vm.Config.Hardware.Device) + + var err types.BaseMethodFault + for i, change := range spec.DeviceChange { + dspec := change.GetVirtualDeviceConfigSpec() + device := dspec.Device.GetVirtualDevice() + invalid := &types.InvalidDeviceSpec{DeviceIndex: int32(i)} + change := types.PropertyChange{} + + switch dspec.FileOperation { + case types.VirtualDeviceConfigSpecFileOperationCreate: + switch dspec.Device.(type) { + case *types.VirtualDisk: + if device.UnitNumber == nil { + return invalid + } + } + } + + switch dspec.Operation { + case types.VirtualDeviceConfigSpecOperationAdd: + change.Op = types.PropertyChangeOpAdd + + if devices.FindByKey(device.Key) != nil && device.ControllerKey == 0 { + // Note: real ESX does not allow adding base controllers (ControllerKey = 0) + // after VM is created (returns success but device is not added). + continue + } else if device.UnitNumber != nil && devices.SelectByType(dspec.Device).Select(func(d types.BaseVirtualDevice) bool { + base := d.GetVirtualDevice() + if base.UnitNumber != nil { + if base.ControllerKey != device.ControllerKey { + return false + } + return *base.UnitNumber == *device.UnitNumber + } + return false + }) != nil { + // UnitNumber for this device type is taken + return invalid + } + + key := device.Key + err = vm.configureDevice(ctx, devices, dspec, nil) + if err != nil { + return err + } + + devices = append(devices, dspec.Device) + change.Val = dspec.Device + if key != device.Key { + // Update ControllerKey refs + for i := range spec.DeviceChange { + ckey := &spec.DeviceChange[i].GetVirtualDeviceConfigSpec().Device.GetVirtualDevice().ControllerKey + if *ckey == key { + *ckey = device.Key + } + } + } + case types.VirtualDeviceConfigSpecOperationEdit: + rspec := *dspec + oldDevice := devices.FindByKey(device.Key) + if oldDevice == nil { + return invalid + } + rspec.Device = oldDevice + devices = vm.removeDevice(ctx, devices, &rspec) + if device.DeviceInfo != nil { + device.DeviceInfo.GetDescription().Summary = "" // regenerate summary + } + + err = vm.configureDevice(ctx, devices, dspec, oldDevice) + if err != nil { + return err + } + + devices = append(devices, dspec.Device) + change.Val = dspec.Device + case types.VirtualDeviceConfigSpecOperationRemove: + change.Op = types.PropertyChangeOpRemove + + devices = vm.removeDevice(ctx, devices, dspec) + } + + field.Key = device.Key + change.Name = field.String() + changes = append(changes, change) + } + + if len(changes) != 0 { + change := types.PropertyChange{Name: field.Path, Val: []types.BaseVirtualDevice(devices)} + ctx.Update(vm, append(changes, change)) + } + + err = vm.updateDiskLayouts() + if err != nil { + return err + } + + // Do this after device config, as some may apply to the devices themselves (e.g. ethernet -> guest.net) + err = vm.applyExtraConfig(ctx, spec) + if err != nil { + return err + } + + return nil +} + +type powerVMTask struct { + *VirtualMachine + + state types.VirtualMachinePowerState + ctx *Context +} + +func (c *powerVMTask) Run(task *Task) (types.AnyType, types.BaseMethodFault) { + c.logPrintf("running power task: requesting %s, existing %s", + c.state, c.VirtualMachine.Runtime.PowerState) + + if c.VirtualMachine.Runtime.PowerState == c.state { + return nil, &types.InvalidPowerState{ + RequestedState: c.state, + ExistingState: c.VirtualMachine.Runtime.PowerState, + } + } + + var boot types.AnyType + if c.state == types.VirtualMachinePowerStatePoweredOn { + boot = time.Now() + } + + event := c.event() + switch c.state { + case types.VirtualMachinePowerStatePoweredOn: + if c.VirtualMachine.hostInMM(c.ctx) { + return nil, new(types.InvalidState) + } + + err := c.svm.start(c.ctx) + if err != nil { + return nil, &types.MissingPowerOnConfiguration{ + VAppConfigFault: types.VAppConfigFault{ + VimFault: types.VimFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{Reason: err.Error()}, + LocalizedMessage: err.Error()}}}}} + } + c.ctx.postEvent( + &types.VmStartingEvent{VmEvent: event}, + &types.VmPoweredOnEvent{VmEvent: event}, + ) + c.customize(c.ctx) + case types.VirtualMachinePowerStatePoweredOff: + c.svm.stop(c.ctx) + c.ctx.postEvent( + &types.VmStoppingEvent{VmEvent: event}, + &types.VmPoweredOffEvent{VmEvent: event}, + ) + case types.VirtualMachinePowerStateSuspended: + if c.VirtualMachine.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOn { + return nil, &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOn, + ExistingState: c.VirtualMachine.Runtime.PowerState, + } + } + + c.svm.pause(c.ctx) + c.ctx.postEvent( + &types.VmSuspendingEvent{VmEvent: event}, + &types.VmSuspendedEvent{VmEvent: event}, + ) + } + + // copy devices to prevent data race + devices := c.VirtualMachine.cloneDevice() + for _, d := range devices { + conn := d.GetVirtualDevice().Connectable + if conn == nil { + continue + } + + if c.state == types.VirtualMachinePowerStatePoweredOn { + // apply startConnected to current connection + conn.Connected = conn.StartConnected + } else { + conn.Connected = false + } + } + + c.ctx.Update(c.VirtualMachine, []types.PropertyChange{ + {Name: "runtime.powerState", Val: c.state}, + {Name: "summary.runtime.powerState", Val: c.state}, + {Name: "summary.runtime.bootTime", Val: boot}, + {Name: "config.hardware.device", Val: devices}, + }) + + return nil, nil +} + +func (vm *VirtualMachine) PowerOnVMTask(ctx *Context, c *types.PowerOnVM_Task) soap.HasFault { + if vm.Config.Template { + return &methods.PowerOnVM_TaskBody{ + Fault_: Fault("cannot powerOn a template", &types.InvalidState{}), + } + } + + runner := &powerVMTask{vm, types.VirtualMachinePowerStatePoweredOn, ctx} + task := CreateTask(runner.Reference(), "powerOn", runner.Run) + + return &methods.PowerOnVM_TaskBody{ + Res: &types.PowerOnVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) PowerOffVMTask(ctx *Context, c *types.PowerOffVM_Task) soap.HasFault { + runner := &powerVMTask{vm, types.VirtualMachinePowerStatePoweredOff, ctx} + task := CreateTask(runner.Reference(), "powerOff", runner.Run) + + return &methods.PowerOffVM_TaskBody{ + Res: &types.PowerOffVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) SuspendVMTask(ctx *Context, req *types.SuspendVM_Task) soap.HasFault { + runner := &powerVMTask{vm, types.VirtualMachinePowerStateSuspended, ctx} + task := CreateTask(runner.Reference(), "suspend", runner.Run) + + return &methods.SuspendVM_TaskBody{ + Res: &types.SuspendVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) ResetVMTask(ctx *Context, req *types.ResetVM_Task) soap.HasFault { + task := CreateTask(vm, "reset", func(task *Task) (types.AnyType, types.BaseMethodFault) { + res := vm.PowerOffVMTask(ctx, &types.PowerOffVM_Task{This: vm.Self}) + ctask := ctx.Map.Get(res.(*methods.PowerOffVM_TaskBody).Res.Returnval).(*Task) + ctask.Wait() + if ctask.Info.Error != nil { + return nil, ctask.Info.Error.Fault + } + + res = vm.PowerOnVMTask(ctx, &types.PowerOnVM_Task{This: vm.Self}) + ctask = ctx.Map.Get(res.(*methods.PowerOnVM_TaskBody).Res.Returnval).(*Task) + ctask.Wait() + + return nil, nil + }) + + return &methods.ResetVM_TaskBody{ + Res: &types.ResetVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) RebootGuest(ctx *Context, req *types.RebootGuest) soap.HasFault { + body := new(methods.RebootGuestBody) + + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOn { + body.Fault_ = Fault("", &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOn, + ExistingState: vm.Runtime.PowerState, + }) + return body + } + + if vm.Guest.ToolsRunningStatus == string(types.VirtualMachineToolsRunningStatusGuestToolsRunning) { + vm.svm.restart(ctx) + body.Res = new(types.RebootGuestResponse) + } else { + body.Fault_ = Fault("", new(types.ToolsUnavailable)) + } + + return body +} + +func (vm *VirtualMachine) ReconfigVMTask(ctx *Context, req *types.ReconfigVM_Task) soap.HasFault { + task := CreateTask(vm, "reconfigVm", func(t *Task) (types.AnyType, types.BaseMethodFault) { + ctx.postEvent(&types.VmReconfiguredEvent{ + VmEvent: vm.event(), + ConfigSpec: req.Spec, + }) + + if vm.Config.Template { + expect := types.VirtualMachineConfigSpec{ + Name: req.Spec.Name, + Annotation: req.Spec.Annotation, + } + if !reflect.DeepEqual(&req.Spec, &expect) { + log.Printf("template reconfigure only allows name and annotation change") + return nil, new(types.NotSupported) + } + } + + err := vm.configure(ctx, &req.Spec) + + return nil, err + }) + + return &methods.ReconfigVM_TaskBody{ + Res: &types.ReconfigVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) UpgradeVMTask(ctx *Context, req *types.UpgradeVM_Task) soap.HasFault { + body := &methods.UpgradeVM_TaskBody{} + + task := CreateTask(vm, "upgradeVm", func(t *Task) (types.AnyType, types.BaseMethodFault) { + + // InvalidPowerState + // + // 1. Is VM's power state anything other than powered off? + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOff { + return nil, &types.InvalidPowerStateFault{ + ExistingState: vm.Runtime.PowerState, + RequestedState: types.VirtualMachinePowerStatePoweredOff, + } + } + + // InvalidState + // + // 1. Is host on which VM is scheduled in maintenance mode? + // 2. Is VM a template? + // 3. Is VM already the latest hardware version? + var ( + ebRef *types.ManagedObjectReference + latestHardwareVersion string + hostRef = vm.Runtime.Host + supportedHardwareVersions = map[string]struct{}{} + vmHardwareVersionString = vm.Config.Version + ) + if hostRef != nil { + var hostInMaintenanceMode bool + ctx.WithLock(*hostRef, func() { + host := ctx.Map.Get(*hostRef).(*HostSystem) + hostInMaintenanceMode = host.Runtime.InMaintenanceMode + switch host.Parent.Type { + case "ClusterComputeResource": + obj := ctx.Map.Get(*host.Parent).(*ClusterComputeResource) + ebRef = obj.EnvironmentBrowser + case "ComputeResource": + obj := ctx.Map.Get(*host.Parent).(*mo.ComputeResource) + ebRef = obj.EnvironmentBrowser + } + }) + if hostInMaintenanceMode { + return nil, newInvalidStateFault("%s in maintenance mode", hostRef.Value) + } + } + if vm.Config.Template { + return nil, newInvalidStateFault("%s is template", vm.Reference().Value) + } + if ebRef != nil { + ctx.WithLock(*ebRef, func() { + eb := ctx.Map.Get(*ebRef).(*EnvironmentBrowser) + for i := range eb.QueryConfigOptionDescriptorResponse.Returnval { + cod := eb.QueryConfigOptionDescriptorResponse.Returnval[i] + for j := range cod.Host { + if cod.Host[j].Value == hostRef.Value { + supportedHardwareVersions[cod.Key] = struct{}{} + } + if latestHardwareVersion == "" { + if def := cod.DefaultConfigOption; def != nil && *def { + latestHardwareVersion = cod.Key + } + } + } + } + }) + } + + if latestHardwareVersion == "" { + latestHardwareVersion = esx.HardwareVersion + } + if vmHardwareVersionString == latestHardwareVersion { + return nil, newInvalidStateFault("%s is latest version", vm.Reference().Value) + } + if req.Version == "" { + req.Version = latestHardwareVersion + } + + // NotSupported + targetVersion, _ := types.ParseHardwareVersion(req.Version) + if targetVersion.IsValid() { + req.Version = targetVersion.String() + } + if _, ok := supportedHardwareVersions[req.Version]; !ok { + msg := fmt.Sprintf("%s not supported", req.Version) + return nil, &types.NotSupported{ + RuntimeFault: types.RuntimeFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{ + Reason: msg, + }, + LocalizedMessage: msg, + }, + }, + }, + } + } + + // AlreadyUpgraded + vmHardwareVersion, _ := types.ParseHardwareVersion(vmHardwareVersionString) + if targetVersion.IsValid() && vmHardwareVersion.IsValid() && + targetVersion <= vmHardwareVersion { + + return nil, &types.AlreadyUpgradedFault{} + } + + // InvalidArgument + if targetVersion < types.VMX3 { + return nil, &types.InvalidArgument{} + } + + ctx.Update(vm, []types.PropertyChange{ + { + Name: "config.version", Val: targetVersion.String(), + }, + { + Name: "summary.config.hwVersion", Val: targetVersion.String(), + }, + }) + + return nil, nil + }) + + body.Res = &types.UpgradeVM_TaskResponse{ + Returnval: task.Run(ctx), + } + + return body +} + +func (vm *VirtualMachine) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault { + dc := ctx.Map.getEntityDatacenter(vm) + + task := CreateTask(vm, "destroy", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if dc == nil { + return nil, &types.ManagedObjectNotFound{Obj: vm.Self} // If our Parent was destroyed, so were we. + // TODO: should this also trigger container removal? + } + + r := vm.UnregisterVM(ctx, &types.UnregisterVM{ + This: req.This, + }) + + if r.Fault() != nil { + return nil, r.Fault().VimFault().(types.BaseMethodFault) + } + + // Remove all devices + devices := object.VirtualDeviceList(vm.Config.Hardware.Device) + spec, _ := devices.ConfigSpec(types.VirtualDeviceConfigSpecOperationRemove) + vm.configureDevices(ctx, &types.VirtualMachineConfigSpec{DeviceChange: spec}) + + // Delete VM files from the datastore (ignoring result for now) + m := ctx.Map.FileManager() + + _ = m.DeleteDatastoreFileTask(ctx, &types.DeleteDatastoreFile_Task{ + This: m.Reference(), + Name: vm.Config.Files.LogDirectory, + Datacenter: &dc.Self, + }) + + err := vm.svm.remove(ctx) + if err != nil { + return nil, &types.RuntimeFault{ + MethodFault: types.MethodFault{ + FaultCause: &types.LocalizedMethodFault{ + Fault: &types.SystemErrorFault{Reason: err.Error()}, + LocalizedMessage: err.Error()}}} + } + + return nil, nil + }) + + return &methods.Destroy_TaskBody{ + Res: &types.Destroy_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) SetCustomValue(ctx *Context, req *types.SetCustomValue) soap.HasFault { + return SetCustomValue(ctx, req) +} + +func (vm *VirtualMachine) UnregisterVM(ctx *Context, c *types.UnregisterVM) soap.HasFault { + r := &methods.UnregisterVMBody{} + + if vm.Runtime.PowerState == types.VirtualMachinePowerStatePoweredOn { + r.Fault_ = Fault("", &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOff, + ExistingState: vm.Runtime.PowerState, + }) + + return r + } + + host := ctx.Map.Get(*vm.Runtime.Host).(*HostSystem) + ctx.Map.RemoveReference(ctx, host, &host.Vm, vm.Self) + + if vm.ResourcePool != nil { + switch pool := ctx.Map.Get(*vm.ResourcePool).(type) { + case *ResourcePool: + ctx.Map.RemoveReference(ctx, pool, &pool.Vm, vm.Self) + case *VirtualApp: + ctx.Map.RemoveReference(ctx, pool, &pool.Vm, vm.Self) + } + } + + for i := range vm.Datastore { + ds := ctx.Map.Get(vm.Datastore[i]).(*Datastore) + ctx.Map.RemoveReference(ctx, ds, &ds.Vm, vm.Self) + } + + ctx.postEvent(&types.VmRemovedEvent{VmEvent: vm.event()}) + if f, ok := asFolderMO(ctx.Map.getEntityParent(vm, "Folder")); ok { + folderRemoveChild(ctx, f, c.This) + } + + r.Res = new(types.UnregisterVMResponse) + + return r +} + +type vmFolder interface { + CreateVMTask(ctx *Context, c *types.CreateVM_Task) soap.HasFault +} + +func (vm *VirtualMachine) cloneDevice() []types.BaseVirtualDevice { + src := types.ArrayOfVirtualDevice{ + VirtualDevice: vm.Config.Hardware.Device, + } + dst := types.ArrayOfVirtualDevice{} + deepCopy(src, &dst) + return dst.VirtualDevice +} + +func (vm *VirtualMachine) CloneVMTask(ctx *Context, req *types.CloneVM_Task) soap.HasFault { + pool := req.Spec.Location.Pool + if pool == nil { + if !vm.Config.Template { + pool = vm.ResourcePool + } + } + + destHost := vm.Runtime.Host + + if req.Spec.Location.Host != nil { + destHost = req.Spec.Location.Host + } + + folder, _ := asFolderMO(ctx.Map.Get(req.Folder)) + host := ctx.Map.Get(*destHost).(*HostSystem) + event := vm.event() + + ctx.postEvent(&types.VmBeingClonedEvent{ + VmCloneEvent: types.VmCloneEvent{ + VmEvent: event, + }, + DestFolder: folderEventArgument(folder), + DestName: req.Name, + DestHost: *host.eventArgument(), + }) + + vmx := vm.vmx(nil) + vmx.Path = req.Name + if ref := req.Spec.Location.Datastore; ref != nil { + ds := ctx.Map.Get(*ref).(*Datastore).Name + vmx.Datastore = ds + } + + task := CreateTask(vm, "cloneVm", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if pool == nil { + return nil, &types.InvalidArgument{InvalidProperty: "spec.location.pool"} + } + if obj := ctx.Map.FindByName(req.Name, folder.ChildEntity); obj != nil { + return nil, &types.DuplicateName{ + Name: req.Name, + Object: obj.Reference(), + } + } + config := types.VirtualMachineConfigSpec{ + Name: req.Name, + Version: vm.Config.Version, + GuestId: vm.Config.GuestId, + Files: &types.VirtualMachineFileInfo{ + VmPathName: vmx.String(), + }, + } + + // Copying hardware properties + config.NumCPUs = vm.Config.Hardware.NumCPU + config.MemoryMB = int64(vm.Config.Hardware.MemoryMB) + config.NumCoresPerSocket = vm.Config.Hardware.NumCoresPerSocket + config.VirtualICH7MPresent = vm.Config.Hardware.VirtualICH7MPresent + config.VirtualSMCPresent = vm.Config.Hardware.VirtualSMCPresent + + defaultDevices := object.VirtualDeviceList(esx.VirtualDevice) + devices := vm.cloneDevice() + + for _, device := range devices { + var fop types.VirtualDeviceConfigSpecFileOperation + + if defaultDevices.Find(object.VirtualDeviceList(devices).Name(device)) != nil { + // Default devices are added during CreateVMTask + continue + } + + switch disk := device.(type) { + case *types.VirtualDisk: + // TODO: consider VirtualMachineCloneSpec.DiskMoveType + fop = types.VirtualDeviceConfigSpecFileOperationCreate + + // Leave FileName empty so CreateVM will just create a new one under VmPathName + disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo).FileName = "" + disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo).Parent = nil + } + + config.DeviceChange = append(config.DeviceChange, &types.VirtualDeviceConfigSpec{ + Operation: types.VirtualDeviceConfigSpecOperationAdd, + Device: device, + FileOperation: fop, + }) + } + + if dst, src := config, req.Spec.Config; src != nil { + dst.ExtraConfig = src.ExtraConfig + copyNonEmptyValue(&dst.Uuid, &src.Uuid) + copyNonEmptyValue(&dst.InstanceUuid, &src.InstanceUuid) + copyNonEmptyValue(&dst.NumCPUs, &src.NumCPUs) + copyNonEmptyValue(&dst.MemoryMB, &src.MemoryMB) + } + + res := ctx.Map.Get(req.Folder).(vmFolder).CreateVMTask(ctx, &types.CreateVM_Task{ + This: folder.Self, + Config: config, + Pool: *pool, + Host: destHost, + }) + + ctask := ctx.Map.Get(res.(*methods.CreateVM_TaskBody).Res.Returnval).(*Task) + ctask.Wait() + if ctask.Info.Error != nil { + return nil, ctask.Info.Error.Fault + } + + ref := ctask.Info.Result.(types.ManagedObjectReference) + clone := ctx.Map.Get(ref).(*VirtualMachine) + clone.configureDevices(ctx, &types.VirtualMachineConfigSpec{DeviceChange: req.Spec.Location.DeviceChange}) + if req.Spec.Config != nil && req.Spec.Config.DeviceChange != nil { + clone.configureDevices(ctx, &types.VirtualMachineConfigSpec{DeviceChange: req.Spec.Config.DeviceChange}) + } + clone.DataSets = copyDataSetsForVmClone(vm.DataSets) + + if req.Spec.Template { + _ = clone.MarkAsTemplate(&types.MarkAsTemplate{This: clone.Self}) + } + + ctx.postEvent(&types.VmClonedEvent{ + VmCloneEvent: types.VmCloneEvent{VmEvent: clone.event()}, + SourceVm: *event.Vm, + }) + + return ref, nil + }) + + return &methods.CloneVM_TaskBody{ + Res: &types.CloneVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func copyNonEmptyValue[T comparable](dst, src *T) { + if dst == nil || src == nil { + return + } + var t T + if *src == t { + return + } + *dst = *src +} + +func (vm *VirtualMachine) RelocateVMTask(ctx *Context, req *types.RelocateVM_Task) soap.HasFault { + task := CreateTask(vm, "relocateVm", func(t *Task) (types.AnyType, types.BaseMethodFault) { + var changes []types.PropertyChange + + if ref := req.Spec.Datastore; ref != nil { + ds := ctx.Map.Get(*ref).(*Datastore) + ctx.Map.RemoveReference(ctx, ds, &ds.Vm, *ref) + + // TODO: migrate vm.Config.Files, vm.Summary.Config.VmPathName, vm.Layout and vm.LayoutEx + + changes = append(changes, types.PropertyChange{Name: "datastore", Val: []types.ManagedObjectReference{*ref}}) + } + + if ref := req.Spec.Pool; ref != nil { + pool := ctx.Map.Get(*ref).(*ResourcePool) + ctx.Map.RemoveReference(ctx, pool, &pool.Vm, *ref) + + changes = append(changes, types.PropertyChange{Name: "resourcePool", Val: ref}) + } + + if ref := req.Spec.Host; ref != nil { + host := ctx.Map.Get(*ref).(*HostSystem) + ctx.Map.RemoveReference(ctx, host, &host.Vm, *ref) + + changes = append(changes, + types.PropertyChange{Name: "runtime.host", Val: ref}, + types.PropertyChange{Name: "summary.runtime.host", Val: ref}, + ) + } + + if ref := req.Spec.Folder; ref != nil { + folder := ctx.Map.Get(*ref).(*Folder) + ctx.WithLock(folder, func() { + res := folder.MoveIntoFolderTask(ctx, &types.MoveIntoFolder_Task{ + List: []types.ManagedObjectReference{vm.Self}, + }).(*methods.MoveIntoFolder_TaskBody).Res + // Wait for task to complete while we hold the Folder lock + ctx.Map.Get(res.Returnval).(*Task).Wait() + }) + } + + cspec := &types.VirtualMachineConfigSpec{DeviceChange: req.Spec.DeviceChange} + if err := vm.configureDevices(ctx, cspec); err != nil { + return nil, err + } + + ctx.postEvent(&types.VmMigratedEvent{ + VmEvent: vm.event(), + SourceHost: *ctx.Map.Get(*vm.Runtime.Host).(*HostSystem).eventArgument(), + SourceDatacenter: datacenterEventArgument(vm), + SourceDatastore: ctx.Map.Get(vm.Datastore[0]).(*Datastore).eventArgument(), + }) + + ctx.Update(vm, changes) + + return nil, nil + }) + + return &methods.RelocateVM_TaskBody{ + Res: &types.RelocateVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) customize(ctx *Context) { + if vm.imc == nil { + return + } + + event := types.CustomizationEvent{VmEvent: vm.event()} + ctx.postEvent(&types.CustomizationStartedEvent{CustomizationEvent: event}) + + changes := []types.PropertyChange{ + {Name: "config.tools.pendingCustomization", Val: ""}, + } + + hostname := "" + address := "" + + switch c := vm.imc.Identity.(type) { + case *types.CustomizationLinuxPrep: + hostname = customizeName(vm, c.HostName) + case *types.CustomizationSysprep: + hostname = customizeName(vm, c.UserData.ComputerName) + } + + cards := object.VirtualDeviceList(vm.Config.Hardware.Device).SelectByType((*types.VirtualEthernetCard)(nil)) + + for i, s := range vm.imc.NicSettingMap { + nic := &vm.Guest.Net[i] + if s.MacAddress != "" { + nic.MacAddress = strings.ToLower(s.MacAddress) // MacAddress in guest will always be lowercase + card := cards[i].(types.BaseVirtualEthernetCard).GetVirtualEthernetCard() + card.MacAddress = s.MacAddress // MacAddress in Virtual NIC can be any case + card.AddressType = string(types.VirtualEthernetCardMacTypeManual) + } + if nic.DnsConfig == nil { + nic.DnsConfig = new(types.NetDnsConfigInfo) + } + if s.Adapter.DnsDomain != "" { + nic.DnsConfig.DomainName = s.Adapter.DnsDomain + } + if len(s.Adapter.DnsServerList) != 0 { + nic.DnsConfig.IpAddress = s.Adapter.DnsServerList + } + if hostname != "" { + nic.DnsConfig.HostName = hostname + } + if len(vm.imc.GlobalIPSettings.DnsSuffixList) != 0 { + nic.DnsConfig.SearchDomain = vm.imc.GlobalIPSettings.DnsSuffixList + } + if nic.IpConfig == nil { + nic.IpConfig = new(types.NetIpConfigInfo) + } + + switch ip := s.Adapter.Ip.(type) { + case *types.CustomizationCustomIpGenerator: + case *types.CustomizationDhcpIpGenerator: + case *types.CustomizationFixedIp: + if address == "" { + address = ip.IpAddress + } + nic.IpAddress = []string{ip.IpAddress} + nic.IpConfig.IpAddress = []types.NetIpConfigInfoIpAddress{{ + IpAddress: ip.IpAddress, + }} + case *types.CustomizationUnknownIpGenerator: + } + } + + if len(vm.imc.NicSettingMap) != 0 { + changes = append(changes, types.PropertyChange{Name: "guest.net", Val: vm.Guest.Net}) + } + if hostname != "" { + changes = append(changes, types.PropertyChange{Name: "guest.hostName", Val: hostname}) + changes = append(changes, types.PropertyChange{Name: "summary.guest.hostName", Val: hostname}) + } + if address != "" { + changes = append(changes, types.PropertyChange{Name: "guest.ipAddress", Val: address}) + changes = append(changes, types.PropertyChange{Name: "summary.guest.ipAddress", Val: address}) + } + + vm.imc = nil + ctx.Update(vm, changes) + ctx.postEvent(&types.CustomizationSucceeded{CustomizationEvent: event}) +} + +func (vm *VirtualMachine) CustomizeVMTask(ctx *Context, req *types.CustomizeVM_Task) soap.HasFault { + task := CreateTask(vm, "customizeVm", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if vm.hostInMM(ctx) { + return nil, new(types.InvalidState) + } + + if vm.Runtime.PowerState == types.VirtualMachinePowerStatePoweredOn { + return nil, &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOff, + ExistingState: vm.Runtime.PowerState, + } + } + if vm.Config.Tools.PendingCustomization != "" { + return nil, new(types.CustomizationPending) + } + if len(vm.Guest.Net) != len(req.Spec.NicSettingMap) { + return nil, &types.NicSettingMismatch{ + NumberOfNicsInSpec: int32(len(req.Spec.NicSettingMap)), + NumberOfNicsInVM: int32(len(vm.Guest.Net)), + } + } + + vm.imc = &req.Spec + vm.Config.Tools.PendingCustomization = uuid.New().String() + + return nil, nil + }) + + return &methods.CustomizeVM_TaskBody{ + Res: &types.CustomizeVM_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) CreateSnapshotTask(ctx *Context, req *types.CreateSnapshot_Task) soap.HasFault { + task := CreateTask(vm, "createSnapshot", func(t *Task) (types.AnyType, types.BaseMethodFault) { + var changes []types.PropertyChange + + if vm.Snapshot == nil { + vm.Snapshot = &types.VirtualMachineSnapshotInfo{} + } + + snapshot := &VirtualMachineSnapshot{} + snapshot.Vm = vm.Reference() + snapshot.Config = *vm.Config + snapshot.DataSets = copyDataSetsForVmClone(vm.DataSets) + + ctx.Map.Put(snapshot) + + treeItem := types.VirtualMachineSnapshotTree{ + Snapshot: snapshot.Self, + Vm: snapshot.Vm, + Name: req.Name, + Description: req.Description, + Id: atomic.AddInt32(&vm.sid, 1), + CreateTime: time.Now(), + State: vm.Runtime.PowerState, + Quiesced: req.Quiesce, + BackupManifest: "", + ReplaySupported: types.NewBool(false), + } + + cur := vm.Snapshot.CurrentSnapshot + if cur != nil { + parent := ctx.Map.Get(*cur).(*VirtualMachineSnapshot) + parent.ChildSnapshot = append(parent.ChildSnapshot, snapshot.Self) + + ss := findSnapshotInTree(vm.Snapshot.RootSnapshotList, *cur) + ss.ChildSnapshotList = append(ss.ChildSnapshotList, treeItem) + } else { + changes = append(changes, types.PropertyChange{ + Name: "snapshot.rootSnapshotList", + Val: append(vm.Snapshot.RootSnapshotList, treeItem), + }) + changes = append(changes, types.PropertyChange{ + Name: "rootSnapshot", + Val: append(vm.RootSnapshot, treeItem.Snapshot), + }) + } + + snapshot.createSnapshotFiles() + + changes = append(changes, types.PropertyChange{Name: "snapshot.currentSnapshot", Val: snapshot.Self}) + ctx.Update(vm, changes) + + return snapshot.Self, nil + }) + + return &methods.CreateSnapshot_TaskBody{ + Res: &types.CreateSnapshot_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) RevertToCurrentSnapshotTask(ctx *Context, req *types.RevertToCurrentSnapshot_Task) soap.HasFault { + body := &methods.RevertToCurrentSnapshot_TaskBody{} + + if vm.Snapshot == nil || vm.Snapshot.CurrentSnapshot == nil { + body.Fault_ = Fault("snapshot not found", &types.NotFound{}) + + return body + } + snapshot := ctx.Map.Get(*vm.Snapshot.CurrentSnapshot).(*VirtualMachineSnapshot) + + task := CreateTask(vm, "revertSnapshot", func(t *Task) (types.AnyType, types.BaseMethodFault) { + vm.DataSets = copyDataSetsForVmClone(snapshot.DataSets) + return nil, nil + }) + + body.Res = &types.RevertToCurrentSnapshot_TaskResponse{ + Returnval: task.Run(ctx), + } + + return body +} + +func (vm *VirtualMachine) RemoveAllSnapshotsTask(ctx *Context, req *types.RemoveAllSnapshots_Task) soap.HasFault { + task := CreateTask(vm, "RemoveAllSnapshots", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if vm.Snapshot == nil { + return nil, nil + } + + refs := allSnapshotsInTree(vm.Snapshot.RootSnapshotList) + + ctx.Update(vm, []types.PropertyChange{ + {Name: "snapshot", Val: nil}, + {Name: "rootSnapshot", Val: nil}, + }) + + for _, ref := range refs { + ctx.Map.Get(ref).(*VirtualMachineSnapshot).removeSnapshotFiles(ctx) + ctx.Map.Remove(ctx, ref) + } + + return nil, nil + }) + + return &methods.RemoveAllSnapshots_TaskBody{ + Res: &types.RemoveAllSnapshots_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) fcd(ctx *Context, ds types.ManagedObjectReference, id types.ID) *VStorageObject { + m := ctx.Map.Get(*ctx.Map.content().VStorageObjectManager).(*VcenterVStorageObjectManager) + if ds.Value != "" { + return m.objects[ds][id] + } + for _, set := range m.objects { + for key, val := range set { + if key == id { + return val + } + } + } + return nil +} + +func (vm *VirtualMachine) AttachDiskTask(ctx *Context, req *types.AttachDisk_Task) soap.HasFault { + task := CreateTask(vm, "attachDisk", func(t *Task) (types.AnyType, types.BaseMethodFault) { + fcd := vm.fcd(ctx, req.Datastore, req.DiskId) + if fcd == nil { + return nil, new(types.InvalidArgument) + } + + fcd.Config.ConsumerId = []types.ID{{Id: vm.Config.Uuid}} + + // TODO: add device + + return nil, nil + }) + + return &methods.AttachDisk_TaskBody{ + Res: &types.AttachDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) DetachDiskTask(ctx *Context, req *types.DetachDisk_Task) soap.HasFault { + task := CreateTask(vm, "detachDisk", func(t *Task) (types.AnyType, types.BaseMethodFault) { + fcd := vm.fcd(ctx, types.ManagedObjectReference{}, req.DiskId) + if fcd == nil { + return nil, new(types.InvalidArgument) + } + + fcd.Config.ConsumerId = nil + + // TODO: remove device + + return nil, nil + }) + + return &methods.DetachDisk_TaskBody{ + Res: &types.DetachDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (vm *VirtualMachine) ShutdownGuest(ctx *Context, c *types.ShutdownGuest) soap.HasFault { + r := &methods.ShutdownGuestBody{} + + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOn { + r.Fault_ = Fault("", &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOn, + ExistingState: vm.Runtime.PowerState, + }) + + return r + } + + event := vm.event() + ctx.postEvent(&types.VmGuestShutdownEvent{VmEvent: event}) + + _ = CreateTask(vm, "shutdownGuest", func(*Task) (types.AnyType, types.BaseMethodFault) { + vm.svm.stop(ctx) + + ctx.Update(vm, []types.PropertyChange{ + {Name: "runtime.powerState", Val: types.VirtualMachinePowerStatePoweredOff}, + {Name: "summary.runtime.powerState", Val: types.VirtualMachinePowerStatePoweredOff}, + }) + + ctx.postEvent(&types.VmPoweredOffEvent{VmEvent: event}) + + return nil, nil + }).Run(ctx) + + r.Res = new(types.ShutdownGuestResponse) + + return r +} + +func (vm *VirtualMachine) StandbyGuest(ctx *Context, c *types.StandbyGuest) soap.HasFault { + r := &methods.StandbyGuestBody{} + + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOn { + r.Fault_ = Fault("", &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOn, + ExistingState: vm.Runtime.PowerState, + }) + + return r + } + + event := vm.event() + ctx.postEvent(&types.VmGuestStandbyEvent{VmEvent: event}) + + _ = CreateTask(vm, "standbyGuest", func(*Task) (types.AnyType, types.BaseMethodFault) { + vm.svm.pause(ctx) + + ctx.Update(vm, []types.PropertyChange{ + {Name: "runtime.powerState", Val: types.VirtualMachinePowerStateSuspended}, + {Name: "summary.runtime.powerState", Val: types.VirtualMachinePowerStateSuspended}, + }) + + ctx.postEvent(&types.VmSuspendedEvent{VmEvent: event}) + + return nil, nil + }).Run(ctx) + + r.Res = new(types.StandbyGuestResponse) + + return r +} + +func (vm *VirtualMachine) MarkAsTemplate(req *types.MarkAsTemplate) soap.HasFault { + r := &methods.MarkAsTemplateBody{} + + if vm.Config.Template { + r.Fault_ = Fault("", new(types.NotSupported)) + return r + } + + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOff { + r.Fault_ = Fault("", &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOff, + ExistingState: vm.Runtime.PowerState, + }) + return r + } + + vm.Config.Template = true + vm.Summary.Config.Template = true + vm.ResourcePool = nil + + r.Res = new(types.MarkAsTemplateResponse) + + return r +} + +func (vm *VirtualMachine) MarkAsVirtualMachine(req *types.MarkAsVirtualMachine) soap.HasFault { + r := &methods.MarkAsVirtualMachineBody{} + + if !vm.Config.Template { + r.Fault_ = Fault("", new(types.NotSupported)) + return r + } + + if vm.Runtime.PowerState != types.VirtualMachinePowerStatePoweredOff { + r.Fault_ = Fault("", &types.InvalidPowerState{ + RequestedState: types.VirtualMachinePowerStatePoweredOff, + ExistingState: vm.Runtime.PowerState, + }) + return r + } + + vm.Config.Template = false + vm.Summary.Config.Template = false + vm.ResourcePool = &req.Pool + if req.Host != nil { + vm.Runtime.Host = req.Host + } + + r.Res = new(types.MarkAsVirtualMachineResponse) + + return r +} + +func findSnapshotInTree(tree []types.VirtualMachineSnapshotTree, ref types.ManagedObjectReference) *types.VirtualMachineSnapshotTree { + if tree == nil { + return nil + } + + for i, ss := range tree { + if ss.Snapshot == ref { + return &tree[i] + } + + target := findSnapshotInTree(ss.ChildSnapshotList, ref) + if target != nil { + return target + } + } + + return nil +} + +func findParentSnapshot(tree types.VirtualMachineSnapshotTree, ref types.ManagedObjectReference) *types.ManagedObjectReference { + for _, ss := range tree.ChildSnapshotList { + if ss.Snapshot == ref { + return &tree.Snapshot + } + + res := findParentSnapshot(ss, ref) + if res != nil { + return res + } + } + + return nil +} + +func findParentSnapshotInTree(tree []types.VirtualMachineSnapshotTree, ref types.ManagedObjectReference) *types.ManagedObjectReference { + if tree == nil { + return nil + } + + for _, ss := range tree { + res := findParentSnapshot(ss, ref) + if res != nil { + return res + } + } + + return nil +} + +func removeSnapshotInTree(tree []types.VirtualMachineSnapshotTree, ref types.ManagedObjectReference, removeChildren bool) []types.VirtualMachineSnapshotTree { + if tree == nil { + return tree + } + + var result []types.VirtualMachineSnapshotTree + + for _, ss := range tree { + if ss.Snapshot == ref { + if !removeChildren { + result = append(result, ss.ChildSnapshotList...) + } + } else { + ss.ChildSnapshotList = removeSnapshotInTree(ss.ChildSnapshotList, ref, removeChildren) + result = append(result, ss) + } + } + + return result +} + +func allSnapshotsInTree(tree []types.VirtualMachineSnapshotTree) []types.ManagedObjectReference { + var result []types.ManagedObjectReference + + if tree == nil { + return result + } + + for _, ss := range tree { + result = append(result, ss.Snapshot) + result = append(result, allSnapshotsInTree(ss.ChildSnapshotList)...) + } + + return result +} + +func changeTrackingSupported(spec *types.VirtualMachineConfigSpec) bool { + for _, device := range spec.DeviceChange { + if dev, ok := device.GetVirtualDeviceConfigSpec().Device.(*types.VirtualDisk); ok { + switch dev.Backing.(type) { + case *types.VirtualDiskFlatVer2BackingInfo: + return true + case *types.VirtualDiskSparseVer2BackingInfo: + return true + case *types.VirtualDiskRawDiskMappingVer1BackingInfo: + return true + case *types.VirtualDiskRawDiskVer2BackingInfo: + return true + default: + return false + } + } + } + return false +} + +func (vm *VirtualMachine) updateLastModifiedAndChangeVersion(ctx *Context) { + modified := time.Now() + ctx.Update(vm, []types.PropertyChange{ + { + Name: "config.changeVersion", + Val: fmt.Sprintf("%d", modified.UnixNano()), + Op: types.PropertyChangeOpAssign, + }, + { + Name: "config.modified", + Val: modified, + Op: types.PropertyChangeOpAssign, + }, + }) +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vm_compatibility_checker.go b/vendor/github.com/vmware/govmomi/simulator/vm_compatibility_checker.go new file mode 100644 index 0000000000..398199d356 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vm_compatibility_checker.go @@ -0,0 +1,188 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "fmt" + "math/rand" + "slices" + + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type VmCompatibilityChecker struct { + mo.VirtualMachineCompatibilityChecker +} + +func resolveHostsAndPool(ctx *Context, vm, host, pool *types.ManagedObjectReference) (*ResourcePool, []types.ManagedObjectReference) { + var vmMo *VirtualMachine + var poolMo *ResourcePool + + switch { + case pool != nil: + poolMo = ctx.Map.Get(*pool).(*ResourcePool) + case vm != nil: + vmMo = ctx.Map.Get(*vm).(*VirtualMachine) + poolMo = ctx.Map.Get(*vmMo.ResourcePool).(*ResourcePool) + case host != nil: + h := ctx.Map.Get(*host).(*HostSystem) + parent := hostParent(&h.HostSystem).ResourcePool + poolMo = ctx.Map.Get(*parent).(*ResourcePool) + } + + var hosts []types.ManagedObjectReference + + switch { + case host != nil: + hosts = append(hosts, *host) + case pool != nil: + hosts = resourcePoolHosts(ctx, poolMo) + case vm != nil: + hosts = append(hosts, *vmMo.Runtime.Host) + } + + return poolMo, hosts +} + +func validateHostsAndPool(ctx *Context, pool *ResourcePool, hosts []types.ManagedObjectReference) *types.InvalidArgument { + allHosts := resourcePoolHosts(ctx, pool) + + for _, host := range hosts { + if !slices.Contains(allHosts, host) { + return &types.InvalidArgument{ + InvalidProperty: "spec.pool", + } + } + } + + return nil +} + +func (c *VmCompatibilityChecker) checkVmConfigSpec(ctx *Context, check *types.CheckResult, spec types.VirtualMachineConfigSpec, hosts []types.ManagedObjectReference) { + if check.Host == nil { + // By default all hosts use the same HostSystem template, so we check against any. + // But we could choose a host based on the spec, e.g. record + playback of real hosts + check.Host = &hosts[rand.Intn(len(hosts))] + } + + host := ctx.Map.Get(*check.Host).(*HostSystem) + + mem := int32(spec.MemoryMB) + if mem > 0 { + min := int32(4) + max := host.Capability.MaxSupportedVmMemory + if mem > max || mem < min { + check.Warning = append(check.Warning, types.LocalizedMethodFault{ + Fault: &types.MemorySizeNotSupported{ + MemorySizeMB: mem, + MinMemorySizeMB: min, + MaxMemorySizeMB: max, + }, + LocalizedMessage: fmt.Sprintf("vm requires %d MB of memory, outside the range of %d to %d", mem, min, max), + }) + } + } + + cpu := spec.NumCPUs + if cpu > 0 { + max := int32(host.Summary.Hardware.NumCpuCores) + if cpu > max { + check.Warning = append(check.Warning, types.LocalizedMethodFault{ + Fault: &types.NotEnoughCpus{ + NumCpuDest: max, + NumCpuVm: cpu, + }, + LocalizedMessage: fmt.Sprintf("vm requires %d CPUs, host has %d", cpu, max), + }) + } + } + + if spec.GuestId != "" { + var guest types.VirtualMachineGuestOsIdentifier + if !slices.Contains(guest.Strings(), spec.GuestId) { + check.Warning = append(check.Warning, types.LocalizedMethodFault{ + Fault: &types.UnsupportedGuest{ + UnsupportedGuestOS: spec.GuestId, + }, + LocalizedMessage: fmt.Sprintf("vm guest os %s not supported", spec.GuestId), + }) + } + } +} + +func (c *VmCompatibilityChecker) CheckVmConfigTask( + ctx *Context, + r *types.CheckVmConfig_Task) soap.HasFault { + + task := CreateTask(c, "checkVmConfig", func(t *Task) (types.AnyType, types.BaseMethodFault) { + if r.Vm == nil && r.Host == nil && r.Pool == nil { + return nil, new(types.InvalidArgument) + } + + poolMo, hosts := resolveHostsAndPool(ctx, r.Vm, r.Host, r.Pool) + if err := validateHostsAndPool(ctx, poolMo, hosts); err != nil { + return nil, err + } + + check := types.CheckResult{ + Vm: r.Vm, + Host: r.Host, + } + + c.checkVmConfigSpec(ctx, &check, r.Spec, hosts) + + return types.ArrayOfCheckResult{ + CheckResult: []types.CheckResult{check}, + }, nil + }) + + return &methods.CheckVmConfig_TaskBody{ + Res: &types.CheckVmConfig_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (c *VmCompatibilityChecker) CheckCompatibilityTask( + ctx *Context, + r *types.CheckCompatibility_Task) soap.HasFault { + + task := CreateTask(c, "checkCompatibility", func(t *Task) (types.AnyType, types.BaseMethodFault) { + poolMo, hosts := resolveHostsAndPool(ctx, &r.Vm, r.Host, r.Pool) + if err := validateHostsAndPool(ctx, poolMo, hosts); err != nil { + return nil, err + } + + check := types.CheckResult{ + Vm: &r.Vm, + Host: r.Host, + } + + return types.ArrayOfCheckResult{ + CheckResult: []types.CheckResult{check}, + }, nil + }) + + return &methods.CheckCompatibility_TaskBody{ + Res: &types.CheckCompatibility_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vm_provisioning_checker.go b/vendor/github.com/vmware/govmomi/simulator/vm_provisioning_checker.go new file mode 100644 index 0000000000..7634c7d366 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vm_provisioning_checker.go @@ -0,0 +1,49 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type VmProvisioningChecker struct { + mo.VirtualMachineProvisioningChecker +} + +func (c *VmProvisioningChecker) CheckRelocateTask( + ctx *Context, + r *types.CheckRelocate_Task) soap.HasFault { + + task := CreateTask(c, "checkRelocate", func(t *Task) (types.AnyType, types.BaseMethodFault) { + check := types.CheckResult{ + Vm: &r.Vm, + } + + return types.ArrayOfCheckResult{ + CheckResult: []types.CheckResult{check}, + }, nil + }) + + return &methods.CheckRelocate_TaskBody{ + Res: &types.CheckRelocate_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/alarm_manager.go b/vendor/github.com/vmware/govmomi/simulator/vpx/alarm_manager.go new file mode 100644 index 0000000000..c649168b66 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/alarm_manager.go @@ -0,0 +1,219 @@ +/* +Copyright (c) 2024-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vpx + +import ( + "time" + + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +// Alarm captured using: +// govc alarm.info -dump -n alarm.VmErrorAlarm -n alarm.HostErrorAlarm +var Alarm = []mo.Alarm{ + { + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "Alarm", Value: "alarm-384", ServerGUID: ""}, + Value: nil, + AvailableField: nil, + }, + Info: types.AlarmInfo{ + AlarmSpec: types.AlarmSpec{ + Name: "vcsim VM Alarm", + SystemName: "", + Description: "vcsim alarm for Virtual Machines", + Enabled: true, + Expression: &types.OrAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Expression: []types.BaseAlarmExpression{ + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "EventEx", + EventTypeId: "vcsim.vm.success", + ObjectType: "VirtualMachine", + Status: "green", + }, + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "EventEx", + EventTypeId: "vcsim.vm.failure", + ObjectType: "VirtualMachine", + Status: "yellow", + }, + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "EventEx", + EventTypeId: "vcsim.vm.fatal", + ObjectType: "VirtualMachine", + Status: "red", + }, + }, + }, + Action: nil, + ActionFrequency: 0, + Setting: &types.AlarmSetting{ + ToleranceRange: 0, + ReportingFrequency: 300, + }, + }, + Key: "", + Alarm: types.ManagedObjectReference{Type: "Alarm", Value: "alarm-384", ServerGUID: ""}, + Entity: types.ManagedObjectReference{Type: "Folder", Value: "group-d1", ServerGUID: ""}, + LastModifiedTime: time.Now(), + LastModifiedUser: "VSPHERE.LOCAL\\Administrator", + CreationEventId: 0, + }, + }, + { + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "Alarm", Value: "alarm-11", ServerGUID: ""}, + Value: nil, + AvailableField: nil, + }, + Info: types.AlarmInfo{ + AlarmSpec: types.AlarmSpec{ + Name: "Host error", + SystemName: "alarm.HostErrorAlarm", + Description: "Default alarm to monitor host error and warning events", + Enabled: true, + Expression: &types.OrAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Expression: []types.BaseAlarmExpression{ + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "GeneralHostErrorEvent", + EventTypeId: "", + ObjectType: "HostSystem", + Status: "", + }, + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "GeneralHostWarningEvent", + EventTypeId: "", + ObjectType: "HostSystem", + Status: "", + }, + }, + }, + Action: &types.GroupAlarmAction{ + AlarmAction: types.AlarmAction{}, + Action: []types.BaseAlarmAction{ + &types.AlarmTriggeringAction{ + AlarmAction: types.AlarmAction{}, + Action: &types.SendSNMPAction{}, + TransitionSpecs: []types.AlarmTriggeringActionTransitionSpec{ + { + StartState: "yellow", + FinalState: "red", + Repeats: true, + }, + }, + Green2yellow: false, + Yellow2red: false, + Red2yellow: false, + Yellow2green: false, + }, + }, + }, + ActionFrequency: 0, + Setting: &types.AlarmSetting{ + ToleranceRange: 0, + ReportingFrequency: 300, + }, + }, + Key: "", + Alarm: types.ManagedObjectReference{Type: "Alarm", Value: "alarm-11", ServerGUID: ""}, + Entity: types.ManagedObjectReference{Type: "Folder", Value: "group-d1", ServerGUID: ""}, + LastModifiedTime: time.Now(), + LastModifiedUser: "", + CreationEventId: 0, + }, + }, + { + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "Alarm", Value: "alarm-12", ServerGUID: ""}, + Value: nil, + AvailableField: nil, + }, + Info: types.AlarmInfo{ + AlarmSpec: types.AlarmSpec{ + Name: "Virtual machine error", + SystemName: "alarm.VmErrorAlarm", + Description: "Default alarm to monitor virtual machine error and warning events", + Enabled: true, + Expression: &types.OrAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Expression: []types.BaseAlarmExpression{ + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "GeneralVmErrorEvent", + EventTypeId: "", + ObjectType: "VirtualMachine", + Status: "", + }, + &types.EventAlarmExpression{ + AlarmExpression: types.AlarmExpression{}, + Comparisons: nil, + EventType: "GeneralVmWarningEvent", + EventTypeId: "", + ObjectType: "VirtualMachine", + Status: "", + }, + }, + }, + Action: &types.GroupAlarmAction{ + AlarmAction: types.AlarmAction{}, + Action: []types.BaseAlarmAction{ + &types.AlarmTriggeringAction{ + AlarmAction: types.AlarmAction{}, + Action: &types.SendSNMPAction{}, + TransitionSpecs: []types.AlarmTriggeringActionTransitionSpec{ + { + StartState: "yellow", + FinalState: "red", + Repeats: true, + }, + }, + Green2yellow: false, + Yellow2red: false, + Red2yellow: false, + Yellow2green: false, + }, + }, + }, + ActionFrequency: 0, + Setting: &types.AlarmSetting{ + ToleranceRange: 0, + ReportingFrequency: 300, + }, + }, + Key: "", + Alarm: types.ManagedObjectReference{Type: "Alarm", Value: "alarm-12", ServerGUID: ""}, + Entity: types.ManagedObjectReference{Type: "Folder", Value: "group-d1", ServerGUID: ""}, + LastModifiedTime: time.Now(), + LastModifiedUser: "", + CreationEventId: 0, + }, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/doc.go b/vendor/github.com/vmware/govmomi/simulator/vpx/doc.go new file mode 100644 index 0000000000..1765887029 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/doc.go @@ -0,0 +1,20 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package vpx contains SOAP responses from a vCenter server, captured using `govc ... -dump`. +*/ +package vpx diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager.go b/vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager.go new file mode 100644 index 0000000000..9b50f1b81f --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager.go @@ -0,0 +1,21840 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vpx + +import "github.com/vmware/govmomi/vim25/types" + +// HistoricalInterval is the default template for the PerformanceManager historicalInterval property. +// Capture method: +// +// govc object.collect -s -dump PerformanceManager:Perfmgr historicalInterval +var HistoricalInterval = []types.PerfInterval{ + { + Enabled: true, + Key: 1, + Length: 86400, + Level: 1, + Name: "Past Day", + SamplingPeriod: 300, + }, + { + Enabled: true, + Key: 2, + Length: 604800, + Level: 1, + Name: "Past Week", + SamplingPeriod: 1800, + }, + { + Enabled: true, + Key: 1, + Length: 2592000, + Level: 1, + Name: "Past Month", + SamplingPeriod: 7200, + }, + { + Enabled: true, + Key: 1, + Length: 31536000, + Level: 1, + Name: "Past Year", + SamplingPeriod: 86400, + }, +} + +// PerfCounter is the default template for the PerformanceManager perfCounter property. +// Capture method: +// govc object.collect -s -dump PerformanceManager:PerfMgr perfCounter + +var PerfCounter = []types.PerfCounterInfo{ + { + Key: 1, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 2, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 3, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 4, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "CPU usage as a percentage during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 5, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 6, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 7, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 8, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage in MHz", + Summary: "CPU usage in megahertz during the interval", + }, + Key: "usagemhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 9, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reserved capacity", + Summary: "Total CPU capacity reserved by virtual machines", + }, + Key: "reservedCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 10, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "Amount of time spent on system processes on each virtual CPU in the virtual machine", + }, + Key: "system", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 11, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Wait", + Summary: "Total CPU time spent in wait state", + }, + Key: "wait", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 12, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ready", + Summary: "Time that the virtual machine was ready, but could not get scheduled to run on the physical CPU during last measurement interval", + }, + Key: "ready", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 13, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Idle", + Summary: "Total time that the CPU spent in an idle state", + }, + Key: "idle", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 14, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Used", + Summary: "Total CPU usage", + }, + Key: "used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 15, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Capacity Provisioned", + Summary: "Capacity in MHz of the physical CPU cores", + }, + Key: "capacity.provisioned", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 16, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Capacity Entitlement", + Summary: "CPU resources devoted by the ESXi scheduler to the virtual machines and resource pools", + }, + Key: "capacity.entitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 17, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Capacity Usage", + Summary: "CPU usage as a percent during the interval.", + }, + Key: "capacity.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 18, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Capacity Demand", + Summary: "The amount of CPU resources a VM would use if there were no CPU contention or CPU limit", + }, + Key: "capacity.demand", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 19, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Capacity Contention", + Summary: "Percent of time the VM is unable to run because it is contending for access to the physical CPU(s)", + }, + Key: "capacity.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 20, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Core Count Provisioned", + Summary: "The number of virtual processors provisioned to the entity.", + }, + Key: "corecount.provisioned", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 21, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Core Count Usage", + Summary: "The number of virtual processors running on the host.", + }, + Key: "corecount.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 22, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU Core Count Contention", + Summary: "Time the VM vCPU is ready to run, but is unable to run due to co-scheduling constraints", + }, + Key: "corecount.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 23, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 24, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 25, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 26, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host consumed %", + Summary: "Percentage of host physical memory that has been consumed", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 27, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation consumed", + Summary: "Memory reservation consumed by powered-on virtual machines", + }, + Key: "reservedCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 28, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 29, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 30, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 31, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Granted", + Summary: "Amount of host physical memory or physical memory that is mapped for a virtual machine or a host", + }, + Key: "granted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 32, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 33, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 34, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 35, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active", + Summary: "Amount of guest physical memory that is being actively read or written by guest. Activeness is estimated by ESXi", + }, + Key: "active", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 36, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 37, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 38, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 39, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared", + Summary: "Amount of guest physical memory that is shared within a single virtual machine or across virtual machines", + }, + Key: "shared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 40, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 41, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 42, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 43, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Zero pages", + Summary: "Guest physical memory pages whose content is 0x00", + }, + Key: "zero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 44, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 45, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 46, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 47, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reservation available", + Summary: "Amount by which reservation can be raised", + }, + Key: "unreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 48, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 49, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 50, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 51, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap consumed", + Summary: "Swap storage space consumed", + }, + Key: "swapused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 52, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapunreserved", + Summary: "swapunreserved", + }, + Key: "swapunreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 53, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapunreserved", + Summary: "swapunreserved", + }, + Key: "swapunreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 54, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapunreserved", + Summary: "swapunreserved", + }, + Key: "swapunreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 55, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapunreserved", + Summary: "swapunreserved", + }, + Key: "swapunreserved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 56, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 57, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 58, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 59, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Shared common", + Summary: "Amount of host physical memory that backs shared guest physical memory (Shared)", + }, + Key: "sharedcommon", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 60, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 61, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 62, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 63, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap", + Summary: "Virtual address space of ESXi that is dedicated to its heap", + }, + Key: "heap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 64, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 65, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 66, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 67, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heap free", + Summary: "Free address space in the heap of ESXi. This is less than or equal to Heap", + }, + Key: "heapfree", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 68, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Free state", + Summary: "Current memory availability state of ESXi. Possible values are high, clear, soft, hard, low. The state value determines the techniques used for memory reclamation from virtual machines", + }, + Key: "state", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 69, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 70, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 71, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 72, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swapped", + Summary: "Amount of guest physical memory that is swapped out to the swap space", + }, + Key: "swapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 73, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 74, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 75, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 76, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap target", + Summary: "Amount of memory that ESXi needs to reclaim by swapping", + }, + Key: "swaptarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 77, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapIn", + Summary: "swapIn", + }, + Key: "swapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 78, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapIn", + Summary: "swapIn", + }, + Key: "swapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 79, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapIn", + Summary: "swapIn", + }, + Key: "swapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 80, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapIn", + Summary: "swapIn", + }, + Key: "swapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 81, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapOut", + Summary: "swapOut", + }, + Key: "swapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 82, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapOut", + Summary: "swapOut", + }, + Key: "swapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 83, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapOut", + Summary: "swapOut", + }, + Key: "swapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 84, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "swapOut", + Summary: "swapOut", + }, + Key: "swapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 85, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in rate", + Summary: "Rate at which guest physical memory is swapped in from the swap space", + }, + Key: "swapinRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 86, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out rate", + Summary: "Rate at which guest physical memory is swapped out to the swap space", + }, + Key: "swapoutRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 87, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory swap out", + Summary: "Amount of memory that is swapped out for the Service Console", + }, + Key: "swapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 88, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory swap in", + Summary: "Amount of memory that is swapped in for the Service Console", + }, + Key: "swapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 89, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 90, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 91, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 92, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Ballooned memory", + Summary: "Amount of guest physical memory reclaimed from the virtual machine by the balloon driver in the guest", + }, + Key: "vmmemctl", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 93, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 94, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 95, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 96, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Balloon target", + Summary: "Desired amount of guest physical memory the balloon driver needs to reclaim, as determined by ESXi", + }, + Key: "vmmemctltarget", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 97, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 98, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 99, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 100, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Consumed", + Summary: "Amount of host physical memory consumed for backing up guest physical memory pages", + }, + Key: "consumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 101, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 102, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 103, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 104, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead consumed", + Summary: "Host physical memory consumed by ESXi data structures for running the virtual machines", + }, + Key: "overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 105, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compressed", + Summary: "Guest physical memory pages that have undergone memory compression", + }, + Key: "compressed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 106, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compression rate", + Summary: "Rate of guest physical memory page compression by ESXi", + }, + Key: "compressionRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 107, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Decompression rate", + Summary: "Rate of guest physical memory decompression", + }, + Key: "decompressionRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 108, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Capacity Provisioned", + Summary: "Total amount of memory available to the host", + }, + Key: "capacity.provisioned", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 109, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Capacity Entitlement", + Summary: "Amount of host physical memory the VM is entitled to, as determined by the ESXi scheduler", + }, + Key: "capacity.entitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 110, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Capacity Usable", + Summary: "Amount of physical memory available for use by virtual machines on this host", + }, + Key: "capacity.usable", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 111, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Capacity Usage", + Summary: "Amount of physical memory actively used", + }, + Key: "capacity.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 112, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Capacity Contention", + Summary: "Percentage of time VMs are waiting to access swapped, compressed or ballooned memory", + }, + Key: "capacity.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 113, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vm", + Summary: "vm", + }, + Key: "capacity.usage.vm", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 114, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vmOvrhd", + Summary: "vmOvrhd", + }, + Key: "capacity.usage.vmOvrhd", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 115, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vmkOvrhd", + Summary: "vmkOvrhd", + }, + Key: "capacity.usage.vmkOvrhd", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 116, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "userworld", + Summary: "userworld", + }, + Key: "capacity.usage.userworld", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 117, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vm", + Summary: "vm", + }, + Key: "reservedCapacity.vm", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 118, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vmOvhd", + Summary: "vmOvhd", + }, + Key: "reservedCapacity.vmOvhd", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 119, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vmkOvrhd", + Summary: "vmkOvrhd", + }, + Key: "reservedCapacity.vmkOvrhd", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 120, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "userworld", + Summary: "userworld", + }, + Key: "reservedCapacity.userworld", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 121, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Reserved Capacity %", + Summary: "Percent of memory that has been reserved either through VMkernel use, by userworlds or due to VM memory reservations", + }, + Key: "reservedCapacityPct", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 122, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Consumed by VMs", + Summary: "Amount of physical memory consumed by VMs on this host", + }, + Key: "consumed.vms", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 123, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory Consumed by userworlds", + Summary: "Amount of physical memory consumed by userworlds on this host", + }, + Key: "consumed.userworlds", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 124, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 125, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 126, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 127, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host during the collection interval.", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 128, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read requests", + Summary: "Number of disk reads during the collection interval", + }, + Key: "numberRead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 129, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write requests", + Summary: "Number of disk writes during the collection interval", + }, + Key: "numberWrite", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 130, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Average number of kilobytes read from the disk each second during the collection interval", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 131, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Average number of kilobytes written to disk each second during the collection interval", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 132, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Command latency", + Summary: "Average amount of time taken during the collection interval to process a SCSI command issued by the guest OS to the virtual machine", + }, + Key: "totalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 133, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all disks used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 134, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Commands aborted", + Summary: "Number of SCSI commands aborted during the collection interval", + }, + Key: "commandsAborted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 135, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Bus resets", + Summary: "Number of SCSI-bus reset commands issued during the collection interval", + }, + Key: "busResets", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 136, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of disk reads per second during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 137, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of disk writes per second during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 138, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk Throughput Usage", + Summary: "Aggregated disk I/O rate, including the rates for all virtual machines running on the host during the collection interval", + }, + Key: "throughput.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 139, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk Throughput Contention", + Summary: "Average amount of time for an I/O operation to complete successfully", + }, + Key: "throughput.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 140, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk SCSI Reservation Conflicts", + Summary: "Number of SCSI reservation conflicts for the LUN during the collection interval", + }, + Key: "scsiReservationConflicts", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 141, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk SCSI Reservation Conflicts %", + Summary: "Number of SCSI reservation conflicts for the LUN as a percent of total commands during the collection interval", + }, + Key: "scsiReservationCnflctsPct", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 142, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 143, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 144, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 145, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Network utilization (combined transmit-rates and receive-rates) during the interval", + }, + Key: "usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 146, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packets received", + Summary: "Number of packets received during the interval", + }, + Key: "packetsRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 147, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packets transmitted", + Summary: "Number of packets transmitted during the interval", + }, + Key: "packetsTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 148, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data receive rate", + Summary: "Average rate at which data was received during the interval", + }, + Key: "received", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 149, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data transmit rate", + Summary: "Average rate at which data was transmitted during the interval", + }, + Key: "transmitted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 150, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Net Throughput Provisioned", + Summary: "The maximum network bandwidth for the host", + }, + Key: "throughput.provisioned", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 151, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Net Throughput Usable", + Summary: "The current available network bandwidth for the host", + }, + Key: "throughput.usable", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 152, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Net Throughput Usage", + Summary: "The current network bandwidth usage for the host", + }, + Key: "throughput.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 153, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Net Throughput Contention", + Summary: "The aggregate network dropped packets for the host", + }, + Key: "throughput.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 154, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Packets Received and Transmitted per Second", + Summary: "Average rate of packets received and transmitted per second", + }, + Key: "throughput.packetsPerSec", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 155, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Uptime", + Summary: "Total time elapsed, in seconds, since last system startup", + }, + Key: "uptime", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "s", + Summary: "Second", + }, + Key: "second", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 156, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heartbeat", + Summary: "Number of heartbeats issued per virtual machine during the interval", + }, + Key: "heartbeat", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 157, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Usage", + Summary: "Current power usage", + }, + Key: "power", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "W", + Summary: "Watt", + }, + Key: "watt", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 158, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cap", + Summary: "Maximum allowed power usage", + }, + Key: "powerCap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "W", + Summary: "Watt", + }, + Key: "watt", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 159, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Energy usage", + Summary: "Total energy used since last stats reset", + }, + Key: "energy", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "J", + Summary: "Joule", + }, + Key: "joule", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 160, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host Power Capacity Provisioned", + Summary: "Current power usage as a percentage of maximum allowed power.", + }, + Key: "capacity.usagePct", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 161, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average commands issued per second", + Summary: "Average number of commands issued per second by the storage adapter during the collection interval", + }, + Key: "commandsAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 162, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second by the storage adapter during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 163, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second by the storage adapter during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 164, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data by the storage adapter", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 165, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data by the storage adapter", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 166, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read by the storage adapter takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 167, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write by the storage adapter takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 168, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all storage adapters used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 169, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Throughput Contention", + Summary: "Average amount of time for an I/O operation to complete successfully", + }, + Key: "throughput.cont", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 170, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Outstanding I/Os", + Summary: "The percent of I/Os that have been issued but have not yet completed", + }, + Key: "OIOsPct", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 171, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second to the virtual disk during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 172, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second to the virtual disk during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 173, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data from the virtual disk", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 174, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data to the virtual disk", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 175, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read from the virtual disk takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 176, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write to the virtual disk takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 177, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Disk Throughput Contention", + Summary: "Average amount of time for an I/O operation to complete successfully", + }, + Key: "throughput.cont", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 178, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second to the datastore during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 179, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second to the datastore during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 180, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data from the datastore", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 181, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data to the datastore", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 182, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read from the datastore takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 183, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write to the datastore takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 184, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all datastores used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 185, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control aggregated IOPS", + Summary: "Storage I/O Control aggregated IOPS", + }, + Key: "datastoreIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 186, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control normalized latency", + Summary: "Storage I/O Control size-normalized I/O latency", + }, + Key: "sizeNormalizedDatastoreLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 187, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "usage", + Summary: "usage", + }, + Key: "throughput.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 188, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "contention", + Summary: "contention", + }, + Key: "throughput.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 189, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "busResets", + Summary: "busResets", + }, + Key: "busResets", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 190, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "commandsAborted", + Summary: "commandsAborted", + }, + Key: "commandsAborted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 191, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control active time percentage", + Summary: "Percentage of time Storage I/O Control actively controlled datastore latency", + }, + Key: "siocActiveTimePercentage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 192, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Path Throughput Contention", + Summary: "Average amount of time for an I/O operation to complete successfully", + }, + Key: "throughput.cont", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 193, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Highest latency", + Summary: "Highest latency value across all storage paths used by the host", + }, + Key: "maxTotalLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 194, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Disk Throughput Usage", + Summary: "Virtual disk I/O rate", + }, + Key: "throughput.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 195, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Disk Number of Terminations", + Summary: "Number of terminations to a virtual disk", + }, + Key: "commandsAborted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 196, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Disk Number of Resets", + Summary: "Number of resets to a virtual disk", + }, + Key: "busResets", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 197, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Outstanding I/Os", + Summary: "The number of I/Os that have been issued but have not yet completed", + }, + Key: "outstandingIOs", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 198, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Number Queued", + Summary: "The current number of I/Os that are waiting to be issued", + }, + Key: "queued", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 199, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Queue Depth", + Summary: "The maximum number of I/Os that can be outstanding at a given time", + }, + Key: "queueDepth", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 200, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Queue Command Latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI command, during the collection interval", + }, + Key: "queueLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 201, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Adapter Throughput Usage", + Summary: "The storage adapter's I/O rate", + }, + Key: "throughput.usag", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage adapter", + Summary: "Storage adapter", + }, + Key: "storageAdapter", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 202, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Path Bus Resets", + Summary: "Number of SCSI-bus reset commands issued during the collection interval", + }, + Key: "busResets", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 203, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Path Command Terminations", + Summary: "Number of SCSI commands terminated during the collection interval", + }, + Key: "commandsAborted", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 204, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage Path Throughput Usage", + Summary: "Storage path I/O rate", + }, + Key: "throughput.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 205, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Throughput Usage for VMs", + Summary: "Average pNic I/O rate for VMs", + }, + Key: "throughput.usage.vm", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 206, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Throughput Usage for NFS", + Summary: "Average pNic I/O rate for NFS", + }, + Key: "throughput.usage.nfs", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 207, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Throughput Usage for vMotion", + Summary: "Average pNic I/O rate for vMotion", + }, + Key: "throughput.usage.vmotion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 208, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Throughput Usage for FT", + Summary: "Average pNic I/O rate for FT", + }, + Key: "throughput.usage.ft", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 209, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Throughput Usage for iSCSI", + Summary: "Average pNic I/O rate for iSCSI", + }, + Key: "throughput.usage.iscsi", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 210, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pNic Throughput Usage for HBR", + Summary: "Average pNic I/O rate for HBR", + }, + Key: "throughput.usage.hbr", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 211, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host Power Capacity Usable", + Summary: "Current maximum allowed power usage.", + }, + Key: "capacity.usable", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "W", + Summary: "Watt", + }, + Key: "watt", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 212, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host Power Capacity Usage", + Summary: "Current power usage", + }, + Key: "capacity.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Power", + Summary: "Power", + }, + Key: "power", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "W", + Summary: "Watt", + }, + Key: "watt", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 213, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Worst case allocation", + Summary: "Amount of CPU resources allocated to the virtual machine or resource pool, based on the total cluster capacity and the resource configuration of the resource hierarchy", + }, + Key: "cpuentitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 214, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Entitlement", + Summary: "Memory allocation as calculated by the VMkernel scheduler based on current estimated demand and reservation, limit, and shares policies set for all virtual machines and resource pools in the host or cluster", + }, + Key: "mementitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 215, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU fairness", + Summary: "Fairness of distributed CPU resource allocation", + }, + Key: "cpufairness", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cluster services", + Summary: "Cluster services", + }, + Key: "clusterServices", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 216, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory fairness", + Summary: "Aggregate available memory resources of all the hosts within a cluster", + }, + Key: "memfairness", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cluster services", + Summary: "Cluster services", + }, + Key: "clusterServices", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 217, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Packets Throughput Transmitted", + Summary: "The rate of transmitted packets for this VDS", + }, + Key: "throughput.pktsTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 218, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Multicast Packets Throughput Transmitted", + Summary: "The rate of transmitted Multicast packets for this VDS", + }, + Key: "throughput.pktsTxMulticast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 219, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Broadcast Packets Throughput Transmitted", + Summary: "The rate of transmitted Broadcast packets for this VDS", + }, + Key: "throughput.pktsTxBroadcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 220, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Packets Throughput Received", + Summary: "The rate of received packets for this vDS", + }, + Key: "throughput.pktsRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 221, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Multicast Packets Throughput Received", + Summary: "The rate of received Multicast packets for this VDS", + }, + Key: "throughput.pktsRxMulticast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 222, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Broadcast Packets Throughput Received", + Summary: "The rate of received Broadcast packets for this VDS", + }, + Key: "throughput.pktsRxBroadcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 223, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Dropped Transmitted Packets Throughput", + Summary: "Count of dropped transmitted packets for this VDS", + }, + Key: "throughput.droppedTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 224, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VDS Dropped Received Packets Throughput", + Summary: "Count of dropped received packets for this VDS", + }, + Key: "throughput.droppedRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 225, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort Packets Throughput Transmitted", + Summary: "The rate of transmitted packets for this DVPort", + }, + Key: "throughput.vds.pktsTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 226, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort Multicast Packets Throughput Transmitted", + Summary: "The rate of transmitted multicast packets for this DVPort", + }, + Key: "throughput.vds.pktsTxMcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 227, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort Broadcast Packets Throughput Transmitted", + Summary: "The rate of transmitted broadcast packets for this DVPort", + }, + Key: "throughput.vds.pktsTxBcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 228, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort Packets Throughput Received", + Summary: "The rate of received packets for this DVPort", + }, + Key: "throughput.vds.pktsRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 229, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort Multicast Packets Throughput Received", + Summary: "The rate of received multicast packets for this DVPort", + }, + Key: "throughput.vds.pktsRxMcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 230, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort Broadcast Packets Throughput Received", + Summary: "The rate of received broadcast packets for this DVPort", + }, + Key: "throughput.vds.pktsRxBcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 231, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort dropped transmitted packets throughput", + Summary: "Count of dropped transmitted packets for this DVPort", + }, + Key: "throughput.vds.droppedTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 232, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "DVPort dropped received packets throughput", + Summary: "Count of dropped received packets for this DVPort", + }, + Key: "throughput.vds.droppedRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 233, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG Packets Throughput Transmitted", + Summary: "The rate of transmitted packets for this LAG", + }, + Key: "throughput.vds.lagTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 234, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG Multicast Packets Throughput Transmitted", + Summary: "The rate of transmitted Multicast packets for this LAG", + }, + Key: "throughput.vds.lagTxMcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 235, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG Broadcast Packets Throughput Transmitted", + Summary: "The rate of transmitted Broadcast packets for this LAG", + }, + Key: "throughput.vds.lagTxBcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 236, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG packets Throughput received", + Summary: "The rate of received packets for this LAG", + }, + Key: "throughput.vds.lagRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 237, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG multicast packets throughput received", + Summary: "The rate of received multicast packets for this LAG", + }, + Key: "throughput.vds.lagRxMcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 238, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG Broadcast packets Throughput received", + Summary: "The rate of received Broadcast packets for this LAG", + }, + Key: "throughput.vds.lagRxBcast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 239, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG dropped transmitted packets throughput", + Summary: "Count of dropped transmitted packets for this LAG", + }, + Key: "throughput.vds.lagDropTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 240, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "LAG dropped received packets throughput", + Summary: "Count of dropped received packets for this LAG", + }, + Key: "throughput.vds.lagDropRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 241, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network packets throughput transmitted", + Summary: "The rate of transmitted packets for this network", + }, + Key: "throughput.vds.txTotal", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 242, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network non-unicast packets throughput transmitted", + Summary: "The rate of transmitted non-unicast packets for this network", + }, + Key: "throughput.vds.txNoUnicast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 243, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network cross-router packets throughput transmitted", + Summary: "The rate of transmitted cross-router packets for this network", + }, + Key: "throughput.vds.txCrsRouter", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 244, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network dropped transmitted packets throughput", + Summary: "Count of dropped transmitted packets for this network", + }, + Key: "throughput.vds.txDrop", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 245, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network packets throughput received", + Summary: "The rate of received packets for this network", + }, + Key: "throughput.vds.rxTotal", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 246, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network dropped received packets due to destination IP error throughput", + Summary: "Count of dropped received packets with destination IP error for this network", + }, + Key: "throughput.vds.rxDestErr", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 247, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network dropped received packets throughput", + Summary: "Count of dropped received packets for this network", + }, + Key: "throughput.vds.rxDrop", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 248, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network failed to match mapping entry for a unicast MAC throughput", + Summary: "Count of transmitted packets that cannot find matched mapping entry for this network", + }, + Key: "throughput.vds.macFlood", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 249, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network failed to allocate a new mapping entry during translation phase", + Summary: "Count of transmitted packets that failed to acquire new mapping entry during translation phase for this network", + }, + Key: "throughput.vds.macLKUPFull", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 250, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network failed to allocate a new mapping entry during learning phase", + Summary: "Count of transmitted packets that failed to acquire new mapping entry during learning phase for this network", + }, + Key: "throughput.vds.macUPDTFull", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 251, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Found Matched ARP Entry Throughput", + Summary: "Count of transmitted packets that found matched ARP entry for this network", + }, + Key: "throughput.vds.arpFound", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 252, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Found Matched ARP Entry Marked as Unknown Throughput", + Summary: "Count of transmitted packets whose matched arp entry is marked as unknown for this network", + }, + Key: "throughput.vds.arpUnknown", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 253, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Failed to Allocate ARP Entry During Translation Phase Throughput", + Summary: "Count of transmitted packets that failed to acquire new ARP entry during translation phase for this network", + }, + Key: "throughput.vds.arpLKUPFull", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 254, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network found the same ARP requests have been sent into queue throughput", + Summary: "Count of transmitted packets whose ARP requests have already been sent into queue for this network", + }, + Key: "throughput.vds.arpWait", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 255, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Found ARP Queries Have Been Expired Throughput", + Summary: "Count of arp queries that have been expired for this network", + }, + Key: "throughput.vds.arpTimeout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 256, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM power on count", + Summary: "Number of virtual machine power on operations", + }, + Key: "numPoweron", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 257, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM power off count", + Summary: "Number of virtual machine power off operations", + }, + Key: "numPoweroff", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 258, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM suspend count", + Summary: "Number of virtual machine suspend operations", + }, + Key: "numSuspend", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 259, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM reset count", + Summary: "Number of virtual machine reset operations", + }, + Key: "numReset", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 260, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM guest reboot count", + Summary: "Number of virtual machine guest reboot operations", + }, + Key: "numRebootGuest", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 261, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM standby guest count", + Summary: "Number of virtual machine standby guest operations", + }, + Key: "numStandbyGuest", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 262, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM guest shutdown count", + Summary: "Number of virtual machine guest shutdown operations", + }, + Key: "numShutdownGuest", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 263, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM create count", + Summary: "Number of virtual machine create operations", + }, + Key: "numCreate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 264, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM delete count", + Summary: "Number of virtual machine delete operations", + }, + Key: "numDestroy", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 265, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM register count", + Summary: "Number of virtual machine register operations", + }, + Key: "numRegister", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 266, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM unregister count", + Summary: "Number of virtual machine unregister operations", + }, + Key: "numUnregister", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 267, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM reconfigure count", + Summary: "Number of virtual machine reconfigure operations", + }, + Key: "numReconfigure", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 268, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM clone count", + Summary: "Number of virtual machine clone operations", + }, + Key: "numClone", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 269, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM template deploy count", + Summary: "Number of virtual machine template deploy operations", + }, + Key: "numDeploy", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 270, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM host change count (non-powered-on VMs)", + Summary: "Number of host change operations for powered-off and suspended VMs", + }, + Key: "numChangeHost", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 271, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM datastore change count (non-powered-on VMs)", + Summary: "Number of datastore change operations for powered-off and suspended virtual machines", + }, + Key: "numChangeDS", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 272, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM host and datastore change count (non-powered-on VMs)", + Summary: "Number of host and datastore change operations for powered-off and suspended virtual machines", + }, + Key: "numChangeHostDS", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 273, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vMotion count", + Summary: "Number of migrations with vMotion (host change operations for powered-on VMs)", + }, + Key: "numVMotion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 274, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage vMotion count", + Summary: "Number of migrations with Storage vMotion (datastore change operations for powered-on VMs)", + }, + Key: "numSVMotion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 275, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VM host and datastore change count (powered-on VMs)", + Summary: "Number of host and datastore change operations for powered-on and suspended virtual machines", + }, + Key: "numXVMotion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual machine operations", + Summary: "Virtual machine operations", + }, + Key: "vmop", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 276, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Effective CPU resources", + Summary: "Total available CPU resources of all hosts within a cluster", + }, + Key: "effectivecpu", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cluster services", + Summary: "Cluster services", + }, + Key: "clusterServices", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 277, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Effective memory resources", + Summary: "Total amount of machine memory of all hosts in the cluster that is available for use for virtual machine memory and overhead memory", + }, + Key: "effectivemem", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cluster services", + Summary: "Cluster services", + }, + Key: "clusterServices", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 278, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Total", + Summary: "Total amount of CPU resources of all hosts in the cluster", + }, + Key: "totalmhz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 279, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Total", + Summary: "Total amount of host physical memory of all hosts in the cluster that is available for virtual machine memory (physical memory for use by the guest OS) and virtual machine overhead memory", + }, + Key: "totalmb", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 280, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Current failover level", + Summary: "vSphere HA number of failures that can be tolerated", + }, + Key: "failover", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cluster services", + Summary: "Cluster services", + }, + Key: "clusterServices", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 281, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Space actually used", + Summary: "Amount of space actually used by the virtual machine or the datastore", + }, + Key: "used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 282, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Space potentially used", + Summary: "Amount of storage set aside for use by a datastore or a virtual machine", + }, + Key: "provisioned", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 283, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Capacity", + Summary: "Configured size of the datastore", + }, + Key: "capacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 284, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Space not shared", + Summary: "Amount of space associated exclusively with a virtual machine", + }, + Key: "unshared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 285, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead due to delta disk backings", + Summary: "Storage overhead of a virtual machine or a datastore due to delta disk backings", + }, + Key: "deltaused", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 286, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "provisioned", + Summary: "provisioned", + }, + Key: "capacity.provisioned", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 287, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "usage", + Summary: "usage", + }, + Key: "capacity.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 288, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "contention", + Summary: "contention", + }, + Key: "capacity.contention", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 289, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Activation latency", + Summary: "The latency of an activation operation in vCenter Server", + }, + Key: "activationlatencystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 290, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Activation latency", + Summary: "The latency of an activation operation in vCenter Server", + }, + Key: "activationlatencystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 291, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Activation latency", + Summary: "The latency of an activation operation in vCenter Server", + }, + Key: "activationlatencystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 292, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Activation count", + Summary: "Activation operations in vCenter Server", + }, + Key: "activationstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 293, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Activation count", + Summary: "Activation operations in vCenter Server", + }, + Key: "activationstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 294, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Activation count", + Summary: "Activation operations in vCenter Server", + }, + Key: "activationstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 295, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "buffersz", + Summary: "buffersz", + }, + Key: "buffersz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 296, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "cachesz", + Summary: "cachesz", + }, + Key: "cachesz", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 297, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Context switch rate", + Summary: "Number of context switches per second on the system where vCenter Server is running", + }, + Key: "ctxswitchesrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 298, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "diskreadsectorrate", + Summary: "diskreadsectorrate", + }, + Key: "diskreadsectorrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 299, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk read rate", + Summary: "Number of disk reads per second on the system where vCenter Server is running", + }, + Key: "diskreadsrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 300, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "diskwritesectorrate", + Summary: "diskwritesectorrate", + }, + Key: "diskwritesectorrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 301, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk write rate", + Summary: "Number of disk writes per second on the system where vCenter Server is running", + }, + Key: "diskwritesrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 302, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host sync latency", + Summary: "The latency of a host sync operation in vCenter Server", + }, + Key: "hostsynclatencystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 303, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host sync latency", + Summary: "The latency of a host sync operation in vCenter Server", + }, + Key: "hostsynclatencystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 304, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host sync latency", + Summary: "The latency of a host sync operation in vCenter Server", + }, + Key: "hostsynclatencystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 305, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host sync count", + Summary: "The number of host sync operations in vCenter Server", + }, + Key: "hostsyncstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 306, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host sync count", + Summary: "The number of host sync operations in vCenter Server", + }, + Key: "hostsyncstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 307, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host sync count", + Summary: "The number of host sync operations in vCenter Server", + }, + Key: "hostsyncstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 308, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Inventory statistics", + Summary: "vCenter Server inventory statistics", + }, + Key: "inventorystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 309, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Inventory statistics", + Summary: "vCenter Server inventory statistics", + }, + Key: "inventorystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 310, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Inventory statistics", + Summary: "vCenter Server inventory statistics", + }, + Key: "inventorystats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 311, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Locking statistics", + Summary: "vCenter Server locking statistics", + }, + Key: "lockstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 312, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Locking statistics", + Summary: "vCenter Server locking statistics", + }, + Key: "lockstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 313, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Locking statistics", + Summary: "vCenter Server locking statistics", + }, + Key: "lockstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 314, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter Server LRO statistics", + Summary: "vCenter Server LRO statistics", + }, + Key: "lrostats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 315, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter Server LRO statistics", + Summary: "vCenter Server LRO statistics", + }, + Key: "lrostats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 316, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter Server LRO statistics", + Summary: "vCenter Server LRO statistics", + }, + Key: "lrostats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 317, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Miscellaneous", + Summary: "Miscellaneous statistics", + }, + Key: "miscstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 318, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Miscellaneous", + Summary: "Miscellaneous statistics", + }, + Key: "miscstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 319, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Miscellaneous", + Summary: "Miscellaneous statistics", + }, + Key: "miscstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 320, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Managed object reference statistics", + Summary: "Managed object reference counts in vCenter Server", + }, + Key: "morefregstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 321, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Managed object reference statistics", + Summary: "Managed object reference counts in vCenter Server", + }, + Key: "morefregstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 322, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Managed object reference statistics", + Summary: "Managed object reference counts in vCenter Server", + }, + Key: "morefregstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 323, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Received packet rate", + Summary: "Rate of the number of total packets received per second on the system where vCenter Server is running", + }, + Key: "packetrecvrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 324, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Sent packet rate", + Summary: "Number of total packets sent per second on the system where vCenter Server is running", + }, + Key: "packetsentrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 325, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU system", + Summary: "Total system CPU used on the system where vCenter Server in running", + }, + Key: "systemcpuusage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 326, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Page fault rate", + Summary: "Number of page faults per second on the system where vCenter Server is running", + }, + Key: "pagefaultrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 327, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical memory", + Summary: "Physical memory used by vCenter", + }, + Key: "physicalmemusage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 328, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU privileged", + Summary: "CPU used by vCenter Server in privileged mode", + }, + Key: "priviledgedcpuusage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 329, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Scoreboard statistics", + Summary: "Object counts in vCenter Server", + }, + Key: "scoreboard", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 330, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Scoreboard statistics", + Summary: "Object counts in vCenter Server", + }, + Key: "scoreboard", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 331, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Scoreboard statistics", + Summary: "Object counts in vCenter Server", + }, + Key: "scoreboard", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 332, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Session statistics", + Summary: "The statistics of client sessions connected to vCenter Server", + }, + Key: "sessionstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 333, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Session statistics", + Summary: "The statistics of client sessions connected to vCenter Server", + }, + Key: "sessionstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 334, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Session statistics", + Summary: "The statistics of client sessions connected to vCenter Server", + }, + Key: "sessionstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 335, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System call rate", + Summary: "Number of systems calls made per second on the system where vCenter Server is running", + }, + Key: "syscallsrate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 336, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System statistics", + Summary: "The statistics of vCenter Server as a running system such as thread statistics and heap statistics", + }, + Key: "systemstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 337, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System statistics", + Summary: "The statistics of vCenter Server as a running system such as thread statistics and heap statistics", + }, + Key: "systemstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 338, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System statistics", + Summary: "The statistics of vCenter Server as a running system such as thread statistics and heap statistics", + }, + Key: "systemstats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 339, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU user", + Summary: "CPU used by vCenter Server in user mode", + }, + Key: "usercpuusage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 340, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter Server service statistics", + Summary: "vCenter service statistics such as events, alarms, and tasks", + }, + Key: "vcservicestats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 341, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter Server service statistics", + Summary: "vCenter service statistics such as events, alarms, and tasks", + }, + Key: "vcservicestats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 342, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter Server service statistics", + Summary: "vCenter service statistics such as events, alarms, and tasks", + }, + Key: "vcservicestats", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter debugging information", + Summary: "vCenter debugging information", + }, + Key: "vcDebugInfo", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 343, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual memory", + Summary: "Virtual memory used by vCenter Server", + }, + Key: "virtualmemusage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vCenter resource usage information", + Summary: "vCenter resource usage information", + }, + Key: "vcResources", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 1, + AssociatedCounterId: nil, + }, + { + Key: 344, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average number of outstanding read requests", + Summary: "Average number of outstanding read requests to the virtual disk during the collection interval", + }, + Key: "readOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 345, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average number of outstanding write requests", + Summary: "Average number of outstanding write requests to the virtual disk during the collection interval", + }, + Key: "writeOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 346, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read workload metric", + Summary: "Storage DRS virtual disk metric for the read workload model", + }, + Key: "readLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 347, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write workload metric", + Summary: "Storage DRS virtual disk metric for the write workload model", + }, + Key: "writeLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 348, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (1 min average)", + Summary: "CPU active average over 1 minute", + }, + Key: "actav1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 349, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore bytes read", + Summary: "Storage DRS datastore bytes read", + }, + Key: "datastoreReadBytes", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 350, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore bytes written", + Summary: "Storage DRS datastore bytes written", + }, + Key: "datastoreWriteBytes", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 351, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore read I/O rate", + Summary: "Storage DRS datastore read I/O rate", + }, + Key: "datastoreReadIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 352, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore write I/O rate", + Summary: "Storage DRS datastore write I/O rate", + }, + Key: "datastoreWriteIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 353, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore outstanding read requests", + Summary: "Storage DRS datastore outstanding read requests", + }, + Key: "datastoreReadOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 354, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore outstanding write requests", + Summary: "Storage DRS datastore outstanding write requests", + }, + Key: "datastoreWriteOIO", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 355, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore normalized read latency", + Summary: "Storage DRS datastore normalized read latency", + }, + Key: "datastoreNormalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 356, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore normalized write latency", + Summary: "Storage DRS datastore normalized write latency", + }, + Key: "datastoreNormalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 2, + AssociatedCounterId: nil, + }, + { + Key: 357, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore read workload metric", + Summary: "Storage DRS datastore metric for read workload model", + }, + Key: "datastoreReadLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 358, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage DRS datastore write workload metric", + Summary: "Storage DRS datastore metric for write workload model", + }, + Key: "datastoreWriteLoadMetric", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 359, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore latency observed by VMs", + Summary: "The average datastore latency as seen by virtual machines", + }, + Key: "datastoreVMObservedLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 360, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network packets throughput transmitted", + Summary: "The rate of transmitted packets for this network", + }, + Key: "throughput.vds.txTotal", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 361, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network non-unicast packets throughput transmitted", + Summary: "The rate of transmitted non-unicast packets for this network", + }, + Key: "throughput.vds.txNoUnicast", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 362, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network cross-router packets throughput transmitted", + Summary: "The rate of transmitted cross-router packets for this network", + }, + Key: "throughput.vds.txCrsRouter", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 363, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network dropped transmitted packets throughput", + Summary: "Count of dropped transmitted packets for this network", + }, + Key: "throughput.vds.txDrop", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 364, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network packets throughput received", + Summary: "The rate of received packets for this network", + }, + Key: "throughput.vds.rxTotal", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 365, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network dropped received packets due to destination IP error throughput", + Summary: "Count of dropped received packets with destination IP error for this network", + }, + Key: "throughput.vds.rxDestErr", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 366, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network dropped received packets throughput", + Summary: "Count of dropped received packets for this network", + }, + Key: "throughput.vds.rxDrop", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 367, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network failed to match mapping entry for a unicast MAC throughput", + Summary: "Count of transmitted packets that cannot find matched mapping entry for this network", + }, + Key: "throughput.vds.macFlood", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 368, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network failed to allocate a new mapping entry during translation phase", + Summary: "Count of transmitted packets that failed to acquire new mapping entry during translation phase for this network", + }, + Key: "throughput.vds.macLKUPFull", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 369, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network failed to allocate a new mapping entry during learning phase", + Summary: "Count of transmitted packets that failed to acquire new mapping entry during learning phase for this network", + }, + Key: "throughput.vds.macUPDTFull", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 370, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Found Matched ARP Entry Throughput", + Summary: "Count of transmitted packets that found matched ARP entry for this network", + }, + Key: "throughput.vds.arpFound", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 371, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Found Matched ARP Entry Marked as Unknown Throughput", + Summary: "Count of transmitted packets whose matched arp entry is marked as unknown for this network", + }, + Key: "throughput.vds.arpUnknown", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 372, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Failed to Allocate ARP Entry During Translation Phase Throughput", + Summary: "Count of transmitted packets that failed to acquire new ARP entry during translation phase for this network", + }, + Key: "throughput.vds.arpLKUPFull", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 373, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN network found the same ARP requests have been sent into queue throughput", + Summary: "Count of transmitted packets whose ARP requests have already been sent into queue for this network", + }, + Key: "throughput.vds.arpWait", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 374, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VXLAN Network Found ARP Queries Have Been Expired Throughput", + Summary: "Count of arp queries that have been expired for this network", + }, + Key: "throughput.vds.arpTimeout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 386, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap wait", + Summary: "CPU time spent waiting for swap-in", + }, + Key: "swapwait", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 387, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 388, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 389, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 390, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "CPU utilization as a percentage during the interval (CPU usage and CPU utilization might be different due to power management technologies or hyper-threading)", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 391, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 392, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 393, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 394, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Core Utilization", + Summary: "CPU utilization of the corresponding core (if hyper-threading is enabled) as a percentage during the interval (A core is utilized if either or both of its logical CPUs are utilized)", + }, + Key: "coreUtilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 395, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Total capacity", + Summary: "Total CPU capacity reserved by and available for virtual machines", + }, + Key: "totalCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 396, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Latency", + Summary: "Percent of time the virtual machine is unable to run because it is contending for access to the physical CPU(s)", + }, + Key: "latency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 397, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Entitlement", + Summary: "CPU resources devoted by the ESX scheduler", + }, + Key: "entitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 398, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Demand", + Summary: "The amount of CPU resources a virtual machine would use if there were no CPU contention or CPU limit", + }, + Key: "demand", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 399, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Co-stop", + Summary: "Time the virtual machine is ready to run, but is unable to run due to co-scheduling constraints", + }, + Key: "costop", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 400, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max limited", + Summary: "Time the virtual machine is ready to run, but is not run due to maxing out its CPU limit setting", + }, + Key: "maxlimited", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 401, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overlap", + Summary: "Time the virtual machine was interrupted to perform system services on behalf of itself or other virtual machines", + }, + Key: "overlap", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 402, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Run", + Summary: "Time the virtual machine is scheduled to run", + }, + Key: "run", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 403, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Demand-to-entitlement ratio", + Summary: "CPU resource entitlement to CPU demand ratio (in percents)", + }, + Key: "demandEntitlementRatio", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 404, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Readiness", + Summary: "Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU", + }, + Key: "readiness", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU", + Summary: "CPU", + }, + Key: "cpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 405, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 406, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 407, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 408, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap in", + Summary: "Amount of guest physical memory that is swapped in from the swap space since the virtual machine has been powered on. This value is less than or equal to the 'Swap out' counter", + }, + Key: "swapin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 409, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 410, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 411, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 412, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Swap out", + Summary: "Amount of guest physical memory that is swapped out from the virtual machine to its swap space since it has been powered on.", + }, + Key: "swapout", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 413, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 414, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 415, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 416, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMkernel consumed", + Summary: "Amount of host physical memory consumed by VMkernel", + }, + Key: "sysUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 417, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active write", + Summary: "Amount of guest physical memory that is being actively written by guest. Activeness is estimated by ESXi", + }, + Key: "activewrite", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 418, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead reserved", + Summary: "Host physical memory reserved by ESXi, for its data structures, for running the virtual machine", + }, + Key: "overheadMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 419, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Total reservation", + Summary: "Total reservation, available and consumed, for powered-on virtual machines", + }, + Key: "totalCapacity", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 420, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compressed", + Summary: "Amount of guest physical memory pages compressed by ESXi", + }, + Key: "zipped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 421, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Compression saved", + Summary: "Host physical memory, reclaimed from a virtual machine, by memory compression. This value is less than the value of 'Compressed' memory", + }, + Key: "zipSaved", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 422, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Page-fault latency", + Summary: "Percentage of time the virtual machine spent waiting to swap in or decompress guest physical memory", + }, + Key: "latency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 423, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Entitlement", + Summary: "Amount of host physical memory the virtual machine deserves, as determined by ESXi", + }, + Key: "entitlement", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 424, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Reclamation threshold", + Summary: "Threshold of free host physical memory below which ESXi will begin actively reclaiming memory from virtual machines by swapping, compression and ballooning", + }, + Key: "lowfreethreshold", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 425, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 426, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in rate", + Summary: "Rate at which guest physical memory is swapped in from the host swap cache", + }, + Key: "llSwapInRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 427, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out rate", + Summary: "Rate at which guest physical memory is swapped out to the host swap cache", + }, + Key: "llSwapOutRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 428, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Overhead active", + Summary: "Estimate of the host physical memory, from Overhead consumed, that is actively read or written to by ESXi", + }, + Key: "overheadTouched", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 429, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 430, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 431, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache consumed", + Summary: "Storage space consumed on the host swap cache for storing swapped guest physical memory pages", + }, + Key: "llSwapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 432, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 433, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 434, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 435, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap in", + Summary: "Amount of guest physical memory swapped in from host cache", + }, + Key: "llSwapIn", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 436, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 437, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 438, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 439, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Host cache swap out", + Summary: "Amount of guest physical memory swapped out to the host swap cache", + }, + Key: "llSwapOut", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 440, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS PB Cache Size", + Summary: "Space used for holding VMFS Pointer Blocks in memory", + }, + Key: "vmfs.pbc.size", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 441, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Maximum VMFS PB Cache Size", + Summary: "Maximum size the VMFS Pointer Block Cache can grow to", + }, + Key: "vmfs.pbc.sizeMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 442, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS Working Set", + Summary: "Amount of file blocks whose addresses are cached in the VMFS PB Cache", + }, + Key: "vmfs.pbc.workingSet", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "TB", + Summary: "Terabyte", + }, + Key: "teraBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 443, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Maximum VMFS Working Set", + Summary: "Maximum amount of file blocks whose addresses are cached in the VMFS PB Cache", + }, + Key: "vmfs.pbc.workingSetMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "TB", + Summary: "Terabyte", + }, + Key: "teraBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 444, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS PB Cache Overhead", + Summary: "Amount of VMFS heap used by the VMFS PB Cache", + }, + Key: "vmfs.pbc.overhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 445, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VMFS PB Cache Capacity Miss Ratio", + Summary: "Trailing average of the ratio of capacity misses to compulsory misses for the VMFS PB Cache", + }, + Key: "vmfs.pbc.capMissRatio", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory", + Summary: "Memory", + }, + Key: "mem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 446, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Commands issued", + Summary: "Number of SCSI commands issued during the collection interval", + }, + Key: "commands", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 447, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical device read latency", + Summary: "Average amount of time, in milliseconds, to read from the physical device", + }, + Key: "deviceReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 448, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Kernel read latency", + Summary: "Average amount of time, in milliseconds, spent by VMkernel to process each SCSI read command", + }, + Key: "kernelReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 449, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "Average amount of time taken during the collection interval to process a SCSI read command issued from the guest OS to the virtual machine", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 450, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Queue read latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI read command, during the collection interval", + }, + Key: "queueReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 451, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical device write latency", + Summary: "Average amount of time, in milliseconds, to write to the physical device", + }, + Key: "deviceWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 452, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Kernel write latency", + Summary: "Average amount of time, in milliseconds, spent by VMkernel to process each SCSI write command", + }, + Key: "kernelWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 453, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "Average amount of time taken during the collection interval to process a SCSI write command issued by the guest OS to the virtual machine", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 454, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Queue write latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI write command, during the collection interval", + }, + Key: "queueWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 455, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Physical device command latency", + Summary: "Average amount of time, in milliseconds, to complete a SCSI command from the physical device", + }, + Key: "deviceLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 456, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Kernel command latency", + Summary: "Average amount of time, in milliseconds, spent by VMkernel to process each SCSI command", + }, + Key: "kernelLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 457, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Queue command latency", + Summary: "Average amount of time spent in the VMkernel queue, per SCSI command, during the collection interval", + }, + Key: "queueLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 458, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Maximum queue depth", + Summary: "Maximum queue depth", + }, + Key: "maxQueueDepth", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 459, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average commands issued per second", + Summary: "Average number of SCSI commands issued per second during the collection interval", + }, + Key: "commandsAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk", + Summary: "Disk", + }, + Key: "disk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 460, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Receive packets dropped", + Summary: "Number of receives dropped", + }, + Key: "droppedRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 461, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Transmit packets dropped", + Summary: "Number of transmits dropped", + }, + Key: "droppedTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 462, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data receive rate", + Summary: "Average amount of data received per second", + }, + Key: "bytesRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 463, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Data transmit rate", + Summary: "Average amount of data transmitted per second", + }, + Key: "bytesTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 464, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Broadcast receives", + Summary: "Number of broadcast packets received during the sampling interval", + }, + Key: "broadcastRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 465, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Broadcast transmits", + Summary: "Number of broadcast packets transmitted during the sampling interval", + }, + Key: "broadcastTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 466, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Multicast receives", + Summary: "Number of multicast packets received during the sampling interval", + }, + Key: "multicastRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 467, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Multicast transmits", + Summary: "Number of multicast packets transmitted during the sampling interval", + }, + Key: "multicastTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 468, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packet receive errors", + Summary: "Number of packets with errors received during the sampling interval", + }, + Key: "errorsRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 469, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Packet transmit errors", + Summary: "Number of packets with errors transmitted during the sampling interval", + }, + Key: "errorsTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 470, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Unknown protocol frames", + Summary: "Number of frames with unknown protocol received during the sampling interval", + }, + Key: "unknownProtos", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "summation", + StatsType: "delta", + Level: 2, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 471, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pnicBytesRx", + Summary: "pnicBytesRx", + }, + Key: "pnicBytesRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 472, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "pnicBytesTx", + Summary: "pnicBytesTx", + }, + Key: "pnicBytesTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Network", + Summary: "Network", + }, + Key: "net", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 473, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Heartbeat", + Summary: "Number of heartbeats issued per virtual machine during the interval", + }, + Key: "heartbeat", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 474, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Disk usage", + Summary: "Amount of disk space usage for each mount point", + }, + Key: "diskUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 475, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (None)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "none", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 476, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (Average)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 477, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (Maximum)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "maximum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 478, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU usage (Minimum)", + Summary: "Amount of CPU used by the Service Console and other applications during the interval", + }, + Key: "resourceCpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "minimum", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 479, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory touched", + Summary: "Memory touched by the system resource group", + }, + Key: "resourceMemTouched", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 480, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory mapped", + Summary: "Memory mapped by the system resource group", + }, + Key: "resourceMemMapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 481, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory share saved", + Summary: "Memory saved due to sharing by the system resource group", + }, + Key: "resourceMemShared", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 482, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory swapped", + Summary: "Memory swapped out by the system resource group", + }, + Key: "resourceMemSwapped", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 483, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory overhead", + Summary: "Overhead memory consumed by the system resource group", + }, + Key: "resourceMemOverhead", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 484, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory shared", + Summary: "Memory shared by the system resource group", + }, + Key: "resourceMemCow", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 485, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory zero", + Summary: "Zero filled memory used by the system resource group", + }, + Key: "resourceMemZero", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 486, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU running (1 min. average)", + Summary: "CPU running average over 1 minute of the system resource group", + }, + Key: "resourceCpuRun1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 487, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU active (1 min average)", + Summary: "CPU active average over 1 minute of the system resource group", + }, + Key: "resourceCpuAct1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 488, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU maximum limited (1 min)", + Summary: "CPU maximum limited over 1 minute of the system resource group", + }, + Key: "resourceCpuMaxLimited1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 489, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU running (5 min average)", + Summary: "CPU running average over 5 minutes of the system resource group", + }, + Key: "resourceCpuRun5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 490, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU active (5 min average)", + Summary: "CPU active average over 5 minutes of the system resource group", + }, + Key: "resourceCpuAct5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 491, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU maximum limited (5 min)", + Summary: "CPU maximum limited over 5 minutes of the system resource group", + }, + Key: "resourceCpuMaxLimited5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 492, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU allocation minimum (in MHz)", + Summary: "CPU allocation reservation (in MHz) of the system resource group", + }, + Key: "resourceCpuAllocMin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 493, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU allocation maximum (in MHz)", + Summary: "CPU allocation limit (in MHz) of the system resource group", + }, + Key: "resourceCpuAllocMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 494, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource CPU allocation shares", + Summary: "CPU allocation shares of the system resource group", + }, + Key: "resourceCpuAllocShares", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 495, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory allocation minimum (in KB)", + Summary: "Memory allocation reservation (in KB) of the system resource group", + }, + Key: "resourceMemAllocMin", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 496, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory allocation maximum (in KB)", + Summary: "Memory allocation limit (in KB) of the system resource group", + }, + Key: "resourceMemAllocMax", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 497, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory allocation shares", + Summary: "Memory allocation shares of the system resource group", + }, + Key: "resourceMemAllocShares", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 498, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "OS Uptime", + Summary: "Total time elapsed, in seconds, since last operating system boot-up", + }, + Key: "osUptime", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "s", + Summary: "Second", + }, + Key: "second", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 499, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource memory consumed", + Summary: "Memory consumed by the system resource group", + }, + Key: "resourceMemConsumed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 500, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "File descriptors used", + Summary: "Number of file descriptors used by the system resource group", + }, + Key: "resourceFdUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "System", + Summary: "System", + }, + Key: "sys", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 501, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (1 min peak)", + Summary: "CPU active peak over 1 minute", + }, + Key: "actpk1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 502, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (1 min average)", + Summary: "CPU running average over 1 minute", + }, + Key: "runav1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 503, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (5 min average)", + Summary: "CPU active average over 5 minutes", + }, + Key: "actav5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 504, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (5 min peak)", + Summary: "CPU active peak over 5 minutes", + }, + Key: "actpk5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 505, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (5 min average)", + Summary: "CPU running average over 5 minutes", + }, + Key: "runav5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 506, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (15 min average)", + Summary: "CPU active average over 15 minutes", + }, + Key: "actav15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 507, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Active (15 min peak)", + Summary: "CPU active peak over 15 minutes", + }, + Key: "actpk15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 508, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (15 min average)", + Summary: "CPU running average over 15 minutes", + }, + Key: "runav15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 509, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (1 min peak)", + Summary: "CPU running peak over 1 minute", + }, + Key: "runpk1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 510, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Throttled (1 min average)", + Summary: "Amount of CPU resources over the limit that were refused, average over 1 minute", + }, + Key: "maxLimited1", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 511, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (5 min peak)", + Summary: "CPU running peak over 5 minutes", + }, + Key: "runpk5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 512, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Throttled (5 min average)", + Summary: "Amount of CPU resources over the limit that were refused, average over 5 minutes", + }, + Key: "maxLimited5", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 513, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Running (15 min peak)", + Summary: "CPU running peak over 15 minutes", + }, + Key: "runpk15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 514, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Throttled (15 min average)", + Summary: "Amount of CPU resources over the limit that were refused, average over 15 minutes", + }, + Key: "maxLimited15", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 515, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Group CPU sample count", + Summary: "Group CPU sample count", + }, + Key: "sampleCount", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 516, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Group CPU sample period", + Summary: "Group CPU sample period", + }, + Key: "samplePeriod", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Resource group CPU", + Summary: "Resource group CPU", + }, + Key: "rescpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 517, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "Amount of total configured memory that is available for use", + }, + Key: "memUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 518, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory swap used", + Summary: "Sum of the memory swapped by all powered-on virtual machines on the host", + }, + Key: "swapUsed", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 519, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "CPU usage", + Summary: "Amount of Service Console CPU usage", + }, + Key: "cpuUsage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Management agent", + Summary: "Management agent", + }, + Key: "managementAgent", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MHz", + Summary: "Megahertz", + }, + Key: "megaHertz", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 520, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average commands issued per second", + Summary: "Average number of commands issued per second on the storage path during the collection interval", + }, + Key: "commandsAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 521, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read requests per second", + Summary: "Average number of read commands issued per second on the storage path during the collection interval", + }, + Key: "numberReadAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 522, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write requests per second", + Summary: "Average number of write commands issued per second on the storage path during the collection interval", + }, + Key: "numberWriteAveraged", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 523, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read rate", + Summary: "Rate of reading data on the storage path", + }, + Key: "read", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 524, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write rate", + Summary: "Rate of writing data on the storage path", + }, + Key: "write", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 525, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read latency", + Summary: "The average time a read issued on the storage path takes", + }, + Key: "totalReadLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 526, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write latency", + Summary: "The average time a write issued on the storage path takes", + }, + Key: "totalWriteLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage path", + Summary: "Storage path", + }, + Key: "storagePath", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 3, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 527, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read request size", + Summary: "Average read request size in bytes", + }, + Key: "readIOSize", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 528, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write request size", + Summary: "Average write request size in bytes", + }, + Key: "writeIOSize", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 529, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of small seeks", + Summary: "Number of seeks during the interval that were less than 64 LBNs apart", + }, + Key: "smallSeeks", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 530, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of medium seeks", + Summary: "Number of seeks during the interval that were between 64 and 8192 LBNs apart", + }, + Key: "mediumSeeks", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 531, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of large seeks", + Summary: "Number of seeks during the interval that were greater than 8192 LBNs apart", + }, + Key: "largeSeeks", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 532, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read Latency (us)", + Summary: "Read latency in microseconds", + }, + Key: "readLatencyUS", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 533, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write Latency (us)", + Summary: "Write latency in microseconds", + }, + Key: "writeLatencyUS", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 534, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Flash Read Cache I/Os per second for the virtual disk", + Summary: "The average virtual Flash Read Cache I/Os per second value for the virtual disk", + }, + Key: "vFlashCacheIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 535, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Flash Read Cache latency for the virtual disk", + Summary: "The average virtual Flash Read Cache latency value for the virtual disk", + }, + Key: "vFlashCacheLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "µs", + Summary: "Microsecond", + }, + Key: "microsecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 536, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual Flash Read Cache throughput for virtual disk", + Summary: "The average virtual Flash Read Cache throughput value for the virtual disk", + }, + Key: "vFlashCacheThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual disk", + Summary: "Virtual disk", + }, + Key: "virtualDisk", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 537, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Storage I/O Control datastore maximum queue depth", + Summary: "Storage I/O Control datastore maximum queue depth", + }, + Key: "datastoreMaxQueueDepth", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Datastore", + Summary: "Datastore", + }, + Key: "datastore", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 1, + PerDeviceLevel: 3, + AssociatedCounterId: nil, + }, + { + Key: 538, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication VM Count", + Summary: "Current number of replicated virtual machines", + }, + Key: "hbrNumVms", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication", + Summary: "vSphere Replication", + }, + Key: "hbr", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 539, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Replication Data Receive Rate", + Summary: "Average amount of data received per second", + }, + Key: "hbrNetRx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication", + Summary: "vSphere Replication", + }, + Key: "hbr", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 540, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Replication Data Transmit Rate", + Summary: "Average amount of data transmitted per second", + }, + Key: "hbrNetTx", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Replication", + Summary: "vSphere Replication", + }, + Key: "hbr", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 541, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Number of caches controlled by the virtual flash module", + Summary: "Number of caches controlled by the virtual flash module", + }, + Key: "numActiveVMDKs", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Virtual flash", + Summary: "Virtual flash module related statistical values", + }, + Key: "vflashModule", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 542, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read IOPS", + Summary: "Read IOPS", + }, + Key: "readIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 543, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read throughput", + Summary: "Read throughput in kBps", + }, + Key: "readThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 544, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average read latency", + Summary: "Average read latency in ms", + }, + Key: "readAvgLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 545, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max read latency", + Summary: "Max read latency in ms", + }, + Key: "readMaxLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 546, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Cache hit rate", + Summary: "Cache hit rate percentage", + }, + Key: "readCacheHitRate", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 547, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Read congestion per sampling interval", + Summary: "Read congestion", + }, + Key: "readCongestion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 548, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write IOPS", + Summary: "Write IOPS", + }, + Key: "writeIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 549, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write throughput", + Summary: "Write throughput in kBps", + }, + Key: "writeThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 550, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average write latency", + Summary: "Average write latency in ms", + }, + Key: "writeAvgLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 551, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max write latency", + Summary: "Max write latency in ms", + }, + Key: "writeMaxLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 552, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Write congestion per sampling interval", + Summary: "Write congestion", + }, + Key: "writeCongestion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 553, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Recovery write IOPS", + Summary: "Recovery write IOPS", + }, + Key: "recoveryWriteIops", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 554, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Recovery write through-put", + Summary: "Recovery write through-put in kBps", + }, + Key: "recoveryWriteThroughput", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KBps", + Summary: "Kilobytes per second", + }, + Key: "kiloBytesPerSecond", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 555, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Average recovery write latency", + Summary: "Average recovery write latency in ms", + }, + Key: "recoveryWriteAvgLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 556, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Max recovery write latency", + Summary: "Max recovery write latency in ms", + }, + Key: "recoveryWriteMaxLatency", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "ms", + Summary: "Millisecond", + }, + Key: "millisecond", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 557, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Recovery write congestion per sampling interval", + Summary: "Recovery write congestion", + }, + Key: "recoveryWriteCongestion", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "VSAN DOM Objects", + Summary: "VSAN DOM object related statistical values", + }, + Key: "vsanDomObj", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "num", + Summary: "Number", + }, + Key: "number", + }, + RollupType: "average", + StatsType: "rate", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 558, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 559, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 560, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 561, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Utilization", + Summary: "The utilization of a GPU in percentages", + }, + Key: "utilization", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 562, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 563, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 564, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 565, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory used", + Summary: "The amount of GPU memory used in kilobytes", + }, + Key: "mem.used", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "KB", + Summary: "Kilobyte", + }, + Key: "kiloBytes", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 566, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "none", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 567, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 568, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "maximum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 569, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Memory usage", + Summary: "The amount of GPU memory used in percentages of the total available", + }, + Key: "mem.usage", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "%", + Summary: "Percentage", + }, + Key: "percent", + }, + RollupType: "minimum", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 570, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Temperature", + Summary: "The temperature of a GPU in degrees celsius", + }, + Key: "temperature", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "GPU", + Summary: "GPU", + }, + Key: "gpu", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "℃", + Summary: "Temperature in degrees Celsius", + }, + Key: "celsius", + }, + RollupType: "average", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, + { + Key: 571, + NameInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "Persistent memory available reservation", + Summary: "Persistent memory available reservation on a host.", + }, + Key: "available.reservation", + }, + GroupInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "PMEM", + Summary: "PMEM", + }, + Key: "pmem", + }, + UnitInfo: &types.ElementDescription{ + Description: types.Description{ + Label: "MB", + Summary: "Megabyte", + }, + Key: "megaBytes", + }, + RollupType: "latest", + StatsType: "absolute", + Level: 4, + PerDeviceLevel: 4, + AssociatedCounterId: nil, + }, +} + +var VmMetrics = []types.PerfMetricId{ + { + CounterId: 12, + Instance: "$cpu", + }, + { + CounterId: 401, + Instance: "$cpu", + }, + { + CounterId: 2, + Instance: "", + }, + { + CounterId: 14, + Instance: "", + }, + { + CounterId: 10, + Instance: "", + }, + { + CounterId: 401, + Instance: "", + }, + { + CounterId: 402, + Instance: "$cpu", + }, + { + CounterId: 396, + Instance: "", + }, + { + CounterId: 13, + Instance: "", + }, + { + CounterId: 11, + Instance: "$cpu", + }, + { + CounterId: 386, + Instance: "$cpu", + }, + { + CounterId: 399, + Instance: "$cpu", + }, + { + CounterId: 397, + Instance: "", + }, + { + CounterId: 6, + Instance: "$cpu", + }, + { + CounterId: 404, + Instance: "$cpu", + }, + { + CounterId: 386, + Instance: "", + }, + { + CounterId: 14, + Instance: "$cpu", + }, + { + CounterId: 11, + Instance: "", + }, + { + CounterId: 400, + Instance: "$cpu", + }, + { + CounterId: 6, + Instance: "", + }, + { + CounterId: 399, + Instance: "", + }, + { + CounterId: 403, + Instance: "", + }, + { + CounterId: 404, + Instance: "", + }, + { + CounterId: 398, + Instance: "", + }, + { + CounterId: 13, + Instance: "$cpu", + }, + { + CounterId: 400, + Instance: "", + }, + { + CounterId: 402, + Instance: "", + }, + { + CounterId: 12, + Instance: "", + }, + { + CounterId: 184, + Instance: "", + }, + { + CounterId: 180, + Instance: "$physDisk", + }, + { + CounterId: 181, + Instance: "$physDisk", + }, + { + CounterId: 178, + Instance: "$physDisk", + }, + { + CounterId: 182, + Instance: "$physDisk", + }, + { + CounterId: 179, + Instance: "$physDisk", + }, + { + CounterId: 183, + Instance: "$physDisk", + }, + { + CounterId: 133, + Instance: "", + }, + { + CounterId: 37, + Instance: "", + }, + { + CounterId: 74, + Instance: "", + }, + { + CounterId: 426, + Instance: "", + }, + { + CounterId: 70, + Instance: "", + }, + { + CounterId: 107, + Instance: "", + }, + { + CounterId: 422, + Instance: "", + }, + { + CounterId: 105, + Instance: "", + }, + { + CounterId: 85, + Instance: "", + }, + { + CounterId: 428, + Instance: "", + }, + { + CounterId: 418, + Instance: "", + }, + { + CounterId: 102, + Instance: "", + }, + { + CounterId: 33, + Instance: "", + }, + { + CounterId: 427, + Instance: "", + }, + { + CounterId: 94, + Instance: "", + }, + { + CounterId: 29, + Instance: "", + }, + { + CounterId: 420, + Instance: "", + }, + { + CounterId: 417, + Instance: "", + }, + { + CounterId: 98, + Instance: "", + }, + { + CounterId: 423, + Instance: "", + }, + { + CounterId: 106, + Instance: "", + }, + { + CounterId: 86, + Instance: "", + }, + { + CounterId: 41, + Instance: "", + }, + { + CounterId: 421, + Instance: "", + }, + { + CounterId: 429, + Instance: "", + }, + { + CounterId: 406, + Instance: "", + }, + { + CounterId: 90, + Instance: "", + }, + { + CounterId: 24, + Instance: "", + }, + { + CounterId: 410, + Instance: "", + }, + { + CounterId: 149, + Instance: "vmnic1", + }, + { + CounterId: 466, + Instance: "4000", + }, + { + CounterId: 146, + Instance: "", + }, + { + CounterId: 461, + Instance: "", + }, + { + CounterId: 148, + Instance: "vmnic1", + }, + { + CounterId: 462, + Instance: "vmnic0", + }, + { + CounterId: 143, + Instance: "vmnic0", + }, + { + CounterId: 463, + Instance: "vmnic1", + }, + { + CounterId: 147, + Instance: "", + }, + { + CounterId: 463, + Instance: "4000", + }, + { + CounterId: 462, + Instance: "vmnic1", + }, + { + CounterId: 462, + Instance: "4000", + }, + { + CounterId: 461, + Instance: "4000", + }, + { + CounterId: 146, + Instance: "vmnic0", + }, + { + CounterId: 465, + Instance: "4000", + }, + { + CounterId: 460, + Instance: "4000", + }, + { + CounterId: 149, + Instance: "4000", + }, + { + CounterId: 148, + Instance: "4000", + }, + { + CounterId: 462, + Instance: "", + }, + { + CounterId: 149, + Instance: "vmnic0", + }, + { + CounterId: 143, + Instance: "4000", + }, + { + CounterId: 463, + Instance: "", + }, + { + CounterId: 147, + Instance: "vmnic1", + }, + { + CounterId: 466, + Instance: "", + }, + { + CounterId: 472, + Instance: "4000", + }, + { + CounterId: 143, + Instance: "", + }, + { + CounterId: 146, + Instance: "vmnic1", + }, + { + CounterId: 146, + Instance: "4000", + }, + { + CounterId: 472, + Instance: "", + }, + { + CounterId: 471, + Instance: "", + }, + { + CounterId: 460, + Instance: "", + }, + { + CounterId: 147, + Instance: "4000", + }, + { + CounterId: 471, + Instance: "4000", + }, + { + CounterId: 148, + Instance: "", + }, + { + CounterId: 147, + Instance: "vmnic0", + }, + { + CounterId: 465, + Instance: "", + }, + { + CounterId: 464, + Instance: "4000", + }, + { + CounterId: 464, + Instance: "", + }, + { + CounterId: 148, + Instance: "vmnic0", + }, + { + CounterId: 463, + Instance: "vmnic0", + }, + { + CounterId: 467, + Instance: "", + }, + { + CounterId: 143, + Instance: "vmnic1", + }, + { + CounterId: 149, + Instance: "", + }, + { + CounterId: 467, + Instance: "4000", + }, + { + CounterId: 159, + Instance: "", + }, + { + CounterId: 157, + Instance: "", + }, + { + CounterId: 504, + Instance: "", + }, + { + CounterId: 507, + Instance: "", + }, + { + CounterId: 513, + Instance: "", + }, + { + CounterId: 348, + Instance: "", + }, + { + CounterId: 505, + Instance: "", + }, + { + CounterId: 514, + Instance: "", + }, + { + CounterId: 506, + Instance: "", + }, + { + CounterId: 512, + Instance: "", + }, + { + CounterId: 508, + Instance: "", + }, + { + CounterId: 515, + Instance: "", + }, + { + CounterId: 509, + Instance: "", + }, + { + CounterId: 501, + Instance: "", + }, + { + CounterId: 516, + Instance: "", + }, + { + CounterId: 503, + Instance: "", + }, + { + CounterId: 511, + Instance: "", + }, + { + CounterId: 510, + Instance: "", + }, + { + CounterId: 502, + Instance: "", + }, + { + CounterId: 155, + Instance: "", + }, + { + CounterId: 473, + Instance: "", + }, + { + CounterId: 498, + Instance: "", + }, + { + CounterId: 174, + Instance: "", + }, + { + CounterId: 173, + Instance: "", + }, +} + +// ************************* Host metrics ************************************ + +var HostMetrics = []types.PerfMetricId{ + { + CounterId: 386, + Instance: "", + }, + { + CounterId: 395, + Instance: "", + }, + { + CounterId: 14, + Instance: "", + }, + { + CounterId: 399, + Instance: "", + }, + { + CounterId: 392, + Instance: "", + }, + { + CounterId: 392, + Instance: "$cpu", + }, + { + CounterId: 11, + Instance: "", + }, + { + CounterId: 398, + Instance: "", + }, + { + CounterId: 388, + Instance: "", + }, + { + CounterId: 388, + Instance: "$cpu", + }, + { + CounterId: 13, + Instance: "", + }, + { + CounterId: 396, + Instance: "", + }, + { + CounterId: 12, + Instance: "", + }, + { + CounterId: 9, + Instance: "", + }, + { + CounterId: 2, + Instance: "", + }, + { + CounterId: 14, + Instance: "$cpu", + }, + { + CounterId: 404, + Instance: "", + }, + { + CounterId: 6, + Instance: "", + }, + { + CounterId: 2, + Instance: "$cpu", + }, + { + CounterId: 13, + Instance: "$cpu", + }, + { + CounterId: 185, + Instance: "d10c389e-c75b7dc4", + }, + { + CounterId: 179, + Instance: "$physDisk", + }, + { + CounterId: 178, + Instance: "$physDisk", + }, + { + CounterId: 358, + Instance: "$physDisk", + }, + { + CounterId: 537, + Instance: "$physDisk", + }, + { + CounterId: 354, + Instance: "$physDisk", + }, + { + CounterId: 191, + Instance: "$physDisk", + }, + { + CounterId: 352, + Instance: "$physDisk", + }, + { + CounterId: 359, + Instance: "$physDisk", + }, + { + CounterId: 184, + Instance: "", + }, + { + CounterId: 186, + Instance: "$physDisk", + }, + { + CounterId: 351, + Instance: "$physDisk", + }, + { + CounterId: 180, + Instance: "$physDisk", + }, + { + CounterId: 353, + Instance: "$physDisk", + }, + { + CounterId: 356, + Instance: "$physDisk", + }, + { + CounterId: 355, + Instance: "$physDisk", + }, + { + CounterId: 350, + Instance: "$physDisk", + }, + { + CounterId: 349, + Instance: "$physDisk", + }, + { + CounterId: 182, + Instance: "$physDisk", + }, + { + CounterId: 357, + Instance: "$physDisk", + }, + { + CounterId: 181, + Instance: "$physDisk", + }, + { + CounterId: 185, + Instance: "$physDisk", + }, + { + CounterId: 183, + Instance: "$physDisk", + }, + + { + CounterId: 455, + Instance: "$physDisk", + }, + { + CounterId: 133, + Instance: "", + }, + { + CounterId: 456, + Instance: "$physDisk", + }, + { + CounterId: 457, + Instance: "$physDisk", + }, + { + CounterId: 129, + Instance: "$physDisk", + }, + { + CounterId: 448, + Instance: "$physDisk", + }, + { + CounterId: 130, + Instance: "", + }, + { + CounterId: 447, + Instance: "$physDisk", + }, + { + CounterId: 458, + Instance: "$physDisk", + }, + { + CounterId: 131, + Instance: "$physDisk", + }, + { + CounterId: 134, + Instance: "$physDisk", + }, + { + CounterId: 446, + Instance: "$physDisk", + }, + { + CounterId: 450, + Instance: "$physDisk", + }, + { + CounterId: 451, + Instance: "$physDisk", + }, + { + CounterId: 453, + Instance: "$physDisk", + }, + { + CounterId: 452, + Instance: "$physDisk", + }, + { + CounterId: 454, + Instance: "$physDisk", + }, + { + CounterId: 128, + Instance: "$physDisk", + }, + { + CounterId: 132, + Instance: "$physDisk", + }, + { + CounterId: 459, + Instance: "$physDisk", + }, + { + CounterId: 130, + Instance: "$physDisk", + }, + { + CounterId: 125, + Instance: "", + }, + { + CounterId: 131, + Instance: "", + }, + { + CounterId: 449, + Instance: "$physDisk", + }, + { + CounterId: 135, + Instance: "$physDisk", + }, + { + CounterId: 136, + Instance: "$physDisk", + }, + { + CounterId: 137, + Instance: "$physDisk", + }, + { + CounterId: 538, + Instance: "", + }, + { + CounterId: 540, + Instance: "", + }, + { + CounterId: 539, + Instance: "", + }, + { + CounterId: 65, + Instance: "", + }, + { + CounterId: 27, + Instance: "", + }, + { + CounterId: 419, + Instance: "", + }, + { + CounterId: 443, + Instance: "", + }, + { + CounterId: 437, + Instance: "", + }, + { + CounterId: 24, + Instance: "", + }, + { + CounterId: 68, + Instance: "", + }, + { + CounterId: 422, + Instance: "", + }, + { + CounterId: 106, + Instance: "", + }, + { + CounterId: 410, + Instance: "", + }, + { + CounterId: 33, + Instance: "", + }, + { + CounterId: 105, + Instance: "", + }, + { + CounterId: 107, + Instance: "", + }, + { + CounterId: 61, + Instance: "", + }, + { + CounterId: 445, + Instance: "", + }, + { + CounterId: 417, + Instance: "", + }, + { + CounterId: 406, + Instance: "", + }, + { + CounterId: 444, + Instance: "", + }, + { + CounterId: 427, + Instance: "", + }, + { + CounterId: 85, + Instance: "", + }, + { + CounterId: 424, + Instance: "", + }, + { + CounterId: 49, + Instance: "", + }, + { + CounterId: 414, + Instance: "", + }, + { + CounterId: 98, + Instance: "", + }, + { + CounterId: 29, + Instance: "", + }, + { + CounterId: 57, + Instance: "", + }, + { + CounterId: 441, + Instance: "", + }, + { + CounterId: 41, + Instance: "", + }, + { + CounterId: 86, + Instance: "", + }, + { + CounterId: 433, + Instance: "", + }, + { + CounterId: 45, + Instance: "", + }, + { + CounterId: 426, + Instance: "", + }, + { + CounterId: 429, + Instance: "", + }, + { + CounterId: 440, + Instance: "", + }, + { + CounterId: 102, + Instance: "", + }, + { + CounterId: 90, + Instance: "", + }, + { + CounterId: 37, + Instance: "", + }, + { + CounterId: 442, + Instance: "", + }, + { + CounterId: 469, + Instance: "vmnic0", + }, + { + CounterId: 460, + Instance: "", + }, + { + CounterId: 463, + Instance: "", + }, + { + CounterId: 143, + Instance: "", + }, + { + CounterId: 465, + Instance: "", + }, + { + CounterId: 461, + Instance: "", + }, + { + CounterId: 468, + Instance: "", + }, + { + CounterId: 143, + Instance: "vmnic0", + }, + { + CounterId: 467, + Instance: "vmnic0", + }, + { + CounterId: 149, + Instance: "vmnic0", + }, + { + CounterId: 149, + Instance: "", + }, + { + CounterId: 470, + Instance: "", + }, + { + CounterId: 466, + Instance: "", + }, + { + CounterId: 146, + Instance: "", + }, + { + CounterId: 465, + Instance: "vmnic0", + }, + { + CounterId: 461, + Instance: "vmnic0", + }, + { + CounterId: 466, + Instance: "vmnic0", + }, + { + CounterId: 146, + Instance: "vmnic0", + }, + { + CounterId: 464, + Instance: "vmnic0", + }, + { + CounterId: 148, + Instance: "vmnic0", + }, + { + CounterId: 460, + Instance: "vmnic0", + }, + { + CounterId: 468, + Instance: "vmnic0", + }, + { + CounterId: 147, + Instance: "", + }, + { + CounterId: 463, + Instance: "vmnic0", + }, + { + CounterId: 462, + Instance: "vmnic0", + }, + { + CounterId: 464, + Instance: "", + }, + { + CounterId: 470, + Instance: "vmnic0", + }, + { + CounterId: 148, + Instance: "", + }, + { + CounterId: 462, + Instance: "", + }, + { + CounterId: 467, + Instance: "", + }, + { + CounterId: 469, + Instance: "", + }, + { + CounterId: 147, + Instance: "vmnic0", + }, + { + CounterId: 159, + Instance: "", + }, + { + CounterId: 158, + Instance: "", + }, + { + CounterId: 157, + Instance: "", + }, + { + CounterId: 503, + Instance: "", + }, + { + CounterId: 511, + Instance: "", + }, + { + CounterId: 504, + Instance: "", + }, + { + CounterId: 501, + Instance: "", + }, + { + CounterId: 513, + Instance: "", + }, + { + CounterId: 516, + Instance: "", + }, + { + CounterId: 507, + Instance: "", + }, + { + CounterId: 508, + Instance: "", + }, + { + CounterId: 502, + Instance: "", + }, + { + CounterId: 348, + Instance: "", + }, + { + CounterId: 505, + Instance: "", + }, + { + CounterId: 510, + Instance: "", + }, + { + CounterId: 512, + Instance: "", + }, + { + CounterId: 515, + Instance: "", + }, + { + CounterId: 514, + Instance: "", + }, + { + CounterId: 506, + Instance: "", + }, + { + CounterId: 509, + Instance: "", + }, + { + CounterId: 161, + Instance: "vmhba32", + }, + { + CounterId: 162, + Instance: "vmhba1", + }, + { + CounterId: 166, + Instance: "vmhba32", + }, + { + CounterId: 163, + Instance: "vmhba1", + }, + { + CounterId: 163, + Instance: "vmhba0", + }, + { + CounterId: 168, + Instance: "", + }, + { + CounterId: 167, + Instance: "vmhba32", + }, + { + CounterId: 162, + Instance: "vmhba0", + }, + { + CounterId: 164, + Instance: "vmhba1", + }, + { + CounterId: 167, + Instance: "vmhba1", + }, + { + CounterId: 167, + Instance: "vmhba0", + }, + { + CounterId: 162, + Instance: "vmhba32", + }, + { + CounterId: 164, + Instance: "vmhba0", + }, + { + CounterId: 166, + Instance: "vmhba1", + }, + { + CounterId: 166, + Instance: "vmhba0", + }, + { + CounterId: 165, + Instance: "vmhba1", + }, + { + CounterId: 165, + Instance: "vmhba0", + }, + { + CounterId: 164, + Instance: "vmhba32", + }, + { + CounterId: 161, + Instance: "vmhba1", + }, + { + CounterId: 161, + Instance: "vmhba0", + }, + { + CounterId: 163, + Instance: "vmhba32", + }, + { + CounterId: 165, + Instance: "vmhba32", + }, + { + CounterId: 520, + Instance: "$physDisk", + }, + { + CounterId: 523, + Instance: "$physDisk", + }, + { + CounterId: 193, + Instance: "", + }, + { + CounterId: 522, + Instance: "$physDisk", + }, + { + CounterId: 524, + Instance: "$physDisk", + }, + { + CounterId: 521, + Instance: "$physDisk", + }, + { + CounterId: 525, + Instance: "$physDisk", + }, + { + CounterId: 526, + Instance: "$physDisk", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 482, + Instance: "host/system/svmotion", + }, + { + CounterId: 483, + Instance: "host/system/kernel/root", + }, + { + CounterId: 479, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 499, + Instance: "host/system/kernel/var", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 485, + Instance: "host/system/kernel/var", + }, + { + CounterId: 480, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 481, + Instance: "host/system/vmotion", + }, + { + CounterId: 488, + Instance: "host/vim", + }, + { + CounterId: 484, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 481, + Instance: "host/iofilters/spm", + }, + { + CounterId: 480, + Instance: "host/vim", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 483, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 500, + Instance: "host/system/kernel/var", + }, + { + CounterId: 500, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 480, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 499, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 485, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 482, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 481, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 484, + Instance: "host/system/kernel/root", + }, + { + CounterId: 481, + Instance: "host/system/kernel/root", + }, + { + CounterId: 480, + Instance: "host/system/kernel/var", + }, + { + CounterId: 479, + Instance: "host/system/kernel/root", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 485, + Instance: "host/system/kernel", + }, + { + CounterId: 499, + Instance: "host/iofilters", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 484, + Instance: "host/system/kernel", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 481, + Instance: "host/system/kernel/var", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 480, + Instance: "host/system/kernel", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 476, + Instance: "host/system/kernel", + }, + { + CounterId: 483, + Instance: "host/system/kernel/var", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 500, + Instance: "host/system/kernel", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 496, + Instance: "host/system", + }, + { + CounterId: 500, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 494, + Instance: "host/system", + }, + { + CounterId: 482, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 482, + Instance: "host/system/kernel", + }, + { + CounterId: 491, + Instance: "host/system", + }, + { + CounterId: 487, + Instance: "host/system", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 481, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 500, + Instance: "host/vim/vmci", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 482, + Instance: "host/iofilters/spm", + }, + { + CounterId: 499, + Instance: "host/system", + }, + { + CounterId: 485, + Instance: "host/system", + }, + { + CounterId: 483, + Instance: "host/system/kernel", + }, + { + CounterId: 483, + Instance: "host/system/vmotion", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 484, + Instance: "host/system", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 476, + Instance: "host/vim", + }, + { + CounterId: 499, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 493, + Instance: "host/system", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 481, + Instance: "host/system", + }, + { + CounterId: 479, + Instance: "host/system/kernel/var", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 476, + Instance: "host/system", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 500, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 499, + Instance: "host", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 479, + Instance: "host/system/drivers", + }, + { + CounterId: 476, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 484, + Instance: "host", + }, + { + CounterId: 485, + Instance: "host/system/kernel/root", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 483, + Instance: "host/system/drivers", + }, + { + CounterId: 479, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 481, + Instance: "host", + }, + { + CounterId: 480, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 479, + Instance: "host/system/vmotion", + }, + { + CounterId: 500, + Instance: "host", + }, + { + CounterId: 476, + Instance: "host/system/kernel/var", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 481, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 481, + Instance: "host/system/svmotion", + }, + { + CounterId: 484, + Instance: "host/system/helper", + }, + { + CounterId: 499, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 500, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 500, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 476, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 499, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 482, + Instance: "host/system/kernel/var", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 485, + Instance: "host/system/svmotion", + }, + { + CounterId: 476, + Instance: "host/iofilters", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 482, + Instance: "host/vim", + }, + { + CounterId: 484, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 480, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 479, + Instance: "host/system/kernel", + }, + { + CounterId: 486, + Instance: "host/system/vmotion", + }, + { + CounterId: 492, + Instance: "host/system", + }, + { + CounterId: 483, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 485, + Instance: "host/vim", + }, + { + CounterId: 483, + Instance: "host/system/helper", + }, + { + CounterId: 476, + Instance: "host/system/vmotion", + }, + { + CounterId: 489, + Instance: "host/system", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 499, + Instance: "host/system/svmotion", + }, + { + CounterId: 485, + Instance: "host/iofilters/spm", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 481, + Instance: "host/system/helper", + }, + { + CounterId: 497, + Instance: "host/system", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 480, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 491, + Instance: "host/system/vmotion", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 485, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 476, + Instance: "host/system/drivers", + }, + { + CounterId: 485, + Instance: "host/system/vmotion", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 483, + Instance: "host/iofilters", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 485, + Instance: "host/system/drivers", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 499, + Instance: "host/system/ft", + }, + { + CounterId: 483, + Instance: "host/system/ft", + }, + { + CounterId: 484, + Instance: "host/system/ft", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 480, + Instance: "host/system/vmotion", + }, + { + CounterId: 487, + Instance: "host/vim", + }, + { + CounterId: 484, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 484, + Instance: "host/system/vmotion", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 486, + Instance: "host/vim", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 483, + Instance: "host/system", + }, + { + CounterId: 495, + Instance: "host/system", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 499, + Instance: "host/system/vmotion", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 488, + Instance: "host/system/vmotion", + }, + { + CounterId: 489, + Instance: "host/system/vmotion", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 481, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 492, + Instance: "host/system/vmotion", + }, + { + CounterId: 485, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 499, + Instance: "host/system/helper", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 493, + Instance: "host/system/vmotion", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 479, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 482, + Instance: "host/system/kernel/root", + }, + { + CounterId: 495, + Instance: "host/vim", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 479, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 481, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 495, + Instance: "host/system/vmotion", + }, + { + CounterId: 482, + Instance: "host", + }, + { + CounterId: 480, + Instance: "host/system/svmotion", + }, + { + CounterId: 480, + Instance: "host/user", + }, + { + CounterId: 483, + Instance: "host/system/svmotion", + }, + { + CounterId: 480, + Instance: "host", + }, + { + CounterId: 488, + Instance: "host/system", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 481, + Instance: "host/vim", + }, + { + CounterId: 483, + Instance: "host/vim", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 490, + Instance: "host/vim", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 484, + Instance: "host/vim/tmp", + }, + { + CounterId: 491, + Instance: "host/vim", + }, + { + CounterId: 481, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 490, + Instance: "host/system", + }, + { + CounterId: 482, + Instance: "host/system/drivers", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 482, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 479, + Instance: "host/iofilters/spm", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 479, + Instance: "host/vim/vimuser", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 499, + Instance: "host/system/kernel", + }, + { + CounterId: 481, + Instance: "host/system/kernel/hostdstats", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 485, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 485, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 481, + Instance: "host/system/drivers", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 492, + Instance: "host/vim", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 499, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 484, + Instance: "host/system/drivers", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 485, + Instance: "host", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 485, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 496, + Instance: "host/system/vmotion", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 500, + Instance: "host/system/svmotion", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 485, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 484, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 482, + Instance: "host/vim/vimuser", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 486, + Instance: "host/system", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 485, + Instance: "host/system/ft", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 483, + Instance: "host/user", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 481, + Instance: "host/iofilters", + }, + { + CounterId: 476, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 499, + Instance: "host/system/kernel/root", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 479, + Instance: "host/system", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 481, + Instance: "host/system/ft", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 499, + Instance: "host/vim/tmp", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 480, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 484, + Instance: "host/vim", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 484, + Instance: "host/system/kernel/var", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 481, + Instance: "host/vim/vmci", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 476, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 479, + Instance: "host/user", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 487, + Instance: "host/system/vmotion", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 476, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 500, + Instance: "host/system/vmotion", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 476, + Instance: "host/vim/vimuser", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 482, + Instance: "host/system/helper", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 155, + Instance: "", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/slp", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 480, + Instance: "host/system/helper", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 500, + Instance: "host/user", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 479, + Instance: "host/system/svmotion", + }, + { + CounterId: 480, + Instance: "host/system/ft", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 500, + Instance: "host/system/kernel/root", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 485, + Instance: "host/system/helper", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 482, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 482, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 483, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 483, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 476, + Instance: "host/vim/vmci", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 476, + Instance: "host/system/ft", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 480, + Instance: "host/system/drivers", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 489, + Instance: "host/vim", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 480, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 484, + Instance: "host/system/svmotion", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 500, + Instance: "host/system/helper", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/wsman", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 497, + Instance: "host/system/vmotion", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 494, + Instance: "host/system/vmotion", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 482, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 500, + Instance: "host/vim", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 476, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 482, + Instance: "host/system/vmotion", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 479, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vsanperfsvc", + }, + { + CounterId: 500, + Instance: "host/system/ft", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 500, + Instance: "host/vim/vimuser", + }, + { + CounterId: 480, + Instance: "host/vim/vimuser", + }, + { + CounterId: 483, + Instance: "host/vim/vimuser", + }, + { + CounterId: 484, + Instance: "host/vim/vimuser", + }, + { + CounterId: 485, + Instance: "host/vim/vimuser", + }, + { + CounterId: 476, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 493, + Instance: "host/vim", + }, + { + CounterId: 483, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 484, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 499, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 500, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 499, + Instance: "host/vim", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 479, + Instance: "host/vim", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 476, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 485, + Instance: "host/iofilters", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vobd", + }, + { + CounterId: 479, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 476, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 481, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 483, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 485, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 494, + Instance: "host/vim", + }, + { + CounterId: 496, + Instance: "host/vim", + }, + { + CounterId: 497, + Instance: "host/vim", + }, + { + CounterId: 481, + Instance: "host/vim/vimuser", + }, + { + CounterId: 483, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 479, + Instance: "host/vim/vmci", + }, + { + CounterId: 480, + Instance: "host/vim/vmci", + }, + { + CounterId: 499, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 482, + Instance: "host/vim/vmci", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 483, + Instance: "host/vim/vmci", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 500, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 479, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 484, + Instance: "host/vim/vmci", + }, + { + CounterId: 482, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 485, + Instance: "host/vim/vmci", + }, + { + CounterId: 499, + Instance: "host/vim/vmci", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 476, + Instance: "host/system/kernel/root", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 500, + Instance: "host/vim/tmp", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 499, + Instance: "host/user", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 476, + Instance: "host/vim/tmp", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 479, + Instance: "host/vim/vimuser/terminal", + }, + { + CounterId: 479, + Instance: "host/vim/tmp", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/smartd", + }, + { + CounterId: 476, + Instance: "host", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 480, + Instance: "host/vim/tmp", + }, + { + CounterId: 476, + Instance: "host/system/svmotion", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 483, + Instance: "host", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 490, + Instance: "host/system/vmotion", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 481, + Instance: "host/vim/tmp", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 483, + Instance: "host/vim/tmp", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 485, + Instance: "host/vim/tmp", + }, + { + CounterId: 483, + Instance: "host/iofilters/spm", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 480, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 484, + Instance: "host/iofilters/spm", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 500, + Instance: "host/iofilters", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/dhclientrelease", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 479, + Instance: "host/system/helper", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 500, + Instance: "host/system", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 479, + Instance: "host/iofilters", + }, + { + CounterId: 480, + Instance: "host/iofilters", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 482, + Instance: "host/iofilters", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 484, + Instance: "host/iofilters", + }, + { + CounterId: 476, + Instance: "host/system/helper", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 499, + Instance: "host/system/drivers", + }, + { + CounterId: 500, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 482, + Instance: "host/system", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/awk", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 484, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/dhclient", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 484, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 479, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 483, + Instance: "host/system/kernel/tmp", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/head", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/vpxa", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 480, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 481, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 482, + Instance: "host/system/ft", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor", + }, + { + CounterId: 482, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/usbArbitrator", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/ls", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/pgrep", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 483, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 500, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 485, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/probe", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 481, + Instance: "host/system/kernel", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 482, + Instance: "host/vim/tmp", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 483, + Instance: "host/vim/vimuser/terminal/ssh", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/vmkbacktrace", + }, + { + CounterId: 499, + Instance: "host/iofilters/iofiltervpd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/hostdCgiServer", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/hbrca", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/init", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 480, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/uwdaemons", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 500, + Instance: "host/system/drivers", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/lacpd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 499, + Instance: "host/system/kernel/opt", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vmkiscsid", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/upitd", + }, + { + CounterId: 481, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 479, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/lbt", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 482, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/aam", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/vsish", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 484, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/likewise", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/snmpd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 482, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe/stats", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/logging", + }, + { + CounterId: 484, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 480, + Instance: "host/system/kernel/root", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 485, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 484, + Instance: "host/vim/vimuser/terminal/shell", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 479, + Instance: "host/system/ft", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/netcpa", + }, + { + CounterId: 499, + Instance: "host/iofilters/vmwarevmcrypt", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/sh", + }, + { + CounterId: 479, + Instance: "host", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 476, + Instance: "host/system/kernel/etc", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/vmkdevmgr", + }, + { + CounterId: 500, + Instance: "host/iofilters/spm", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 476, + Instance: "host/iofilters/spm", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/dcui", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/upittraced", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 480, + Instance: "host/iofilters/spm", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/nfsgssd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/hostd-probe", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 499, + Instance: "host/iofilters/spm", + }, + { + CounterId: 500, + Instance: "host/system/kernel/iofilters", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/sioc", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/nscd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/net-daemons", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 476, + Instance: "host/user", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/boot", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/ntpd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/memScrubber", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/vvold", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/vmkeventd", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/pcscd", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 481, + Instance: "host/user", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 480, + Instance: "host/system", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/nfcd", + }, + { + CounterId: 484, + Instance: "host/vim/vmvisor/plugins", + }, + { + CounterId: 482, + Instance: "host/user", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/sensord", + }, + { + CounterId: 500, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 484, + Instance: "host/user", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/vvoltraced", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/swapobjd", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/sfcb", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/osfsd", + }, + { + CounterId: 485, + Instance: "host/user", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 480, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 476, + Instance: "host/vim/vmvisor/hostd-probe/stats/logger", + }, + { + CounterId: 481, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 499, + Instance: "host/vim/vimuser", + }, + { + CounterId: 482, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 479, + Instance: "host/vim/vmvisor/rabbitmqproxy", + }, + { + CounterId: 483, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 485, + Instance: "host/vim/vmvisor/sfcb_aux", + }, + { + CounterId: 499, + Instance: "host/vim/vmvisor/vmfstraced", + }, + { + CounterId: 541, + Instance: "vfc", + }, +} + +// ************************************** Cluster Metrics ************************************** +var ClusterMetrics = []types.PerfMetricId{ + { + CounterId: 22, + Instance: "", + }, + { + CounterId: 2, + Instance: "", + }, + { + CounterId: 9, + Instance: "", + }, + { + CounterId: 7, + Instance: "", + }, + { + CounterId: 8, + Instance: "", + }, + { + CounterId: 3, + Instance: "", + }, + { + CounterId: 4, + Instance: "", + }, + { + CounterId: 15, + Instance: "", + }, + { + CounterId: 17, + Instance: "", + }, + { + CounterId: 18, + Instance: "", + }, + { + CounterId: 19, + Instance: "", + }, + { + CounterId: 20, + Instance: "", + }, + { + CounterId: 21, + Instance: "", + }, + { + CounterId: 6, + Instance: "", + }, + { + CounterId: 139, + Instance: "", + }, + { + CounterId: 138, + Instance: "", + }, + { + CounterId: 107, + Instance: "", + }, + { + CounterId: 29, + Instance: "", + }, + { + CounterId: 33, + Instance: "", + }, + { + CounterId: 37, + Instance: "", + }, + { + CounterId: 41, + Instance: "", + }, + { + CounterId: 49, + Instance: "", + }, + { + CounterId: 90, + Instance: "", + }, + { + CounterId: 105, + Instance: "", + }, + { + CounterId: 106, + Instance: "", + }, + { + CounterId: 27, + Instance: "", + }, + { + CounterId: 108, + Instance: "", + }, + { + CounterId: 110, + Instance: "", + }, + { + CounterId: 111, + Instance: "", + }, + { + CounterId: 109, + Instance: "", + }, + { + CounterId: 112, + Instance: "", + }, + { + CounterId: 25, + Instance: "", + }, + { + CounterId: 103, + Instance: "", + }, + { + CounterId: 99, + Instance: "", + }, + { + CounterId: 30, + Instance: "", + }, + { + CounterId: 34, + Instance: "", + }, + { + CounterId: 38, + Instance: "", + }, + { + CounterId: 42, + Instance: "", + }, + { + CounterId: 50, + Instance: "", + }, + { + CounterId: 98, + Instance: "", + }, + { + CounterId: 26, + Instance: "", + }, + { + CounterId: 104, + Instance: "", + }, + { + CounterId: 100, + Instance: "", + }, + { + CounterId: 31, + Instance: "", + }, + { + CounterId: 102, + Instance: "", + }, + { + CounterId: 39, + Instance: "", + }, + { + CounterId: 43, + Instance: "", + }, + { + CounterId: 51, + Instance: "", + }, + { + CounterId: 92, + Instance: "", + }, + { + CounterId: 24, + Instance: "", + }, + { + CounterId: 35, + Instance: "", + }, + { + CounterId: 91, + Instance: "", + }, + { + CounterId: 153, + Instance: "", + }, + { + CounterId: 152, + Instance: "", + }, + { + CounterId: 151, + Instance: "", + }, + { + CounterId: 150, + Instance: "", + }, + { + CounterId: 157, + Instance: "", + }, + { + CounterId: 158, + Instance: "", + }, + { + CounterId: 159, + Instance: "", + }, + { + CounterId: 262, + Instance: "", + }, + { + CounterId: 257, + Instance: "", + }, + { + CounterId: 258, + Instance: "", + }, + { + CounterId: 259, + Instance: "", + }, + { + CounterId: 260, + Instance: "", + }, + { + CounterId: 261, + Instance: "", + }, + { + CounterId: 256, + Instance: "", + }, + { + CounterId: 263, + Instance: "", + }, + { + CounterId: 264, + Instance: "", + }, + { + CounterId: 265, + Instance: "", + }, + { + CounterId: 266, + Instance: "", + }, + { + CounterId: 267, + Instance: "", + }, + { + CounterId: 268, + Instance: "", + }, + { + CounterId: 269, + Instance: "", + }, + { + CounterId: 270, + Instance: "", + }, + { + CounterId: 271, + Instance: "", + }, + { + CounterId: 272, + Instance: "", + }, + { + CounterId: 273, + Instance: "", + }, + { + CounterId: 274, + Instance: "", + }, + { + CounterId: 275, + Instance: "", + }, +} + +// *************************************** Datastore metrics **************************************** +var DatastoreMetrics = []types.PerfMetricId{ + { + CounterId: 178, + Instance: "", + }, + { + CounterId: 188, + Instance: "", + }, + { + CounterId: 187, + Instance: "", + }, + { + CounterId: 181, + Instance: "", + }, + { + CounterId: 180, + Instance: "", + }, + { + CounterId: 179, + Instance: "", + }, + { + CounterId: 281, + Instance: "", + }, + { + CounterId: 281, + Instance: "$file", + }, + + { + CounterId: 282, + Instance: "", + }, + { + CounterId: 282, + Instance: "$file", + }, + { + CounterId: 283, + Instance: "", + }, + { + CounterId: 284, + Instance: "", + }, + { + CounterId: 284, + Instance: "$file", + }, + + { + CounterId: 288, + Instance: "", + }, + { + CounterId: 286, + Instance: "", + }, + { + CounterId: 287, + Instance: "", + }, + { + CounterId: 287, + Instance: "$file", + }, +} + +// ********************************************* Resource pool metrics *********************************** +var ResourcePoolMetrics = []types.PerfMetricId{ + { + CounterId: 6, + Instance: "", + }, + { + CounterId: 213, + Instance: "", + }, + { + CounterId: 7, + Instance: "", + }, + { + CounterId: 8, + Instance: "", + }, + { + CounterId: 16, + Instance: "", + }, + { + CounterId: 17, + Instance: "", + }, + { + CounterId: 18, + Instance: "", + }, + { + CounterId: 19, + Instance: "", + }, + { + CounterId: 20, + Instance: "", + }, + { + CounterId: 22, + Instance: "", + }, + { + CounterId: 138, + Instance: "", + }, + { + CounterId: 139, + Instance: "", + }, + { + CounterId: 112, + Instance: "", + }, + { + CounterId: 102, + Instance: "", + }, + { + CounterId: 98, + Instance: "", + }, + { + CounterId: 29, + Instance: "", + }, + { + CounterId: 33, + Instance: "", + }, + { + CounterId: 37, + Instance: "", + }, + { + CounterId: 41, + Instance: "", + }, + { + CounterId: 70, + Instance: "", + }, + { + CounterId: 90, + Instance: "", + }, + { + CounterId: 108, + Instance: "", + }, + { + CounterId: 109, + Instance: "", + }, + { + CounterId: 111, + Instance: "", + }, + { + CounterId: 214, + Instance: "", + }, + { + CounterId: 105, + Instance: "", + }, + { + CounterId: 106, + Instance: "", + }, + { + CounterId: 107, + Instance: "", + }, + { + CounterId: 103, + Instance: "", + }, + { + CounterId: 99, + Instance: "", + }, + { + CounterId: 30, + Instance: "", + }, + { + CounterId: 34, + Instance: "", + }, + { + CounterId: 38, + Instance: "", + }, + { + CounterId: 42, + Instance: "", + }, + { + CounterId: 71, + Instance: "", + }, + { + CounterId: 92, + Instance: "", + }, + { + CounterId: 104, + Instance: "", + }, + { + CounterId: 100, + Instance: "", + }, + { + CounterId: 31, + Instance: "", + }, + { + CounterId: 35, + Instance: "", + }, + { + CounterId: 39, + Instance: "", + }, + { + CounterId: 43, + Instance: "", + }, + { + CounterId: 72, + Instance: "", + }, + { + CounterId: 91, + Instance: "", + }, + { + CounterId: 152, + Instance: "", + }, + { + CounterId: 153, + Instance: "", + }, + { + CounterId: 157, + Instance: "", + }, + { + CounterId: 159, + Instance: "", + }, +} + +// ********************************************* Datacenter metrics *********************************** +var DatacenterMetrics = []types.PerfMetricId{ + { + CounterId: 256, + Instance: "", + }, + { + CounterId: 257, + Instance: "", + }, + { + CounterId: 258, + Instance: "", + }, + { + CounterId: 259, + Instance: "", + }, + { + CounterId: 260, + Instance: "", + }, + { + CounterId: 261, + Instance: "", + }, + { + CounterId: 262, + Instance: "", + }, + { + CounterId: 263, + Instance: "", + }, + { + CounterId: 264, + Instance: "", + }, + { + CounterId: 265, + Instance: "", + }, + { + CounterId: 266, + Instance: "", + }, + { + CounterId: 267, + Instance: "", + }, + { + CounterId: 268, + Instance: "", + }, + { + CounterId: 269, + Instance: "", + }, + { + CounterId: 270, + Instance: "", + }, + { + CounterId: 271, + Instance: "", + }, + { + CounterId: 272, + Instance: "", + }, + { + CounterId: 273, + Instance: "", + }, + { + CounterId: 274, + Instance: "", + }, + { + CounterId: 275, + Instance: "", + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager_data.go b/vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager_data.go new file mode 100644 index 0000000000..8fc34960ff --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/performance_manager_data.go @@ -0,0 +1,1873 @@ +/* +Copyright (c) 2018-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package vpx + +var MetricData = map[string]map[int32][]int64{ + "VirtualMachine": VmMetricData, + "HostSystem": HostMetricData, + "ResourcePool": ResourcePoolMetricData, + "ClusterComputeResource": ClusterMetricData, + "Datastore": DatastoreMetricData, + "Datacenter": DatacenterMetricData, +} + +var VmMetricData = map[int32][]int64{ + 130: []int64{42, 57, 9, 13, 14, 25, 8, 16, 6, 13, 67, 34, 292, 89, 27, 75, 98, 59, 49, 85, 127, 116, 179, 196, 161, 170, 174, 35, 26, 20, + 25, 42, 10, 45, 24, 64, 9, 21, 6, 18, 19, 9, 16, 18, 5, 124, 97, 25, 18, 20, 28, 28, 22, 11, 12, 139, 155, 149, 179, 173, + 135, 73, 73, 67, 49, 37, 12, 28, 18, 36, 59, 18, 21, 17, 27, 137, 140, 118, 137, 265, 246, 250, 114, 43, 26, 17, 7, 36, 89, 15, + 45, 47, 49, 13, 47, 34, 52, 16, 7, 25}, + 155: []int64{2948499, 2948519, 2948539, 2948559, 2948579, 2948599, 2948619, 2948639, 2948659, 2948679, 2948699, 2948719, 2948739, 2948759, 2948779, 2948799, 2948819, 2948839, 2948859, 2948879, 2948899, 2948919, 2948939, 2948959, 2948979, 2948999, 2949019, 2949039, 2949059, 2949079, + 2949099, 2949119, 2949139, 2949159, 2949179, 2949199, 2949219, 2949239, 2949259, 2949279, 2949299, 2949319, 2949339, 2949359, 2949379, 2949399, 2949419, 2949439, 2949459, 2949479, 2949499, 2949519, 2949539, 2949559, 2949579, 2949599, 2949619, 2949639, 2949659, 2949679, + 2949699, 2949719, 2949739, 2949759, 2949779, 2949799, 2949819, 2949839, 2949859, 2949879, 2949899, 2949919, 2949939, 2949959, 2949979, 2949999, 2950019, 2950039, 2950059, 2950079, 2950099, 2950119, 2950139, 2950159, 2950179, 2950199, 2950219, 2950239, 2950259, 2950279, + 2950299, 2950319, 2950339, 2950359, 2950379, 2950399, 2950419, 2950439, 2950459, 2950479}, + 173: []int64{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 180, 12, 4, 1, 12, 8, 0, 6, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 0, 1, 0, 17, 1, 1, 0, 2, 0, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 15, 0, 0, 6, 0, + 3, 0, 0, 6, 6, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 7, 4, 6, 5, 86, 63, 80, 2, 0, 2, 0, 0, 0, 17, 0, + 0, 1, 0, 0, 4, 1, 0, 0, 1, 0}, + 399: []int64{4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 2, 12, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 0, 2, 0, 0, 0, 0, 0, 1, 0, 3}, + 504: []int64{2000, 2200, 2200, 2200, 2200, 1700, 1700, 1700, 1700, 1700, 2300, 2300, 2300, 2300, 2300, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2000, 2000, 2000, 2000, 2000, + 1900, 1900, 1900, 1700, 1700, 1700, 1700, 1500, 1500, 1500, 1600, 1600, 1600, 1600, 1600, 2100, 4700, 4700, 4700, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, + 2000, 1600, 1600, 1600, 1600, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1900, 2600, 3900, 3900, 4200, 4300, 5100, 5500, 5500, 5500, 5500, 5500, 5500, 5500, 5500, 5500, + 5200, 5200, 5200, 5200, 4300, 3700, 2300, 2200, 2300, 2300}, + 174: []int64{368, 141, 143, 106, 119, 157, 88, 127, 137, 106, 211, 225, 202, 226, 234, 920, 268, 181, 204, 241, 219, 168, 221, 234, 184, 185, 236, 195, 168, 222, + 185, 189, 134, 130, 160, 122, 84, 113, 153, 95, 110, 141, 91, 108, 130, 3372, 1942, 151, 102, 158, 162, 100, 143, 122, 109, 211, 229, 173, 187, 237, + 200, 205, 241, 184, 204, 217, 182, 195, 219, 213, 211, 214, 189, 182, 245, 2671, 612, 1055, 595, 644, 747, 611, 336, 244, 118, 113, 128, 93, 94, 130, + 359, 131, 151, 94, 137, 149, 106, 109, 127, 124}, + 70: []int64{91, 585, 246, 114, 553, 348, 824, 848, 827, 882, 632, 500, 647, 805, 425, 971, 789, 1001, 910, 1013, 338, 713, 496, 168, 201, 886, 124, 968, 768, 736, + 612, 859, 973, 64, 312, 449, 38, 839, 807, 571, 83, 862, 1015, 333, 818, 173, 396, 520, 171, 678, 160, 203, 991, 549, 776, 524, 390, 228, 576, 307, + 1005, 93, 893, 475, 451, 141, 98, 439, 95, 104, 739, 630, 275, 701, 722, 16, 207, 468, 310, 387, 217, 377, 684, 969, 396, 1010, 866, 914, 181, 621, 995, + 831, 278, 530, 465, 745, 704, 762, 545, 544}, + 473: []int64{30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 27, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, + 133: []int64{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, + 1, 0, 0, 1, 1, 1, 1, 1, 1, 0}, + 348: []int64{1100, 1200, 1200, 1000, 1200, 1200, 1300, 900, 900, 900, 1800, 1800, 1900, 1200, 1200, 1200, 1200, 1300, 1200, 1400, 1500, 1400, 1200, 1000, 1100, 1200, 1200, 1000, 900, 800, + 900, 1000, 1000, 1100, 1300, 1400, 1300, 900, 900, 900, 1100, 1100, 1000, 800, 900, 2500, 4000, 4300, 2600, 1400, 1300, 1300, 1000, 800, 900, 1100, 1100, 1000, 900, 900, + 1000, 900, 1100, 1000, 1300, 1300, 1300, 1000, 900, 900, 1200, 1200, 1100, 800, 1000, 2200, 3200, 4400, 4100, 4500, 4900, 5000, 4200, 2600, 1500, 1100, 1200, 1100, 900, 800, + 1000, 1200, 1200, 1000, 1200, 1400, 1400, 1100, 1000, 1100}, + 422: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 146: []int64{1914, 1692, 2171, 2999, 2254, 2014, 1687, 1823, 2251, 3286, 1916, 1903, 4747, 1782, 2203, 2301, 1853, 4708, 5656, 2070, 5121, 1839, 1987, 4985, 3396, 1857, 2212, 1822, 1689, 1917, + 1831, 1862, 2163, 3297, 1996, 2070, 1871, 1868, 2199, 3065, 1718, 2055, 1825, 1692, 2169, 2685, 1867, 1917, 3203, 2016, 2132, 1713, 1881, 1989, 3266, 1886, 2182, 1748, 1819, 2060, + 1752, 1931, 2123, 2909, 2026, 2015, 1681, 1792, 2184, 3277, 1639, 2075, 1690, 1740, 5110, 7545, 7854, 9835, 10912, 10197, 10426, 12296, 3728, 2135, 3253, 1784, 5195, 1824, 1578, 1959, + 1772, 1917, 2176, 3091, 2022, 4991, 1829, 4629, 5412, 3269}, + 463: []int64{277, 274, 338, 383, 297, 274, 275, 274, 339, 541, 288, 259, 752, 276, 338, 276, 274, 729, 838, 292, 838, 275, 275, 748, 542, 274, 338, 274, 274, 277, + 277, 275, 337, 392, 291, 276, 274, 274, 337, 541, 274, 278, 274, 276, 338, 279, 274, 274, 390, 293, 338, 274, 275, 276, 543, 274, 339, 274, 277, 274, + 275, 275, 337, 391, 289, 277, 275, 275, 339, 541, 274, 274, 274, 275, 810, 520, 535, 592, 668, 562, 605, 575, 329, 276, 542, 274, 828, 274, 274, 276, + 276, 278, 339, 390, 289, 753, 277, 747, 812, 541}, + 472: []int64{281, 281, 347, 392, 304, 280, 282, 280, 347, 555, 295, 265, 770, 282, 347, 283, 280, 749, 861, 299, 861, 282, 281, 767, 556, 280, 347, 280, 280, 283, + 283, 282, 345, 401, 298, 282, 280, 281, 346, 556, 280, 284, 280, 282, 347, 285, 280, 281, 399, 300, 347, 280, 282, 282, 557, 280, 347, 280, 283, 281, + 281, 281, 346, 401, 295, 283, 281, 281, 347, 555, 280, 281, 280, 281, 832, 530, 546, 603, 681, 572, 617, 585, 336, 283, 556, 280, 850, 280, 280, 282, + 281, 284, 347, 400, 296, 772, 283, 767, 834, 555}, + 147: []int64{842, 813, 1012, 1671, 1013, 717, 821, 706, 1005, 1804, 868, 782, 2000, 755, 986, 947, 691, 1958, 2756, 967, 2241, 708, 755, 1939, 1716, 706, 1047, 715, 711, 825, + 838, 722, 904, 1800, 882, 800, 661, 805, 1098, 1685, 676, 913, 774, 738, 960, 1241, 755, 804, 1738, 985, 983, 729, 703, 745, 1630, 721, 1148, 769, 825, 807, + 741, 793, 1035, 1636, 1005, 809, 720, 756, 1076, 1737, 677, 824, 663, 714, 2056, 5216, 5689, 7065, 7549, 7205, 7517, 8701, 2154, 855, 1724, 772, 2254, 749, 705, 754, + 758, 878, 1049, 1683, 896, 2047, 729, 1907, 2105, 1704}, + 2: []int64{776, 604, 442, 846, 463, 524, 454, 410, 439, 607, 1540, 404, 759, 477, 484, 646, 683, 537, 1027, 473, 746, 429, 538, 527, 632, 603, 449, 441, 386, 405, + 492, 579, 430, 928, 648, 550, 447, 408, 444, 540, 666, 390, 427, 417, 435, 3590, 2309, 394, 751, 571, 621, 398, 413, 392, 567, 652, 437, 402, 509, 403, + 534, 604, 440, 825, 471, 569, 435, 430, 442, 563, 770, 400, 444, 418, 563, 2381, 1941, 1925, 2335, 2025, 2530, 2252, 868, 443, 594, 571, 602, 417, 388, 411, + 727, 600, 471, 825, 546, 713, 431, 522, 587, 544}, + 148: []int64{218, 203, 246, 299, 225, 245, 202, 203, 246, 416, 205, 243, 220, 203, 246, 337, 203, 256, 315, 219, 264, 203, 203, 259, 416, 203, 246, 203, 202, 245, + 203, 203, 245, 308, 215, 245, 203, 203, 246, 415, 203, 245, 203, 203, 245, 427, 203, 244, 308, 216, 245, 202, 203, 245, 416, 203, 246, 202, 203, 245, + 203, 203, 245, 306, 217, 245, 202, 203, 246, 416, 202, 245, 202, 203, 259, 510, 462, 659, 772, 808, 928, 1177, 384, 260, 416, 203, 260, 203, 202, 245, + 218, 203, 245, 306, 217, 259, 203, 216, 260, 416}, + 402: []int64{3278, 2525, 1849, 3540, 1919, 2330, 1902, 1734, 1847, 2544, 6355, 1703, 3167, 1986, 2096, 2826, 2870, 2240, 4305, 2010, 3145, 1824, 2268, 2234, 2706, 2527, 1901, 1834, 1653, 1723, + 2097, 2407, 1811, 3960, 2643, 2540, 1859, 1735, 1892, 2288, 2747, 1635, 1845, 1759, 1798, 14863, 9491, 1680, 3272, 2287, 2612, 1686, 1750, 1643, 2387, 2719, 1845, 1689, 2202, 1687, + 2255, 2533, 1818, 3440, 1994, 2365, 1850, 1806, 1843, 2352, 3217, 1682, 1859, 1788, 2376, 10120, 8065, 7951, 9802, 8339, 10497, 9331, 3611, 1890, 2510, 2444, 2522, 1734, 1667, 1707, + 3036, 2513, 1987, 3455, 2276, 2964, 1814, 2178, 2413, 2269}, + 503: []int64{1200, 1200, 1200, 1200, 1200, 1100, 1100, 1100, 1100, 1100, 1200, 1200, 1200, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1400, 1400, 1200, 1200, 1200, 1200, 1200, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1000, 1100, 1400, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, + 1400, 1100, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1100, 1100, 1100, 1000, 1100, 1300, 1500, 1700, 1900, 2100, 2500, 2700, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, + 2600, 2400, 2100, 1900, 1700, 1400, 1200, 1100, 1100, 1100}, + 421: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 184: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 466: []int64{20, 20, 23, 22, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 21, 20, 21, 20, 20, 20, 21, 20, 20, 20, 20, 20, 21, 20, 20, + 20, 20, 20, 25, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 21, 21, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 21, 20, + 20, 20, 20, 24, 20, 21, 20, 20, 20, 20, 20, 21, 20, 21, 20, 20, 20, 21, 20, 20, 20, 20, 20, 23, 20, 20, 20, 20, 20, 20, + 21, 20, 20, 20, 20, 20, 21, 20, 20, 20}, + 410: []int64{976, 899, 657, 904, 171, 606, 607, 707, 823, 331, 255, 421, 230, 1001, + 937, 467, 738, 287, 904, 962, 518, 391, 593, 593, 59, 874, 364, 873, 728, 727, 533, + 328, 957, 637, 973, 1014, 259, 160, 698, 589, 933, 283, 385, 393, 129, 414, 16, 800, + 105, 150, 905, 278, 131, 115, 678, 738, 444, 411, 388, 402, 541, 428, 970, 260, 56, + 794, 975, 480, 644, 110, 702, 93, 240, 322, 651, 370, 261, 589, 72, 259, 405, 965, + 927, 519, 210, 291, 688, 758, 942, 301, 253, 605, 677, 995, 509, 478, 646, 3, 472, 1007, + }, + 505: []int64{1100, 1100, 1100, 1100, 1100, 1000, 1000, 1000, 1000, 1000, 1100, 1100, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1300, 1300, 1300, 1100, 1200, 1100, 1100, 1100, + 1100, 1100, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1300, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + 1300, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1200, 1400, 1600, 1800, 2000, 2300, 2500, 2600, 2600, 2600, 2600, 2600, 2600, 2600, 2600, + 2400, 2200, 2000, 1800, 1600, 1400, 1100, 1100, 1100, 1100}, + 149: []int64{277, 274, 338, 383, 297, 274, 275, 274, 339, 541, 288, 259, 752, 276, 338, 276, 274, 729, 838, 292, 838, 275, 275, 748, 542, 274, 338, 274, 274, 277, + 277, 275, 337, 392, 291, 276, 274, 274, 337, 541, 274, 278, 274, 276, 338, 279, 274, 274, 390, 293, 338, 274, 275, 276, 543, 274, 339, 274, 277, 274, + 275, 275, 337, 391, 289, 277, 275, 275, 339, 541, 274, 274, 274, 275, 810, 520, 535, 592, 668, 562, 605, 575, 329, 276, 542, 274, 828, 274, 274, 276, + 276, 278, 339, 390, 289, 753, 277, 747, 812, 541}, + 509: []int64{2200, 2200, 2200, 2200, 4000, 4000, 4000, 1300, 1200, 1900, 5400, 5400, 5400, 2200, 2200, 2000, 2200, 2200, 2200, 4100, 4100, 4100, 1700, 1900, 1900, 1900, 1800, 1400, 1200, 1200, + 1300, 2000, 2000, 2000, 4600, 4600, 4600, 1500, 1500, 1600, 2400, 2400, 2400, 1300, 1400, 10500, 10900, 10900, 10900, 3900, 3900, 3900, 1500, 1300, 1700, 2000, 2000, 2000, 1500, 1500, + 1500, 1500, 2500, 2500, 3700, 3700, 3700, 1600, 1400, 1700, 2400, 2400, 2400, 1500, 2200, 6600, 6600, 6600, 4700, 7400, 7400, 7400, 6800, 5100, 4800, 1900, 2300, 2300, 2300, 1400, + 2200, 2200, 2200, 2000, 3700, 3700, 3700, 3300, 2200, 2200}, + 143: []int64{496, 477, 584, 682, 522, 519, 478, 477, 585, 958, 494, 503, 972, 480, 585, 614, 477, 985, 1153, 511, 1103, 479, 479, 1007, 959, 478, 585, 477, 477, 522, + 480, 479, 583, 701, 507, 521, 477, 478, 583, 957, 477, 523, 477, 479, 584, 706, 478, 519, 698, 510, 584, 476, 479, 521, 959, 478, 585, 477, 480, 520, + 478, 479, 583, 698, 506, 522, 478, 478, 585, 957, 477, 520, 476, 478, 1070, 1030, 998, 1251, 1441, 1371, 1534, 1752, 714, 537, 958, 477, 1088, 477, 477, 521, + 495, 482, 585, 697, 507, 1012, 480, 964, 1073, 957}, + 471: []int64{198, 197, 239, 287, 218, 239, 197, 197, 240, 398, 200, 239, 213, 197, 240, 322, 198, 248, 301, 213, 250, 197, 198, 249, 398, 198, 240, 197, 197, 238, + 198, 198, 239, 301, 204, 239, 198, 198, 240, 397, 197, 239, 197, 197, 239, 421, 198, 238, 300, 205, 239, 197, 198, 239, 398, 198, 240, 197, 197, 239, + 198, 198, 239, 293, 211, 239, 197, 197, 240, 397, 197, 239, 197, 197, 250, 491, 456, 651, 758, 800, 921, 1171, 379, 254, 398, 197, 250, 197, 197, 239, + 197, 198, 239, 293, 211, 249, 197, 207, 251, 397}, + 511: []int64{1900, 2000, 1900, 1900, 1900, 1700, 1700, 1700, 1700, 1700, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 1900, 1900, 1900, 1900, 1900, + 1800, 1800, 1800, 1700, 1700, 1700, 1700, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 2000, 4600, 4600, 4600, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, + 2000, 1500, 1500, 1500, 1500, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1700, 2500, 3700, 3900, 3900, 4100, 4700, 5100, 5100, 5100, 5100, 5100, 5100, 5100, 5100, 5100, + 4800, 4800, 4800, 4800, 4000, 3700, 2200, 2000, 2200, 2200}, + 467: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 37: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 508: []int64{1200, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1200, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1200, 1200, 1200, 1200, 1200, + 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1300, 1300, 1400, 1500, 1500, 1600, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, + 1600, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500}, + 90: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 404: []int64{34, 25, 29, 30, 28, 26, 24, 24, 25, 31, 27, 27, 27, 26, 26, 30, 30, 29, 37, 34, 35, 27, 27, 38, 32, 22, 26, 29, 25, 27, + 31, 22, 23, 29, 24, 27, 24, 25, 29, 30, 24, 24, 27, 23, 24, 26, 26, 26, 26, 24, 27, 26, 24, 24, 26, 27, 23, 22, 23, 25, + 32, 25, 25, 31, 27, 28, 24, 22, 26, 26, 24, 25, 28, 24, 28, 64, 46, 45, 64, 67, 58, 48, 30, 26, 30, 28, 28, 29, 26, 29, + 34, 26, 28, 31, 25, 25, 25, 31, 25, 30}, + 460: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 398: []int64{270, 288, 299, 243, 285, 298, 304, 229, 216, 228, 420, 415, 442, 276, 290, 278, 298, 307, 297, 331, 364, 338, 279, 242, 269, 289, 277, 252, 212, 203, + 212, 241, 245, 259, 320, 339, 321, 226, 215, 225, 271, 262, 253, 205, 209, 586, 942, 999, 618, 340, 311, 310, 232, 196, 212, 260, 266, 249, 221, 215, + 235, 219, 256, 236, 309, 300, 306, 232, 214, 227, 292, 283, 270, 205, 234, 525, 750, 1023, 949, 1051, 1130, 1168, 975, 599, 363, 266, 293, 269, 229, 196, + 247, 283, 294, 238, 295, 333, 341, 270, 251, 259}, + 403: []int64{54000, 57600, 59800, 48600, 57000, 59600, 60800, 45800, 43200, 45600, 84000, 83000, 88400, 55200, 58000, 55600, 59600, 61400, 59400, 66200, 72800, 67600, 55800, 48400, 53800, 57800, 55400, 50400, 42400, 40600, + 42400, 48200, 49000, 51800, 64000, 67800, 64200, 45200, 43000, 45000, 54200, 52400, 50600, 41000, 41800, 117200, 188400, 199800, 123600, 68000, 62200, 62000, 46400, 39200, 42400, 52000, 53200, 49800, 44200, 43000, + 47000, 43800, 51200, 47200, 61800, 60000, 61200, 46400, 42800, 45400, 58400, 56600, 54000, 41000, 46800, 105000, 150000, 204600, 189800, 210200, 226000, 233600, 195000, 119800, 72600, 53200, 58600, 53800, 45800, 39200, + 49400, 56600, 58800, 47600, 59000, 66600, 68200, 54000, 50200, 51800}, + 397: []int64{50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50}, + 41: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 94: []int64{341, 881, 851, 214, 263, 802, 777, 58, 661, 231, 255, 494, 192, 302, 90, 371, 709, 164, 58, 1, 511, 711, 1005, 556, 457, 869, 708, 994, 668, 826, 112, 633, 901, 345, 317, 199, 199, 168, 981, 665, 29, 436, 225, 426, 309, 333, 757, 696, 840, 210, 500, 343, 651, 717, 803, 869, 445, 907, 928, 268, 437, 583, 160, 478, 891, 471, 72, 448, 457, 499, 348, 527, 409, 731, 849, 572, 378, 33, 254, 414, 781, 322, 153, 755, 301, 583, 823, 55, 637, 233, 259, 6, 448, 217, 842, 921, 971, 419, 246, 289}, + 400: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 501: []int64{2300, 2300, 2300, 2300, 4000, 4000, 4000, 1400, 1400, 2100, 5500, 5500, 5500, 2200, 2200, 2000, 2300, 2300, 2300, 4200, 4200, 4200, 1700, 2100, 2100, 2100, 1900, 1500, 1300, 1400, + 1400, 2100, 2100, 2100, 4700, 4700, 4700, 1500, 1600, 1900, 2500, 2500, 2500, 1400, 1600, 11000, 11200, 11200, 11200, 3900, 3900, 3900, 1500, 1400, 1800, 2000, 2000, 2000, 1600, 1600, + 1600, 1500, 2600, 2600, 3700, 3700, 3700, 1700, 1500, 1900, 2500, 2500, 2500, 1600, 2400, 7700, 7700, 7700, 5100, 8000, 8000, 8000, 7200, 5500, 5200, 2200, 2400, 2400, 2400, 1600, + 2300, 2300, 2300, 2100, 3700, 3700, 3700, 3400, 2400, 2400}, + 498: []int64{2856065, 2856065, 2856095, 2856125, 2856125, 2856155, 2856185, 2856185, 2856215, 2856245, 2856245, 2856275, 2856305, 2856305, 2856335, 2856365, 2856365, 2856395, 2856425, 2856425, 2856455, 2856485, 2856485, 2856515, 2856545, 2856545, 2856575, 2856605, 2856605, 2856635, + 2856665, 2856665, 2856695, 2856725, 2856725, 2856755, 2856785, 2856785, 2856815, 2856845, 2856845, 2856875, 2856905, 2856905, 2856935, 2856965, 2856965, 2856995, 2857025, 2857025, 2857055, 2857085, 2857085, 2857115, 2857145, 2857145, 2857175, 2857205, 2857205, 2857235, + 2857265, 2857265, 2857295, 2857325, 2857325, 2857355, 2857385, 2857385, 2857415, 2857445, 2857445, 2857475, 2857505, 2857505, 2857535, 2857565, 2857565, 2857595, 2857625, 2857625, 2857655, 2857685, 2857685, 2857715, 2857745, 2857745, 2857775, 2857805, 2857805, 2857835, + 2857865, 2857865, 2857895, 2857925, 2857925, 2857955, 2857985, 2857985, 2858015, 2858045}, + 506: []int64{1300, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1300, 1300, 1300, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, + 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1300, 1300, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1300, 1300, 1300, 1300, 1300, + 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1400, 1400, 1500, 1500, 1600, 1700, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, + 1700, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1700, 1700}, + 510: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 514: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 159: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 86: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 6: []int64{357, 278, 204, 390, 213, 241, 209, 189, 202, 280, 709, 186, 349, 219, 223, 297, 314, 247, 473, 218, 343, 197, 248, 242, 291, 278, 206, 203, 178, 187, + 227, 266, 198, 427, 298, 253, 206, 188, 204, 248, 306, 179, 196, 192, 200, 1654, 1064, 181, 346, 263, 286, 183, 190, 180, 261, 300, 201, 185, 234, 185, + 246, 278, 202, 380, 217, 262, 200, 198, 204, 259, 354, 184, 204, 192, 259, 1097, 894, 887, 1076, 933, 1165, 1037, 399, 204, 273, 263, 277, 192, 179, 189, + 335, 276, 217, 380, 251, 328, 198, 240, 270, 250}, + 14: []int64{3010, 2320, 1660, 3264, 1748, 1986, 1713, 1545, 1647, 2295, 6083, 1508, 2913, 1790, 1847, 2477, 2621, 2028, 3960, 1778, 2868, 1603, 2057, 1970, 2417, 2302, 1688, 1648, 1462, 1516, + 1875, 2209, 1618, 3571, 2493, 2113, 1669, 1543, 1677, 2046, 2545, 1470, 1607, 1572, 1636, 14228, 9120, 1478, 2895, 2180, 2374, 1503, 1532, 1476, 2168, 2514, 1657, 1509, 1950, 1515, + 2036, 2321, 1643, 3190, 1773, 2165, 1639, 1617, 1654, 2143, 3004, 1479, 1672, 1570, 2106, 9318, 7534, 7434, 9078, 7821, 9839, 8745, 3350, 1693, 2242, 2204, 2282, 1564, 1447, 1541, + 2802, 2299, 1776, 3180, 2082, 2728, 1623, 1965, 2218, 2059}, + 131: []int64{369, 141, 143, 106, 119, 157, 88, 127, 137, 106, 211, 225, 202, 226, 234, 920, 268, 181, 204, 241, 219, 168, 221, 234, 184, 185, 236, 195, 168, 222, + 185, 189, 134, 130, 160, 122, 84, 113, 153, 95, 110, 141, 91, 108, 130, 3373, 1951, 151, 102, 158, 162, 100, 143, 122, 109, 211, 229, 173, 187, 237, + 200, 205, 241, 184, 204, 217, 182, 195, 219, 213, 211, 214, 189, 182, 245, 2671, 615, 1057, 602, 645, 747, 611, 336, 244, 118, 113, 128, 93, 94, 130, + 359, 131, 151, 94, 137, 149, 106, 109, 127, 124}, + 401: []int64{9, 9, 7, 10, 7, 9, 7, 7, 7, 7, 13, 8, 14, 10, 9, 11, 10, 9, 14, 11, 13, 8, 11, 11, 12, 11, 10, 8, 7, 8, + 8, 8, 7, 12, 8, 9, 8, 7, 7, 8, 9, 7, 7, 8, 7, 28, 21, 8, 10, 9, 9, 7, 8, 6, 8, 12, 10, 8, 10, 10, + 10, 10, 9, 11, 9, 10, 7, 8, 8, 10, 12, 7, 8, 7, 10, 34, 35, 32, 37, 35, 44, 39, 17, 7, 9, 8, 8, 7, 8, 6, + 11, 10, 7, 11, 9, 9, 8, 8, 9, 9}, + 24: []int64{3899, 3299, 3299, 3299, 3599, 3599, 3599, 3500, 3500, 3500, 3299, 3299, 3299, 3199, 3199, 3199, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3199, 3199, 3199, 3000, 3000, + 3000, 3399, 3399, 3399, 2899, 2899, 2899, 2899, 2899, 2899, 3199, 3199, 3199, 3500, 3500, 3500, 3099, 3099, 3099, 4000, 4000, 4000, 3099, 3099, 3099, 3199, 3199, 3199, 3000, 3000, + 3000, 2899, 2899, 2899, 2899, 2899, 2899, 3199, 3199, 3199, 3000, 3000, 3000, 3199, 3199, 3199, 3699, 3699, 3699, 3099, 3099, 3099, 3199, 3199, 3199, 3399, 3399, 3399, 3099, 3099, + 3099, 3399, 3399, 3399, 3500, 3500, 3500, 3500, 3299, 3299}, + 429: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 98: []int64{10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760}, + 106: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 386: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 29: []int64{10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, + 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760, 10485760}, + 507: []int64{2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2100, 2100, 2100, 2100, 2100, 2100, 2200, 2100, 2100, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2000, 2000, 2000, 2000, 2000, + 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1800, 1800, 1900, 1900, 1900, 1900, 1900, 2400, 2600, 3800, 3900, 3900, 4000, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4200, + 4100, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000}, + 33: []int64{4089444, 3460300, 3460300, 3460300, 3774872, 3774872, 3774872, 3670016, 3670016, 3670016, 3460300, 3460300, 3460300, 3355440, 3355440, 3355440, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3145728, 3355440, 3355440, 3355440, 3145728, 3145728, + 3145728, 3565156, 3565156, 3565156, 3040868, 3040868, 3040868, 3040868, 3040868, 3040868, 3355440, 3355440, 3355440, 3670016, 3670016, 3670016, 3250584, 3250584, 3250584, 4194304, 4194304, 4194304, 3250584, 3250584, 3250584, 3355440, 3355440, 3355440, 3145728, 3145728, + 3145728, 3040868, 3040868, 3040868, 3040868, 3040868, 3040868, 3355440, 3355440, 3355440, 3145728, 3145728, 3145728, 3355440, 3355440, 3355440, 3879728, 3879728, 3879728, 3250584, 3250584, 3250584, 3355440, 3355440, 3355440, 3565156, 3565156, 3565156, 3250584, 3250584, + 3250584, 3565156, 3565156, 3565156, 3670016, 3670016, 3670016, 3670016, 3460300, 3460300}, + 102: []int64{57856, 57760, 57760, 57760, 57664, 57664, 57664, 57888, 57888, 57888, 57904, 57904, 57808, 57920, 57920, 57920, 57952, 57952, 57952, 57856, 57856, 57856, 58000, 58000, 58000, 58016, 58016, 58016, 58032, 58032, + 57936, 57952, 57952, 57952, 57872, 57872, 57872, 57984, 57984, 57984, 57888, 57888, 57888, 57904, 57904, 57904, 57808, 57808, 57808, 57824, 57936, 57936, 58048, 58048, 58048, 57872, 57872, 57872, 57888, 57888, + 57888, 57904, 57904, 57904, 57936, 57936, 57936, 57840, 57840, 57840, 57760, 57760, 57760, 57872, 57872, 57776, 57696, 57696, 57696, 57808, 57808, 57808, 57712, 57824, 57824, 57744, 57744, 57744, 57760, 57760, + 57760, 57872, 57872, 57872, 57776, 58000, 58000, 58000, 57808, 57808}, + 418: []int64{84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, + 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252, 84252}, + 428: []int64{57856, 57760, 57760, 57760, 57664, 57664, 57664, 57888, 57888, 57888, 57904, 57904, 57808, 57920, 57920, 57920, 57952, 57952, 57952, 57856, 57856, 57856, 58000, 58000, 58000, 58016, 58016, 58016, 58032, 58032, + 57936, 57952, 57952, 57952, 57872, 57872, 57872, 57984, 57984, 57984, 57888, 57888, 57888, 57904, 57904, 57904, 57808, 57808, 57808, 57824, 57936, 57936, 58048, 58048, 58048, 57872, 57872, 57872, 57888, 57888, + 57888, 57904, 57904, 57904, 57936, 57936, 57936, 57840, 57840, 57840, 57760, 57760, 57760, 57872, 57872, 57776, 57696, 57696, 57696, 57808, 57808, 57808, 57712, 57824, 57824, 57744, 57744, 57744, 57760, 57760, + 57760, 57872, 57872, 57872, 57776, 58000, 58000, 58000, 57808, 57808}, + 420: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 423: []int64{10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, + 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208, 10502208}, + 105: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 107: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 515: []int64{160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160}, + 13: []int64{36563, 37352, 38027, 36325, 37964, 37547, 37994, 38163, 38047, 37327, 33506, 38166, 36687, 37878, 37787, 37009, 36970, 37616, 35525, 37828, 36681, 38041, 37565, 37560, 37119, 37335, 37939, 38025, 38231, 38159, + 37762, 32473, 38087, 35903, 37253, 37333, 38034, 38145, 37983, 37582, 37150, 38257, 38040, 38141, 38094, 24973, 30358, 38203, 36612, 37602, 37267, 38196, 38139, 38252, 37496, 37127, 38015, 38190, 37655, 38163, + 37575, 37335, 38040, 36407, 37874, 37506, 38043, 38091, 38034, 37519, 36656, 38197, 38011, 38107, 37491, 29567, 31711, 31815, 29910, 31346, 29216, 30433, 36241, 37986, 37356, 37431, 37356, 38137, 38201, 38167, + 36801, 37359, 37886, 36408, 37599, 36921, 38071, 37686, 37479, 37595}, + 502: []int64{1100, 1100, 1200, 900, 1100, 1200, 1200, 900, 800, 900, 1700, 1600, 1700, 1000, 1100, 1100, 1200, 1200, 1200, 1300, 1400, 1300, 1100, 900, 1000, 1100, 1100, 1000, 800, 800, + 800, 900, 1000, 1000, 1300, 1400, 1300, 900, 800, 900, 1000, 1000, 1000, 800, 800, 2400, 3900, 4100, 2600, 1400, 1200, 1200, 900, 800, 800, 1000, 1100, 1000, 900, 800, + 900, 900, 1000, 900, 1200, 1200, 1200, 900, 800, 900, 1100, 1100, 1100, 800, 900, 2000, 2900, 4100, 3800, 4200, 4500, 4700, 3900, 2400, 1400, 1000, 1100, 1100, 900, 800, + 1000, 1100, 1200, 900, 1200, 1300, 1400, 1100, 1000, 1000}, + 74: []int64{961, 1016, 502, 571, 475, 122, 219, 937, 428, 657, 356, 987, 332, 469, 465, 216, 708, 984, 519, 696, 420, 994, 454, 7, 223, 559, 320, 521, 632, 18, 280, 144, 48, 994, 584, 555, 665, 944, 831, 135, 40, 851, 210, 440, 679, 569, 908, 745, 552, 125, 783, 877, 317, 895, 458, 999, 50, 288, 600, 729, 716, 441, 713, 800, 378, 440, 225, 226, 384, 588, 982, 393, 736, 817, 453, 644, 255, 92, 671, 81, 586, 1019, 286, 247, 781, 524, 765, 762, 217, 941, 595, 478, 597, 294, 648, 327, 1019, 706, 826, 813}, + 85: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 465: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 464: []int64{51, 34, 48, 60, 36, 43, 41, 36, 38, 45, 35, 40, 44, 36, 35, 50, 35, 33, 40, 37, 41, 44, 35, 41, 42, 36, 31, 43, 44, 45, + 42, 45, 46, 37, 40, 41, 46, 43, 32, 49, 42, 36, 34, 43, 29, 47, 38, 42, 41, 37, 40, 37, 43, 33, 39, 38, 49, 31, 43, 46, + 40, 39, 34, 51, 39, 51, 45, 49, 41, 36, 34, 34, 45, 42, 45, 271, 410, 524, 558, 291, 176, 92, 43, 62, 36, 46, 40, 39, 34, 40, + 39, 38, 49, 34, 41, 51, 44, 29, 47, 37}, + 396: []int64{117, 89, 89, 113, 87, 124, 84, 85, 88, 107, 113, 88, 146, 47, 101, 132, 106, 97, 139, 104, 118, 95, 95, 119, 119, 92, 91, 89, 85, 91, + 100, 84, 85, 141, 76, 152, 84, 88, 97, 103, 87, 77, 99, 82, 78, 199, 133, 90, 135, 71, 94, 85, 92, 79, 95, 92, 83, 80, 99, 81, + 101, 91, 83, 108, 95, 91, 89, 83, 87, 102, 80, 90, 89, 92, 111, 292, 202, 205, 276, 225, 253, 223, 111, 89, 111, 100, 102, 86, 95, 83, + 110, 93, 93, 114, 89, 106, 80, 99, 87, 98}, + 426: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 427: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 125: []int64{411, 198, 152, 119, 134, 183, 96, 143, 144, 119, 279, 259, 494, 316, 261, 995, 366, 240, 253, 327, 346, 285, 400, 430, 345, 356, 410, 230, 194, 243, + 211, 231, 144, 176, 185, 186, 93, 135, 160, 113, 129, 151, 107, 127, 135, 3497, 2048, 176, 121, 178, 191, 129, 165, 133, 122, 351, 385, 322, 367, 410, + 336, 279, 315, 251, 253, 255, 194, 223, 238, 249, 270, 233, 210, 200, 273, 2808, 755, 1175, 739, 910, 993, 861, 451, 287, 144, 130, 135, 130, 183, 146, + 404, 178, 200, 108, 185, 184, 159, 126, 135, 150}, + 11: []int64{36582, 37370, 38034, 36337, 37967, 37562, 38002, 38168, 38054, 37329, 33533, 38186, 36723, 37909, 37798, 37050, 37006, 37642, 35547, 37852, 36713, 38071, 37616, 37615, 37164, 37383, 37993, 38045, 38247, 38169, + 37776, 37500, 38095, 35924, 37261, 37351, 38038, 38160, 37990, 37591, 37158, 38263, 38047, 38148, 38100, 25033, 30406, 38214, 36618, 37614, 37277, 38207, 38152, 38261, 37506, 37169, 38060, 38221, 37703, 38210, + 37614, 37369, 38078, 36434, 37898, 37522, 38051, 38104, 38049, 37544, 36685, 38214, 38024, 38116, 37515, 29627, 31741, 31857, 29938, 31389, 29257, 30473, 36265, 38002, 37366, 37444, 37365, 38149, 38225, 38177, + 36823, 37378, 37901, 36420, 37620, 36931, 38085, 37698, 37484, 37604}, + 516: []int64{6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000}, + 462: []int64{218, 203, 246, 299, 225, 245, 202, 203, 246, 416, 205, 243, 220, 203, 246, 337, 203, 256, 315, 219, 264, 203, 203, 259, 416, 203, 246, 203, 202, 245, + 203, 203, 245, 308, 215, 245, 203, 203, 246, 415, 203, 245, 203, 203, 245, 427, 203, 244, 308, 216, 245, 202, 203, 245, 416, 203, 246, 202, 203, 245, + 203, 203, 245, 306, 217, 245, 202, 203, 246, 416, 202, 245, 202, 203, 259, 510, 462, 659, 772, 808, 928, 1177, 384, 260, 416, 203, 260, 203, 202, 245, + 218, 203, 245, 306, 217, 259, 203, 216, 260, 416}, + 417: []int64{2726296, 2411724, 2411724, 2411724, 2831152, 2831152, 2831152, 2726296, 2726296, 2726296, 2411724, 2411724, 2411724, 2621440, 2621440, 2621440, 2306864, 2306864, 2306864, 2306864, 2306864, 2306864, 2411724, 2411724, 2411724, 2516580, 2516580, 2516580, 2202008, 2202008, + 2202008, 2516580, 2516580, 2516580, 2097152, 2097152, 2097152, 2097152, 2306864, 2411724, 2726296, 2726296, 2726296, 2411724, 2411724, 2411724, 2306864, 2306864, 2306864, 3145728, 3145728, 3145728, 2306864, 2306864, 2306864, 2411724, 2411724, 2411724, 2306864, 2306864, + 2306864, 2097152, 2202008, 2306864, 2306864, 2306864, 2621440, 2621440, 2621440, 2621440, 2411724, 2411724, 2411724, 2621440, 2621440, 2621440, 2936012, 2936012, 2936012, 2621440, 2621440, 2726296, 2726296, 2726296, 2726296, 2516580, 2516580, 2516580, 2621440, 2621440, + 2621440, 2936012, 2936012, 2936012, 2516580, 2516580, 2516580, 2516580, 2306864, 2306864}, + 157: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 406: []int64{942, 615, 308, 1003, 67, 638, 951, 442, 100, 350, 477, 964, 469, 905, 622, 523, 679, 130, 457, 208, 710, 905, 781, 740, 608, 254, 286, 483, 205, 929, 88, 936, 730, 832, 144, 658, 558, 306, 19, 920, 254, 804, 458, 370, 328, 655, 43, 165, 653, 310, 369, 705, 188, 238, 170, 948, 535, 209, 293, 971, 787, 245, 377, 767, 807, 324, 896, 109, 178, 928, 954, 312, 26, 831, 816, 646, 159, 232, 997, 820, 387, 128, 28, 582, 1010, 705, 662, 815, 830, 946, 750, 637, 600, 847, 732, 566, 562, 406, 311, 609}, + 513: []int64{1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1800, 1800, 1900, 1900, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, + 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 1900, 1900, 1900, 1900, 1900, + 1800, 1700, 1800, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 2200, 2500, 3600, 3700, 3800, 3900, 3900, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, + 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900, 3900}, + 512: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 461: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 10: []int64{740, 967, 600, 858, 667, 588, 488, 323, 834, 600, 49, 486, 867, 163, 219, 532, + 224, 115, 377, 80, 671, 327, 77, 8, 995, 831, 594, 326, 595, 182, 152, 195, 897, 924, 995, + 393, 126, 296, 678, 494, 752, 198, 199, 184, 412, 600, 19, 454, 605, 481, 456, 54, 487, + 395, 24, 859, 670, 710, 339, 232, 300, 941, 187, 190, 779, 127, 252, 304, 580, 823, 30, + 43, 3, 30, 523, 670, 499, 474, 962, 588, 300, 978, 338, 772, 212, 435, 920, 958, 533, 650, + 39, 668, 185, 124, 851, 226, 356, 594, 247, 194}, + 12: []int64{137, 101, 116, 123, 114, 107, 96, 96, 103, 124, 111, 109, 108, 106, 106, 124, 122, 117, 149, 137, 141, 109, 110, 154, 128, 88, 107, 119, 102, 108, + 125, 91, 95, 116, 97, 108, 100, 103, 119, 122, 97, 99, 108, 94, 97, 106, 105, 106, 107, 98, 111, 105, 97, 98, 106, 111, 94, 90, 95, 100, + 131, 100, 103, 125, 108, 112, 97, 91, 107, 106, 98, 102, 116, 96, 112, 257, 186, 182, 259, 271, 232, 196, 123, 107, 122, 112, 114, 118, 104, 116, + 139, 107, 112, 126, 103, 103, 101, 125, 101, 122}, +} + +var HostMetricData = map[int32][]int64{ + 540: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 193: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 10, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 538: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 442: []int64{558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 558345748480, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, + 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, + 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, + 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, + 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, 559419490304, + }, + 184: []int64{6, 7, 24, 10, 12, 10, 11, 11, 15, 9, 6, 11, 10, 11, 11, 15, 14, 24, 8, 15, + 11, 14, 8, 9, 13, 11, 10, 10, 10, 8, 14, 11, 13, 15, 16, 13, 10, 12, 16, 16, + 13, 14, 11, 11, 13, 14, 11, 11, 11, 10, 8, 13, 16, 16, 10, 15, 9, 10, 10, 9, + 12, 10, 15, 10, 11, 19, 11, 11, 18, 11, 10, 10, 9, 13, 8, 11, 8, 12, 10, 10, + 11, 18, 12, 14, 14, 8, 11, 13, 11, 24, 12, 14, 18, 10, 13, 15, 13, 12, 20, 11, + }, + 417: []int64{4209028, 4597196, 4911776, 4890868, 4716732, 4949160, 5618444, 5299588, 5939276, 5373040, 5444172, 5360296, 6744416, 6827536, 6208836, 6481460, 6483476, 6441596, 6315764, 6396904, + 6292044, 6313012, 6319280, 6245880, 5176316, 5171796, 5486372, 5402552, 5406000, 5059972, 4956844, 5174332, 5447028, 5153364, 5147720, 4403340, 4361368, 4369400, 4862164, 4946880, + 4994708, 5517376, 5999716, 5998864, 5380208, 4834948, 4838024, 4282212, 4177360, 4330364, 4582024, 5022488, 5030444, 4881924, 5007848, 5085540, 5012204, 5012144, 5036856, 4942480, + 4187564, 4228672, 4155256, 4134280, 4132984, 4299164, 4445960, 4453264, 4159664, 4390344, 4383672, 4415064, 4918376, 4918656, 5222744, 5222808, 5225088, 4616912, 4218456, 4215328, + 4351644, 4812948, 4976436, 4494096, 4726508, 4721272, 5235008, 4857516, 4855644, 5054940, 4740304, 4796812, 4543444, 4312760, 4351020, 4560668, 5084960, 5092936, 5260772, 5072024, + }, + 465: []int64{135, 62, 9, 25, 9, 16, 8, 10, 3, 7, 12, 8, 13, 5, 13, 6, 13, 2, 12, 10, + 7, 9, 7, 19, 6, 10, 7, 12, 8, 4, 13, 14, 14, 1, 13, 12, 7, 1, 8, 14, + 13, 9, 3, 12, 8, 2, 5, 9, 17, 5, 13, 7, 15, 10, 5, 13, 10, 18, 6, 15, + 6, 17, 3, 6, 8, 8, 12, 9, 11, 3, 18, 7, 4, 1, 12, 10, 11, 7, 12, 16, + 5, 3, 1, 24, 11, 9, 11, 18, 12, 1, 8, 10, 15, 4, 11, 11, 12, 10, 2, 6, + }, + 445: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 158: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 516: []int64{6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, + }, + 9: []int64{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + }, + 433: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 464: []int64{208, 119, 77, 99, 67, 76, 74, 62, 67, 73, 64, 72, 87, 61, 69, 96, 75, 56, 82, 62, + 77, 80, 57, 72, 88, 70, 61, 70, 76, 70, 67, 72, 76, 65, 71, 62, 81, 63, 58, 76, + 94, 99, 101, 104, 104, 107, 97, 57, 87, 63, 69, 75, 83, 56, 69, 81, 88, 84, 76, 71, + 70, 115, 47, 74, 76, 64, 98, 77, 72, 65, 80, 63, 72, 61, 64, 62, 91, 65, 58, 78, + 73, 63, 63, 84, 73, 79, 67, 68, 78, 73, 62, 68, 83, 56, 79, 71, 77, 94, 68, 56, + }, + 461: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 460: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 469: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 468: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 463: []int64{4529, 3139, 976, 1336, 1328, 854, 781, 678, 587, 874, 1296, 1092, 914, 657, 662, 862, 671, 1366, 724, 1384, + 595, 753, 766, 696, 697, 925, 1215, 579, 700, 644, 730, 595, 857, 1243, 1059, 1037, 937, 644, 449, 627, + 1002, 871, 626, 661, 594, 576, 543, 608, 1409, 1306, 579, 720, 479, 592, 641, 1576, 654, 660, 555, 648, + 606, 457, 580, 633, 1730, 985, 797, 451, 559, 768, 864, 1020, 638, 608, 641, 467, 622, 466, 687, 1507, + 542, 1115, 609, 472, 634, 1398, 556, 589, 730, 544, 625, 679, 525, 480, 1496, 1446, 1136, 683, 507, 704, + }, + 159: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 147: []int64{98787, 64540, 12850, 14793, 13898, 11584, 9842, 9220, 8157, 13929, 14763, 16435, 10855, 10541, 13461, 9241, 8298, 13911, 9665, 13714, + 8106, 9184, 9718, 10730, 11620, 10779, 18429, 7382, 10814, 13398, 8824, 8072, 9910, 12595, 10950, 11917, 12508, 8644, 6052, 10230, + 11355, 13255, 8252, 10033, 11957, 6777, 7435, 8673, 14327, 13369, 8016, 9588, 6494, 8082, 9718, 14035, 11684, 8576, 9269, 13208, + 7808, 6503, 7587, 8385, 16944, 11698, 10462, 6446, 7489, 10736, 11891, 15393, 8347, 9696, 12891, 6261, 8374, 6976, 8981, 15365, + 7323, 12960, 8301, 6383, 7699, 17905, 10476, 7616, 11062, 12148, 7518, 8798, 7209, 6363, 15726, 15193, 13103, 9463, 6583, 8581, + }, + 2: []int64{5216, 6422, 2301, 2399, 3513, 3670, 2479, 2777, 1948, 2395, 4382, 3535, 2610, 2991, 2086, 2249, 2980, 4164, 2341, 4394, + 2166, 2374, 2577, 3321, 2379, 3581, 2061, 2313, 3196, 3493, 2299, 2811, 2994, 2399, 3526, 3718, 2327, 3588, 2037, 2313, + 3351, 3459, 2269, 2940, 2039, 2267, 2935, 3661, 3132, 3684, 2261, 2318, 2543, 3373, 2315, 4170, 2265, 2348, 2654, 3427, + 2311, 2576, 2225, 3184, 4171, 3686, 2190, 2765, 2177, 2133, 3559, 3530, 2178, 3213, 2475, 2133, 2728, 3443, 2390, 4531, + 2388, 2188, 3001, 3636, 2125, 3588, 2281, 2203, 2861, 3476, 2124, 2860, 2463, 2142, 4806, 4150, 2169, 2695, 2160, 2194, + }, + 146: []int64{123085, 81730, 23478, 30517, 31220, 22570, 18686, 17187, 15034, 23327, 30538, 29852, 21611, 17841, 20520, 19804, 16652, 32333, 17640, 31898, + 15354, 17755, 19085, 17827, 19017, 22028, 30619, 14066, 18751, 21221, 17486, 15365, 20671, 27904, 24811, 25645, 22882, 16383, 11545, 17083, + 23937, 24473, 15364, 17625, 18616, 13334, 14162, 16791, 31671, 30553, 15054, 17695, 12414, 15992, 16789, 29615, 19038, 16113, 15550, 21144, + 14848, 12167, 14642, 15589, 39685, 24791, 19349, 12091, 14397, 18326, 22628, 28263, 15711, 16693, 20002, 11595, 15951, 13324, 16702, 34960, + 13979, 26177, 15704, 12997, 14929, 35171, 16772, 14289, 19393, 18969, 14908, 17101, 13600, 11905, 35064, 34309, 26614, 17578, 12759, 16810, + }, + 348: []int64{36000, 39300, 34400, 24500, 17700, 17700, 20100, 18600, 17100, 14600, 18300, 19200, 22300, 18700, 18300, 15100, 14800, 17300, 19600, 22900, + 20700, 18500, 14800, 15100, 17100, 19200, 18500, 16400, 15400, 16400, 18700, 18100, 18800, 16900, 18300, 17900, 19900, 20100, 18600, 16200, + 15800, 16700, 18900, 17900, 17300, 15000, 15000, 15600, 20300, 21400, 21600, 17100, 15000, 14800, 16900, 20700, 20400, 18300, 14900, 15500, + 17400, 17400, 16800, 16600, 19400, 20800, 20900, 18200, 16900, 14600, 16300, 16700, 19100, 17900, 18600, 16200, 15600, 14800, 17600, 21500, + 21700, 18900, 15200, 16100, 18200, 19900, 18600, 16700, 15100, 15400, 17600, 17300, 17100, 15400, 19400, 21300, 23000, 19100, 16300, 14500, + }, + 386: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 106: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 24: []int64{9387, 9390, 9388, 9389, 9389, 9387, 9388, 9389, 9388, 9389, 9390, 9388, 9389, 9390, 9390, 9392, 9391, 9390, 9388, 9388, + 9387, 9387, 9387, 9387, 9388, 9387, 9388, 9389, 9389, 9387, 9389, 9388, 9389, 9391, 9390, 9388, 9391, 9391, 9390, 9391, + 9392, 9388, 9388, 9387, 9388, 9388, 9388, 9389, 9388, 9388, 9389, 9388, 9389, 9388, 9389, 9388, 9389, 9391, 9389, 9388, + 9390, 9390, 9390, 9391, 9392, 9388, 9387, 9388, 9388, 9388, 9389, 9389, 9388, 9388, 9388, 9388, 9389, 9388, 9389, 9388, + 9388, 9390, 9390, 9390, 9390, 9389, 9391, 9390, 9391, 9388, 9389, 9388, 9388, 9388, 9388, 9390, 9388, 9388, 9388, 9389, + }, + 437: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 45: []int64{28758744, 28759192, 28759660, 28759688, 28759572, 28759656, 28759684, 28761964, 28759664, 28759716, 28761648, 28759596, 28759636, 28759652, 28761712, 28759628, 28761824, 28759660, 28759796, 28757672, + 28757696, 28757860, 28757692, 28757724, 28757712, 28757712, 28757672, 28757636, 28757652, 28757676, 28759828, 28757608, 28759684, 28757684, 28757700, 28757636, 28757712, 28759704, 28757676, 28757744, + 28757724, 28757648, 28757612, 28759848, 28759680, 28757680, 28759756, 28757808, 28757728, 28757740, 28757692, 28757724, 28759696, 28757752, 28757724, 28757660, 28757780, 28757660, 28759676, 28759784, + 28757752, 28759700, 28757688, 28757732, 28759700, 28757704, 28757668, 28757740, 28757676, 28759832, 28759628, 28759764, 28757720, 28757768, 28759680, 28757736, 28759712, 28757656, 28757668, 28759776, + 28757676, 28757652, 28759768, 28757724, 28757724, 28759676, 28759792, 28757680, 28757648, 28759740, 28757764, 28759876, 28757660, 28757652, 28759624, 28757780, 28759724, 28757648, 28759732, 28757768, + }, + 515: []int64{160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + }, + 512: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 504: []int64{38200, 40700, 40700, 40700, 40700, 40700, 41100, 41100, 41100, 41100, 41100, 41100, 41100, 41100, 41100, 40700, 26800, 26800, 27100, 31600, + 31600, 30600, 30600, 30600, 31600, 31600, 31600, 30600, 30600, 30600, 31600, 31600, 31600, 30600, 27000, 27400, 27500, 34800, 34800, 27500, + 27500, 27500, 36500, 36500, 36500, 27500, 27700, 27700, 36500, 36500, 36500, 28100, 27700, 27700, 28100, 28100, 28100, 27700, 27700, 27700, + 28100, 28100, 28100, 27700, 27700, 27700, 35000, 35000, 35000, 27700, 27600, 27600, 35000, 35000, 35000, 27600, 27600, 27600, 35400, 35400, + 35400, 29100, 29100, 29100, 34300, 34300, 34300, 29100, 29100, 29100, 34300, 34300, 34300, 29100, 26300, 27900, 34300, 34300, 34300, 27900, + }, + 509: []int64{56300, 56300, 56300, 45300, 26500, 26500, 40200, 40200, 40200, 23400, 45700, 45700, 45700, 39900, 39900, 23200, 20800, 25700, 36300, 36300, + 36300, 31100, 19300, 21900, 34300, 36700, 36700, 36700, 23100, 23100, 37900, 37900, 37900, 27000, 27000, 26900, 36700, 36700, 36700, 36100, + 36900, 36900, 36900, 36100, 36100, 26200, 27300, 27300, 44400, 44400, 44400, 27500, 20500, 21400, 35500, 44500, 44500, 44500, 22100, 22800, + 34600, 34600, 34600, 25500, 35300, 35300, 35300, 35000, 35000, 21300, 40300, 40300, 40300, 36600, 36600, 25400, 21400, 22000, 36200, 39900, + 39900, 39900, 22900, 22700, 33900, 37000, 37000, 37000, 21900, 23000, 36800, 36800, 36800, 19300, 41300, 41300, 41300, 35100, 35100, 19400, + }, + 13: []int64{55854, 44019, 91548, 91238, 77451, 76086, 89967, 87066, 96253, 92136, 66625, 77627, 88722, 83963, 94854, 93093, 84480, 69900, 91799, 67236, + 94009, 91442, 89091, 80204, 91615, 76760, 95271, 92658, 81344, 78020, 92539, 86149, 84145, 91137, 77621, 75411, 92107, 76879, 95544, 92520, + 79654, 78532, 92752, 84539, 95566, 92740, 84839, 77042, 81463, 75690, 92934, 92048, 89801, 79319, 92435, 69706, 92835, 92971, 86952, 78964, + 92614, 88676, 93272, 81870, 70002, 75928, 93396, 86942, 93717, 94338, 77321, 77673, 93967, 81264, 90382, 94398, 87290, 78692, 91395, 65516, + 91277, 94100, 83600, 76785, 94306, 76729, 92706, 93455, 85740, 78369, 94379, 85854, 90241, 94306, 62269, 70322, 93958, 87650, 94017, 93690, + }, + 505: []int64{23500, 24800, 24900, 24400, 24500, 24600, 25000, 25000, 24800, 24300, 23900, 23100, 22500, 21700, 20600, 18700, 17200, 17500, 17900, 18200, + 18100, 17600, 17500, 17700, 18100, 17700, 17600, 16900, 17000, 17200, 17600, 17700, 17500, 17100, 16800, 16900, 17400, 17800, 17600, 17200, + 17100, 17300, 17700, 17700, 17500, 17000, 17100, 16800, 17700, 17700, 17600, 17100, 16700, 16800, 17200, 17600, 17500, 17100, 17000, 17200, + 17600, 17500, 17400, 16900, 17100, 17200, 17600, 17700, 17600, 17100, 16900, 16900, 17300, 17400, 17600, 17100, 17100, 17200, 17300, 17500, + 17400, 16900, 16900, 17200, 17600, 17600, 17600, 17100, 17100, 16900, 17400, 17400, 17400, 17000, 17000, 17300, 17800, 17800, 17400, 17100, + }, + 157: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 388: []int64{3105, 3888, 1350, 1391, 1943, 2053, 1406, 1570, 1178, 1412, 2542, 1997, 1490, 1658, 1236, 1322, 1652, 2219, 1353, 2397, + 1273, 1376, 1460, 1857, 1389, 1993, 1231, 1352, 1761, 1961, 1336, 1574, 1686, 1385, 1931, 2030, 1380, 1954, 1204, 1366, + 1914, 1933, 1344, 1689, 1211, 1340, 1675, 2101, 1748, 2028, 1313, 1347, 1464, 1886, 1343, 2403, 1305, 1391, 1532, 1920, + 1358, 1480, 1282, 1788, 2261, 2023, 1288, 1576, 1283, 1278, 2002, 1949, 1281, 1796, 1411, 1240, 1552, 1909, 1384, 2483, + 1373, 1301, 1690, 1967, 1258, 2017, 1337, 1282, 1629, 1965, 1253, 1619, 1390, 1271, 2614, 2221, 1286, 1563, 1253, 1296, + }, + 155: []int64{2950229, 2950250, 2950269, 2950289, 2950309, 2950329, 2950349, 2950369, 2950389, 2950409, 2950429, 2950449, 2950469, 2950489, 2950509, 2950529, 2950549, 2950569, 2950589, 2950609, + 2950629, 2950649, 2950669, 2950689, 2950709, 2950729, 2950749, 2950769, 2950789, 2950809, 2950829, 2950849, 2950869, 2950889, 2950909, 2950929, 2950949, 2950969, 2950989, 2951009, + 2951029, 2951049, 2951069, 2951089, 2951109, 2951129, 2951149, 2951169, 2951189, 2951209, 2951229, 2951249, 2951269, 2951289, 2951309, 2951329, 2951349, 2951369, 2951389, 2951409, + 2951429, 2951449, 2951469, 2951489, 2951509, 2951529, 2951549, 2951569, 2951589, 2951609, 2951629, 2951649, 2951669, 2951689, 2951709, 2951729, 2951749, 2951769, 2951789, 2951809, + 2951829, 2951849, 2951869, 2951889, 2951909, 2951929, 2951949, 2951969, 2951989, 2952009, 2952029, 2952049, 2952069, 2952089, 2952109, 2952129, 2952149, 2952169, 2952189, 2952209, + }, + 404: []int64{46, 54, 34, 33, 37, 37, 35, 35, 33, 34, 43, 38, 34, 35, 34, 33, 35, 39, 33, 41, + 33, 34, 34, 37, 33, 37, 33, 33, 36, 37, 34, 35, 35, 33, 37, 37, 33, 37, 33, 33, + 39, 37, 34, 35, 33, 34, 36, 39, 37, 36, 34, 33, 34, 37, 33, 41, 33, 34, 34, 37, + 34, 34, 34, 35, 39, 38, 33, 36, 33, 33, 39, 37, 32, 34, 34, 32, 35, 37, 33, 41, + 34, 33, 35, 38, 33, 39, 33, 32, 35, 38, 34, 35, 34, 33, 42, 38, 33, 35, 32, 33, + }, + 65: []int64{30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, + 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, + 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, + 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, + 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, 30429, + }, + 130: []int64{316, 288, 31, 17, 70, 78, 8, 5, 13, 172, 8, 9, 234, 84, 286, 107, 42, 15, 10, 48, + 9, 10, 16, 4, 410, 8, 11, 141, 85, 283, 12, 9, 12, 21, 45, 572, 19, 14, 2, 147, + 46, 9, 139, 84, 280, 9, 26, 8, 14, 42, 15, 13, 7, 10, 93, 76, 16, 143, 82, 287, + 6, 6, 311, 20, 82, 34, 7, 6, 21, 45, 137, 16, 146, 83, 286, 4, 9, 5, 8, 69, + 20, 3, 18, 8, 8, 173, 9, 139, 84, 274, 8, 11, 8, 3, 76, 61, 7, 4, 7, 11, + }, + 395: []int64{7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, + 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, + 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, + 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, + 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, 7125, + }, + 392: []int64{5078, 6147, 2371, 2453, 3400, 3565, 2486, 2777, 2066, 2456, 4110, 3436, 2636, 2944, 2164, 2343, 2932, 3939, 2400, 4162, + 2265, 2439, 2599, 3240, 2426, 3443, 2166, 2371, 3127, 3394, 2360, 2783, 2950, 2453, 3410, 3576, 2426, 3452, 2126, 2400, + 3267, 3362, 2360, 2936, 2128, 2354, 2927, 3557, 3062, 3562, 2314, 2387, 2586, 3303, 2373, 4038, 2320, 2400, 2680, 3332, + 2385, 2613, 2275, 3132, 3966, 3540, 2273, 2756, 2272, 2243, 3406, 3411, 2261, 3155, 2512, 2207, 2731, 3332, 2445, 4277, + 2437, 2283, 2981, 3481, 2221, 3463, 2373, 2266, 2858, 3371, 2216, 2854, 2473, 2251, 4489, 3926, 2268, 2721, 2224, 2289, + }, + 168: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 10, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 0, 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 11: []int64{3767685, 3766843, 3809485, 3802123, 3797075, 3794283, 3804460, 3803343, 3813172, 3813480, 3772726, 3795530, 3803912, 3801956, 3811636, 3811586, 3804529, 3783666, 3808189, 3783649, + 3810947, 3809723, 3804999, 3797668, 3808199, 3790673, 3812824, 3820071, 3791344, 3794066, 3807934, 3802632, 3800437, 3809786, 3796352, 3794083, 3808300, 3791286, 3812957, 3812179, + 3791058, 3797110, 3807338, 3801842, 3812268, 3809965, 3800048, 3796279, 3792819, 3795748, 3808166, 3810005, 3805475, 3797880, 3807963, 3786534, 3811175, 3821127, 3793409, 3798201, + 3808581, 3802765, 3811096, 3799097, 3788026, 3799350, 3803446, 3802916, 3810034, 3812160, 3790129, 3797411, 3810431, 3802124, 3804558, 3812784, 3803386, 3796951, 3809341, 3779330, + 3808717, 3819583, 3792378, 3799161, 3805583, 3790405, 3809761, 3812506, 3802618, 3794905, 3810449, 3803410, 3806050, 3812196, 3778959, 3789793, 3809308, 3803093, 3812233, 3810652, + }, + 443: []int64{35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, 35184372088832, + }, + 6: []int64{5946, 7321, 2624, 2735, 4005, 4184, 2826, 3166, 2221, 2730, 4996, 4030, 2975, 3409, 2378, 2563, 3397, 4747, 2668, 5009, + 2469, 2706, 2937, 3786, 2712, 4082, 2349, 2636, 3644, 3982, 2621, 3204, 3413, 2735, 4019, 4238, 2652, 4090, 2322, 2636, + 3820, 3943, 2586, 3351, 2325, 2584, 3346, 4173, 3570, 4200, 2577, 2642, 2899, 3845, 2639, 4753, 2582, 2676, 3025, 3906, + 2634, 2936, 2536, 3630, 4755, 4202, 2497, 3152, 2481, 2431, 4057, 4024, 2482, 3663, 2821, 2432, 3109, 3924, 2725, 5164, + 2722, 2494, 3421, 4145, 2423, 4090, 2600, 2511, 3261, 3962, 2421, 3260, 2808, 2441, 5479, 4731, 2472, 3072, 2462, 2501, + }, + 33: []int64{10290632, 11098228, 10794144, 10521580, 10347364, 10695132, 11637048, 11150420, 11454568, 10951244, 11043428, 11578212, 13717308, 13716504, 13286552, 12971972, 12974028, 12690972, 12376396, 12373608, + 11828348, 12247780, 12254008, 12316920, 11121524, 11200932, 12060768, 11851116, 11854604, 10879428, 11342532, 11360752, 11727820, 10700152, 10694468, 10159800, 10054908, 10241236, 10178260, 10304924, + 10468096, 11231940, 12406340, 12405528, 11430352, 10276920, 10279996, 9986332, 10070220, 10107804, 10862772, 10757980, 10765936, 10009244, 10407800, 10401684, 10118624, 10915480, 10919140, 11076432, + 10321520, 10320684, 9964144, 9125280, 9124024, 9374092, 9856432, 9863736, 9674992, 9779840, 9773128, 9909380, 10349780, 10350060, 10245204, 10580816, 10583136, 10163740, 9324880, 9321712, + 9709688, 10296824, 10565128, 10061812, 10923364, 10918128, 11400412, 11463328, 11461496, 11702728, 10570204, 10574244, 10278936, 9943392, 10002624, 9834784, 10233244, 10241220, 10702656, 10975280, + }, + 502: []int64{33600, 36700, 32300, 23200, 17300, 17300, 19600, 18200, 16700, 14200, 17800, 18700, 21800, 18300, 17900, 14700, 14400, 16900, 19200, 22500, + 20200, 18100, 14400, 14700, 16700, 18800, 18000, 16000, 15000, 16000, 18200, 17600, 18500, 16500, 17900, 17500, 19500, 19700, 18200, 15900, + 15500, 16300, 18500, 17500, 16900, 14600, 14700, 15200, 19800, 21000, 21200, 16700, 14700, 14400, 16500, 20200, 19900, 17800, 14500, 15000, + 17000, 17000, 16400, 16300, 19000, 20300, 20400, 17800, 16500, 14200, 16000, 16400, 18700, 17500, 18200, 15800, 15300, 14400, 17200, 21100, + 21300, 18500, 14800, 15700, 17800, 19500, 18200, 16300, 14700, 15000, 17200, 16900, 16800, 15100, 19000, 20900, 22600, 18700, 16000, 14200, + }, + 398: []int64{4356, 5034, 4468, 3401, 2288, 2406, 2883, 2712, 2439, 1928, 2642, 2820, 3379, 2703, 2553, 1991, 1938, 2455, 2883, 3400, + 2975, 2578, 1995, 2048, 2392, 2812, 2666, 2288, 2063, 2214, 2659, 2557, 2750, 2376, 2528, 2437, 2805, 2980, 2707, 2225, + 2182, 2358, 2755, 2530, 2380, 1957, 2023, 2150, 3032, 3112, 3147, 2296, 2036, 1989, 2390, 2899, 2844, 2439, 1948, 2022, + 2420, 2452, 2363, 2208, 2725, 2987, 3167, 2630, 2376, 1947, 2269, 2352, 2773, 2506, 2630, 2191, 2121, 1983, 2441, 3127, + 3164, 2729, 2059, 2244, 2625, 2947, 2693, 2299, 1996, 2047, 2488, 2443, 2434, 2079, 2719, 3087, 3410, 2790, 2272, 1937, + }, + 466: []int64{147, 79, 116, 164, 105, 79, 86, 90, 122, 152, 122, 96, 99, 84, 80, 116, 115, 88, 100, 79, + 76, 128, 122, 79, 84, 78, 81, 104, 104, 94, 116, 138, 82, 106, 93, 110, 112, 80, 82, 116, + 124, 111, 82, 82, 74, 100, 84, 145, 114, 74, 74, 172, 106, 150, 109, 76, 122, 132, 122, 78, + 135, 102, 74, 158, 108, 74, 121, 144, 74, 132, 124, 82, 211, 154, 127, 142, 84, 76, 115, 96, + 76, 128, 84, 72, 116, 157, 96, 126, 94, 107, 136, 132, 106, 158, 164, 96, 112, 137, 90, 142, + }, + 410: []int64{976, 899, 657, 904, 171, 606, 607, 707, 823, 331, 255, 421, 230, 1001, + 937, 467, 738, 287, 904, 962, 518, 391, 593, 593, 59, 874, 364, 873, 728, 727, 533, + 328, 957, 637, 973, 1014, 259, 160, 698, 589, 933, 283, 385, 393, 129, 414, 16, 800, + 105, 150, 905, 278, 131, 115, 678, 738, 444, 411, 388, 402, 541, 428, 970, 260, 56, + 794, 975, 480, 644, 110, 702, 93, 240, 322, 651, 370, 261, 589, 72, 259, 405, 965, + 927, 519, 210, 291, 688, 758, 942, 301, 253, 605, 677, 995, 509, 478, 646, 3, 472, 1007, + }, + 470: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 57: []int64{78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, 78208, + 78208, 78208, 78208, 78208, 78208, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, 77828, + 77824, 77824, 77824, 77824, 77824, 77824, 77848, 77844, 77832, 77832, 77832, 77828, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, + 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, + 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, 77816, + }, + 29: []int64{58388608, 58386244, 58386248, 58386248, 58386416, 58388724, 58386336, 58386332, 58386320, 58386400, 58386332, 58386344, 58386332, 58386344, 58386380, 58386372, 58386212, 58386208, 58386208, 58386208, + 58386208, 58386196, 58386208, 58386208, 58386276, 58386196, 58386208, 58386208, 58386216, 58386216, 58388608, 58386216, 58386216, 58386216, 58386204, 58386212, 58386208, 58386208, 58386208, 58387404, + 58388600, 58386208, 58386208, 58386208, 58386208, 58386208, 58386208, 58386196, 58386208, 58386208, 58386208, 58386208, 58388684, 58386208, 58386344, 58386208, 58386196, 58386208, 58386216, 58386216, + 58386204, 58386216, 58386220, 58386220, 58388612, 58386220, 58386220, 58386220, 58386220, 58386208, 58386248, 58386248, 58386248, 58386236, 58386248, 58386248, 58386248, 58386248, 58386248, 58386248, + 58386248, 58386248, 58386236, 58386248, 58388640, 58386248, 58386240, 58386248, 58386248, 58386248, 58386248, 58388640, 58386248, 58386248, 58386248, 58386236, 58386248, 58386248, 58386248, 58386236, + }, + 90: []int64{6, 644, 90, 376, 809, 98, 902, 998, 526, 633, 973, 1019, 423, 410, 219, + 879, 566, 390, 109, 450, 489, 341, 61, 465, 29, 893, 134, 1022, 703, 73, 477, 976, + 172, 175, 65, 696, 410, 566, 430, 187, 300, 542, 305, 751, 606, 567, 905, 70, 369, + 524, 913, 829, 351, 456, 295, 29, 539, 694, 620, 1010, 441, 904, 706, 954, 777, 221, + 497, 586, 456, 694, 183, 631, 302, 391, 857, 864, 610, 880, 906, 299, 839, 399, 49, + 713, 220, 903, 788, 228, 256, 119, 562, 395, 991, 543, 205, 584, 130, 804, 70, 99, + }, + 406: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 424: []int64{1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, + 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, + 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, + 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, + 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, 1295864, + }, + 61: []int64{14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, + }, + 506: []int64{20000, 20600, 20600, 20400, 20400, 20400, 20600, 20700, 20600, 20400, 20500, 20500, 20700, 20700, 20700, 20300, 20400, 20500, 20700, 20800, + 20700, 20500, 20500, 20600, 20700, 20700, 20700, 20500, 20500, 20600, 20600, 20600, 20700, 20500, 20500, 20600, 20700, 20800, 20700, 20500, + 20200, 20000, 19600, 19300, 18900, 18200, 17700, 17700, 18000, 18000, 17900, 17800, 17700, 17800, 17900, 17900, 17900, 17700, 17600, 17700, + 17800, 17800, 17600, 17600, 17600, 17600, 17800, 17800, 17800, 17600, 17600, 17700, 17800, 17800, 17800, 17600, 17600, 17500, 17700, 17800, + 17800, 17600, 17500, 17600, 17700, 17800, 17700, 17600, 17600, 17600, 17800, 17700, 17700, 17400, 17600, 17700, 17800, 17900, 17800, 17700, + }, + 508: []int64{19400, 19900, 19900, 19700, 19700, 19800, 19900, 20000, 19900, 19700, 19800, 19800, 20000, 20000, 20000, 19700, 19700, 19800, 20000, 20100, + 20000, 19800, 19800, 19900, 20000, 20000, 20000, 19800, 19800, 19900, 20000, 19900, 20000, 19800, 19800, 19900, 20000, 20100, 20000, 19900, + 19600, 19300, 19100, 18800, 18400, 17800, 17300, 17300, 17600, 17600, 17500, 17400, 17300, 17400, 17500, 17500, 17500, 17300, 17200, 17300, + 17400, 17400, 17200, 17200, 17200, 17200, 17400, 17400, 17400, 17200, 17200, 17300, 17400, 17400, 17400, 17200, 17200, 17100, 17300, 17400, + 17400, 17200, 17100, 17200, 17300, 17400, 17300, 17200, 17200, 17200, 17400, 17300, 17300, 17000, 17200, 17300, 17400, 17500, 17400, 17300, + }, + 37: []int64{1116464, 1116460, 1116476, 1116472, 1116984, 1117312, 1117308, 1117040, 1117680, 1117680, 1117768, 1117768, 1117764, 1117780, 1117780, 1117780, 1118264, 1118004, 1118004, 1118004, + 1118184, 1118184, 1118176, 1118596, 1118596, 1118360, 1117724, 1117724, 1117724, 1117976, 1117976, 1118296, 1118292, 1118292, 1118036, 1117612, 1117608, 1117288, 1117300, 1117300, + 1117388, 1117812, 1117812, 1118232, 1118552, 1118552, 1118904, 1118628, 1118624, 1118296, 1118296, 1118288, 1118540, 1118624, 1118620, 1118708, 1119284, 1119280, 1119276, 1118396, + 1118388, 1118788, 1119028, 1119028, 1119508, 1119508, 1119504, 1119500, 1119420, 1119420, 1119156, 1119476, 1119476, 1118976, 1118976, 1118968, 1119028, 1119128, 1119124, 1119124, + 1118952, 1118952, 1119212, 1119196, 1119192, 1118868, 1118920, 1118920, 1118916, 1118916, 1118908, 1119224, 1119224, 1119224, 1119220, 1119216, 1119216, 1119148, 1118884, 1118880, + }, + 85: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 396: []int64{65, 76, 50, 49, 53, 54, 51, 50, 49, 49, 62, 56, 50, 49, 49, 49, 49, 53, 49, 58, + 49, 49, 49, 53, 49, 53, 49, 49, 50, 54, 49, 50, 48, 48, 51, 53, 49, 52, 49, 49, + 56, 54, 50, 51, 49, 49, 52, 56, 52, 51, 49, 48, 50, 53, 49, 59, 47, 49, 49, 53, + 49, 49, 49, 49, 54, 54, 49, 51, 49, 49, 55, 53, 48, 50, 48, 47, 50, 53, 48, 56, + 49, 48, 50, 54, 48, 55, 49, 48, 50, 55, 49, 49, 49, 48, 58, 52, 49, 51, 48, 48, + }, + 426: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 107: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 510: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 98: []int64{62902396, 62921636, 62904432, 62913104, 62912472, 62897712, 62903512, 62911892, 62909336, 62914452, 62917196, 62904156, 62915072, 62920036, 62917360, 62930320, 62924892, 62917404, 62902896, 62906684, + 62898772, 62900724, 62898848, 62899600, 62906108, 62902472, 62903632, 62909996, 62913516, 62902092, 62911576, 62909124, 62914036, 62927356, 62917200, 62908204, 62923924, 62925684, 62917196, 62925320, + 62930344, 62909300, 62904316, 62901588, 62905664, 62906196, 62906848, 62913096, 62908148, 62906556, 62912224, 62904436, 62916248, 62903068, 62911968, 62906208, 62913732, 62924492, 62915224, 62904880, + 62919844, 62921172, 62919572, 62924784, 62931284, 62908824, 62901488, 62903452, 62903008, 62905672, 62911408, 62910308, 62907216, 62904444, 62904628, 62908004, 62915428, 62904220, 62912192, 62909452, + 62905684, 62916360, 62919128, 62919116, 62916452, 62914768, 62924312, 62922776, 62923692, 62903832, 62915528, 62903128, 62904000, 62904420, 62906860, 62918812, 62906628, 62907844, 62904164, 62910788, + }, + 102: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 105: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 49: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 68: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 41: []int64{1050664, 1050664, 1050664, 1050660, 1050656, 1050656, 1050652, 1050648, 1050648, 1050648, 1050648, 1050648, 1050644, 1050644, 1050644, 1050644, 1050640, 1050640, 1050640, 1050640, + 1050640, 1050640, 1050632, 1050632, 1050632, 1050612, 1050612, 1050612, 1050612, 1050612, 1050612, 1050612, 1050612, 1050612, 1050612, 1050612, 1050608, 1050604, 1050604, 1050604, + 1050588, 1050588, 1050588, 1050588, 1050588, 1050588, 1050932, 1050916, 1050916, 1050900, 1050900, 1050896, 1050888, 1050888, 1050884, 1050864, 1050864, 1050860, 1050856, 1050856, + 1050848, 1050848, 1050848, 1050848, 1050848, 1050848, 1050844, 1050840, 1050840, 1050840, 1050824, 1050824, 1050824, 1050820, 1050820, 1050812, 1050812, 1050812, 1050808, 1050808, + 1050808, 1050808, 1050800, 1050800, 1050796, 1050792, 1050792, 1050792, 1050788, 1050788, 1050780, 1050780, 1050780, 1050780, 1050776, 1050772, 1050772, 1050768, 1050764, 1050760, + }, + 440: []int64{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }, + 441: []int64{268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + }, + 422: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 429: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 143: []int64{8765, 5677, 1947, 2716, 2821, 1860, 1596, 1424, 1238, 1784, 2685, 2330, 1867, 1402, 1389, 1764, 1412, 2895, 1478, 2934, + 1256, 1540, 1604, 1518, 1410, 1930, 2512, 1185, 1490, 1418, 1493, 1256, 1791, 2541, 2270, 2222, 1912, 1355, 958, 1282, + 2087, 1882, 1279, 1410, 1252, 1177, 1151, 1347, 2879, 2776, 1223, 1472, 1020, 1314, 1310, 2902, 1374, 1350, 1194, 1425, + 1239, 975, 1225, 1295, 3642, 2116, 1627, 963, 1182, 1567, 1806, 2185, 1304, 1303, 1348, 958, 1311, 1057, 1405, 3185, + 1147, 2278, 1285, 1069, 1297, 2895, 1175, 1205, 1551, 1214, 1279, 1427, 1113, 984, 3162, 3057, 2320, 1435, 1076, 1440, + }, + 131: []int64{4655, 3164, 3005, 3258, 3194, 3077, 3071, 2430, 2576, 2467, 2464, 3189, 2703, 1753, 2425, 1598, 2234, 2281, 2723, 2766, + 2130, 2329, 2275, 1503, 2062, 2067, 2520, 1644, 1862, 1863, 2102, 2138, 1872, 2436, 2331, 2555, 3023, 2370, 1893, 2109, + 2025, 1974, 2015, 1766, 2073, 2033, 1645, 1974, 2306, 2578, 2046, 2724, 2061, 1859, 1932, 2223, 1915, 2410, 1825, 1992, + 1723, 1552, 2076, 1931, 3267, 2736, 3099, 1421, 1897, 1773, 1973, 2563, 2185, 1572, 1948, 1545, 1881, 1639, 2266, 2916, + 2266, 2899, 1927, 1828, 2131, 2660, 1845, 1844, 1902, 1712, 1835, 2563, 2026, 1545, 4746, 7004, 3166, 2172, 2198, 1984, + }, + 125: []int64{4972, 3453, 3036, 3275, 3264, 3155, 3080, 2435, 2589, 2639, 2472, 3199, 2938, 1838, 2711, 1705, 2276, 2296, 2734, 2815, + 2139, 2339, 2291, 1508, 2473, 2076, 2532, 1785, 1947, 2146, 2114, 2148, 1885, 2458, 2376, 3128, 3042, 2384, 1895, 2256, + 2072, 1983, 2155, 1851, 2354, 2042, 1671, 1982, 2320, 2620, 2062, 2738, 2069, 1870, 2026, 2299, 1931, 2553, 1907, 2279, + 1729, 1558, 2388, 1951, 3349, 2771, 3106, 1428, 1918, 1819, 2110, 2579, 2331, 1656, 2234, 1550, 1891, 1645, 2274, 2985, + 2287, 2902, 1945, 1836, 2140, 2833, 1854, 1983, 1986, 1986, 1843, 2575, 2034, 1549, 4822, 7066, 3173, 2176, 2206, 1996, + }, + 27: []int64{29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, + 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, + 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, + 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, + 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, 29551, + }, + 419: []int64{57636, 57636, 57637, 57637, 57636, 57637, 57637, 57639, 57637, 57637, 57638, 57636, 57637, 57637, 57639, 57637, 57639, 57637, 57637, 57635, + 57635, 57635, 57635, 57635, 57635, 57635, 57635, 57635, 57635, 57635, 57637, 57635, 57637, 57635, 57635, 57635, 57635, 57637, 57635, 57635, + 57635, 57635, 57635, 57637, 57637, 57635, 57637, 57635, 57635, 57635, 57635, 57635, 57637, 57635, 57635, 57635, 57635, 57635, 57637, 57637, + 57635, 57637, 57635, 57635, 57637, 57635, 57635, 57635, 57635, 57637, 57637, 57637, 57635, 57635, 57637, 57635, 57637, 57635, 57635, 57637, + 57635, 57635, 57637, 57635, 57635, 57637, 57637, 57635, 57635, 57637, 57635, 57637, 57635, 57635, 57636, 57635, 57637, 57635, 57637, 57635, + }, + 511: []int64{36400, 40300, 40300, 38500, 38500, 38500, 40200, 40200, 40200, 40200, 40200, 40200, 40200, 40200, 40200, 39900, 26100, 26100, 26500, 31100, + 31100, 29600, 29600, 29600, 31100, 31100, 31100, 29600, 29600, 29600, 31100, 31100, 31100, 29600, 26600, 26900, 27000, 34300, 34300, 27000, + 27000, 27000, 36100, 36100, 36100, 27000, 27300, 27300, 36100, 36100, 36100, 27500, 27300, 27300, 27500, 27500, 27500, 27300, 27300, 27300, + 27500, 27500, 27500, 27300, 27300, 27300, 34600, 34600, 34600, 27300, 26700, 26700, 34600, 34600, 34600, 26700, 26700, 26700, 35000, 35000, + 35000, 28500, 28500, 28500, 33900, 33900, 33900, 28500, 28500, 28500, 33900, 33900, 33900, 28500, 25600, 27300, 33900, 33900, 33900, 27300, + }, + 12: []int64{17855, 20753, 13236, 12962, 14433, 14512, 13653, 13534, 12746, 13076, 16646, 14960, 13417, 13483, 13067, 12955, 13556, 15106, 13014, 16075, + 13035, 13094, 13233, 14367, 13043, 14539, 12820, 13046, 13940, 14320, 13203, 13483, 13483, 12890, 14226, 14402, 13045, 14350, 12809, 12948, + 15041, 14439, 13309, 13757, 12993, 13068, 13879, 15041, 14435, 14027, 13045, 12915, 13351, 14350, 13023, 16024, 12689, 13111, 13270, 14385, + 13087, 13285, 13071, 13725, 15293, 14793, 13024, 13870, 12994, 12916, 15175, 14214, 12551, 13424, 13055, 12480, 13549, 14215, 12944, 15988, + 13097, 12677, 13603, 14745, 12869, 15045, 12947, 12664, 13529, 14769, 13079, 13453, 13052, 12744, 16185, 14851, 13030, 13729, 12598, 12845, + }, + 539: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 427: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 399: []int64{71, 59, 0, 4, 15, 14, 2, 9, 0, 3, 79, 10, 91, 11, 2, 2, 2, 101, 0, 35, + 0, 0, 0, 36, 2, 36, 0, 0, 15, 0, 0, 9, 0, 0, 6, 18, 1, 12, 0, 0, + 103, 15, 5, 0, 0, 6, 0, 28, 6, 37, 21, 0, 7, 26, 4, 5, 0, 22, 0, 3, + 0, 2, 1, 38, 15, 23, 0, 0, 0, 0, 9, 2, 0, 20, 0, 0, 3, 3, 3, 77, + 6, 0, 4, 99, 0, 26, 0, 1, 0, 22, 0, 10, 5, 2, 70, 25, 0, 0, 2, 0, + }, + 467: []int64{2, 0, 0, 4, 1, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3, 2, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 4, 0, 0, 1, 0, 0, 5, 0, 0, + }, + 149: []int64{4529, 3139, 976, 1336, 1328, 854, 781, 678, 587, 874, 1296, 1092, 914, 657, 662, 862, 671, 1366, 724, 1384, + 595, 753, 766, 696, 697, 925, 1215, 579, 700, 644, 730, 595, 857, 1243, 1059, 1037, 937, 644, 449, 627, + 1002, 871, 626, 661, 594, 576, 543, 608, 1409, 1306, 579, 720, 479, 592, 641, 1576, 654, 660, 555, 648, + 606, 457, 580, 633, 1730, 985, 797, 451, 559, 768, 864, 1020, 638, 608, 641, 467, 622, 466, 687, 1507, + 542, 1115, 609, 472, 634, 1398, 556, 589, 730, 544, 625, 679, 525, 480, 1496, 1446, 1136, 683, 507, 704, + }, + 501: []int64{61000, 61000, 61000, 49900, 27100, 27100, 41100, 41100, 41100, 23800, 47100, 47100, 47100, 40600, 40600, 23500, 21400, 26100, 36800, 36800, + 36800, 31600, 19600, 22400, 34800, 37300, 37300, 37300, 23700, 23700, 38500, 38500, 38500, 27400, 27400, 27500, 37200, 37200, 37200, 36500, + 37300, 37300, 37300, 36600, 36600, 27100, 27700, 27700, 45800, 45800, 45800, 28100, 20900, 22100, 36000, 45800, 45800, 45800, 22800, 23500, + 35000, 35000, 35000, 26000, 36100, 36100, 36100, 35400, 35400, 21600, 40900, 40900, 40900, 36900, 36900, 26300, 21800, 22600, 36500, 40500, + 40500, 40500, 23200, 23500, 34300, 37900, 37900, 37900, 22600, 23800, 37200, 37200, 37200, 19500, 41700, 41700, 41700, 35400, 35400, 19700, + }, + 133: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 7, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 10, 0, 0, 11, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 10, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 444: []int64{7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + }, + 414: []int64{2356756, 2354240, 2353756, 2353760, 2353824, 2353756, 2353756, 2353756, 2353620, 2353760, 2353756, 2353756, 2353620, 2353756, 2353712, 2353712, 2353580, 2353580, 2353580, 2355628, + 2355628, 2355500, 2355672, 2355672, 2355688, 2355672, 2355672, 2355672, 2355672, 2355716, 2355716, 2355716, 2355716, 2355716, 2355580, 2355716, 2355720, 2355672, 2355672, 2355672, + 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355536, 2355672, 2355672, 2355672, 2355672, 2355740, 2355672, 2355688, 2355672, 2355672, 2355676, 2355672, 2355672, + 2355536, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355536, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, + 2355672, 2355672, 2355536, 2355672, 2355672, 2355672, 2355536, 2355676, 2355812, 2355672, 2355672, 2355672, 2355672, 2355672, 2355672, 2355536, 2355672, 2355672, 2355672, 2355540, + }, + 514: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 513: []int64{34500, 36400, 36400, 35700, 35700, 35700, 36400, 36400, 36400, 35700, 35700, 35700, 36400, 36400, 36400, 35700, 35700, 35700, 36300, 36300, + 36300, 35700, 35700, 35700, 35700, 35700, 35700, 34600, 34600, 34600, 35700, 35700, 35700, 34600, 34600, 34600, 35700, 36100, 36100, 35700, + 34600, 34600, 36100, 36100, 36100, 31100, 27000, 27000, 27300, 27500, 27500, 27300, 27300, 27300, 27500, 27500, 27500, 27300, 27300, 27300, + 27500, 27500, 27500, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 27300, 28500, + 28500, 27500, 27300, 27300, 27500, 27500, 27500, 27300, 27300, 27300, 27500, 27500, 27500, 27300, 27300, 27300, 28500, 28500, 28500, 27300, + }, + 503: []int64{24600, 26100, 26200, 25700, 25700, 25800, 26300, 26300, 26100, 25500, 25100, 24200, 23500, 22500, 21300, 19300, 17600, 17900, 18300, 18700, + 18500, 18000, 17900, 18100, 18500, 18100, 17900, 17300, 17400, 17600, 18000, 18100, 17900, 17500, 17200, 17300, 17800, 18200, 18000, 17600, + 17500, 17700, 18100, 18000, 17900, 17400, 17400, 17200, 18100, 18100, 18000, 17500, 17000, 17200, 17600, 18000, 17900, 17500, 17400, 17600, + 18000, 17900, 17800, 17300, 17500, 17600, 18000, 18100, 18100, 17600, 17200, 17300, 17700, 17800, 18000, 17500, 17500, 17600, 17700, 17900, + 17700, 17300, 17300, 17600, 18000, 18000, 18000, 17500, 17500, 17300, 17800, 17800, 17800, 17400, 17400, 17700, 18200, 18200, 17800, 17400, + }, + 14: []int64{62600, 77075, 27623, 28796, 42164, 44052, 29757, 33336, 23381, 28748, 52594, 42428, 31328, 35896, 25039, 26988, 35767, 49973, 28095, 52738, + 25992, 28489, 30925, 39862, 28555, 42973, 24731, 27757, 38363, 41920, 27595, 33737, 35930, 28800, 42316, 44616, 27926, 43063, 24453, 27756, + 40219, 41513, 27233, 35284, 24476, 27207, 35227, 43938, 37587, 44219, 27139, 27820, 30524, 40477, 27790, 50045, 27185, 28176, 31853, 41129, + 27734, 30915, 26703, 38213, 50064, 44243, 26290, 33188, 26125, 25601, 42719, 42369, 26139, 38564, 29703, 25603, 32738, 41318, 28690, 54373, + 28665, 26258, 36017, 43638, 25508, 43062, 27378, 26439, 34338, 41717, 25492, 34329, 29567, 25705, 57680, 49805, 26032, 32345, 25920, 26333, + }, + 507: []int64{36500, 38200, 38200, 37800, 37800, 37800, 38200, 38200, 38200, 37800, 37800, 37800, 38200, 38200, 38200, 37800, 37800, 37800, 37800, 37800, + 37800, 37000, 37000, 37000, 37000, 37000, 37000, 36800, 36800, 36800, 37000, 37000, 37000, 36800, 36800, 36800, 37000, 37000, 37000, 36800, + 36500, 36500, 36600, 36600, 36500, 31600, 27500, 27500, 27700, 28100, 28100, 27700, 27700, 27700, 28100, 28100, 28100, 27700, 27700, 27700, + 28100, 28100, 28100, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 27700, 29100, + 29100, 28100, 27700, 27700, 28100, 28100, 28100, 27700, 27700, 27700, 28100, 28100, 28100, 27700, 27700, 27900, 29100, 29100, 29100, 27900, + }, + 86: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 462: []int64{4235, 2537, 970, 1379, 1492, 1006, 814, 746, 651, 909, 1389, 1238, 953, 744, 726, 901, 740, 1529, 754, 1550, + 660, 786, 838, 822, 712, 1004, 1297, 605, 789, 773, 763, 661, 933, 1297, 1211, 1185, 975, 711, 509, 654, + 1085, 1011, 653, 749, 657, 601, 607, 738, 1470, 1469, 643, 752, 541, 721, 669, 1326, 720, 689, 639, 777, + 633, 517, 645, 661, 1911, 1130, 830, 511, 622, 798, 941, 1165, 666, 694, 706, 490, 688, 590, 717, 1677, + 605, 1162, 675, 596, 662, 1496, 618, 615, 821, 670, 654, 748, 587, 503, 1666, 1611, 1184, 751, 568, 736, + }, + 148: []int64{4235, 2537, 970, 1379, 1492, 1006, 814, 746, 651, 909, 1389, 1238, 953, 744, 726, 901, 740, 1529, 754, 1550, + 660, 786, 838, 822, 712, 1004, 1297, 605, 789, 773, 763, 661, 933, 1297, 1211, 1185, 975, 711, 509, 654, + 1085, 1011, 653, 749, 657, 601, 607, 738, 1470, 1469, 643, 752, 541, 721, 669, 1326, 720, 689, 639, 777, + 633, 517, 645, 661, 1911, 1130, 830, 511, 622, 798, 941, 1165, 666, 694, 706, 490, 688, 590, 717, 1677, + 605, 1162, 675, 596, 662, 1496, 618, 615, 821, 670, 654, 748, 587, 503, 1666, 1611, 1184, 751, 568, 736, + }, +} + +var ResourcePoolMetricData = map[int32][]int64{ + 6: []int64{2648, 2660, 2642, 2704, 2653, 2610, 2679, 2637, 2688, 2575, 2703, 2546, 2629, 2689, 2653, 2564, 2717, 2545, 2613, 2672, + 2767, 2549, 2648, 2535, 2618, 2693, 2635, 2584, 2684, 2585, 2770, 2655, 2721, 2665, 2804, 2563, 2920, 2718, 2661, 2741, + 2731, 2617, 2692, 2716, 2627, 2612, 2725, 2536, 2705, 2757, 2741, 2574, 3086, 2513, 2748, 2689, 2678, 3847, 2742, 2552, + 2672, 2731, 2667, 2717, 2727, 2570, 2687, 2650, 2702, 3887, 2694, 2583, 2679, 2687, 2690, 2664, 2668, 2592, 2809, 2669, + 2610, 3783, 2672, 2576, 2705, 2693, 2768, 2665, 2764, 2666, 2684, 2743, 2721}, + 98: []int64{69961436, 69961085, 69960708, 69961322, 69961734, 69961582, 69960647, 69960520, 69961108, 69961043, 69959288, 69961340, 69963664, 69963803, 69966339, 69966730, 69966854, 69967577, 69969142, 69970332, + 69970629, 69970167, 69971088, 69970684, 69971038, 69971578, 69968726, 69968868, 69968092, 69968632, 69968387, 69968226, 69968412, 69967611, 69968527, 69969251, 69968896, 69968292, 69966611, 69966893, + 69966583, 69969648, 69969991, 69970006, 69970131, 69970476, 69970138, 69970011, 69969946, 69970596, 69970963, 69970303, 69970393, 69970626, 69970975, 69970635, 69970602, 69970758, 69970815, 69970774, + 69971567, 69974147, 69975787, 69973389, 69974243, 69974761, 69976130, 69977938, 69977197, 69976327, 69975736, 69975777, 69975205, 69974629, 69974275, 69973691, 69973552, 69972974, 69972629, 69972392, + 69973105, 69974080, 69976093, 69976312, 69979980, 69980007, 69984359, 69987261, 69988144, 69988443, 69987244, 69986857, 69986303}, + 29: []int64{71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71097821, 71098368, 71102190, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464}, + 33: []int64{14147864, 14298869, 13853549, 14071653, 14408592, 13569734, 13775254, 13631952, 14009437, 14864391, 15225092, 14491085, 14256903, 13928347, 13923454, 13900408, 14486205, 13712336, 13669000, 13853559, + 13605408, 14571477, 15720747, 15202728, 14281366, 14092624, 14070270, 14407903, 14308628, 13908775, 14154848, 13566956, 14234531, 14219868, 16074441, 14676380, 14672195, 14980482, 14745536, 14405798, + 14986710, 15169160, 14108018, 14105911, 13912964, 14536520, 15798325, 15342582, 14548403, 14673552, 15304788, 14523272, 15387281, 15152398, 14791723, 14362474, 13642436, 14774898, 16125462, 15111862, + 14085672, 14342207, 13367707, 15036358, 15538271, 14937092, 14194016, 13878714, 13884307, 14810548, 15532667, 15050322, 14081436, 14789578, 14602931, 14380633, 14739248, 14182827, 15072001, 14819650, + 14119919, 14589666, 16036683, 14730158, 14321214, 14659554, 14368049, 14447758, 14924502, 13787139, 14776992, 15789234, 14169540}, + 37: []int64{1224491, 1224767, 1224727, 1224610, 1224560, 1224513, 1224444, 1224411, 1224390, 1224364, 1224323, 1223250, 1222386, 1221184, 1220120, 1218849, 1217944, 1217003, 1215534, 1215959, + 1215276, 1214698, 1214640, 1214615, 1214655, 1214319, 1215025, 1214862, 1214388, 1214122, 1214082, 1214049, 1214000, 1213937, 1213708, 1213309, 1213506, 1213300, 1212838, 1212427, + 1211531, 1206346, 1206131, 1206061, 1205836, 1205722, 1205495, 1205681, 1205711, 1204664, 1204509, 1205405, 1205132, 1204909, 1204796, 1204754, 1204743, 1204720, 1204484, 1204448, + 1204636, 1204476, 1204354, 1204331, 1204079, 1203968, 1203899, 1203865, 1203811, 1203734, 1203865, 1203628, 1203251, 1203212, 1203098, 1203057, 1203938, 1203697, 1203608, 1203573, + 1203545, 1203465, 1202291, 1201669, 1201782, 1201631, 1201743, 1201529, 1201474, 1201407, 1199122, 1198521, 1198570}, + 70: []int64{91, 585, 246, 114, 553, 348, 824, 848, 827, 882, 632, 500, 647, 805, 425, 971, 789, 1001, 910, 1013, 338, 713, 496, 168, 201, 886, 124, 968, 768, 736, 612, 859, 973, 64, 312, 449, 38, 839, 807, 571, 83, 862, 1015, 333, 818, 173, 396, 520, 171, 678, 160, 203, 991, 549, 776, 524, 390, 228, 576, 307, 1005, 93, 893, 475, 451, 141, 98, 439, 95, 104, 739, 630, 275, 701, 722, 16, 207, 468, 310, 387, 217, 377, 684, 969, 396, 1010, 866, 914, 181, 621, 995, 831, 278, 530, 465, 745, 704, 762, 545, 544}, + 90: []int64{6, 644, 90, 376, 809, 98, 902, 998, 526, 633, 973, 1019, 423, 410, 219, + 879, 566, 390, 109, 450, 489, 341, 61, 465, 29, 893, 134, 1022, 703, 73, 477, 976, + 172, 175, 65, 696, 410, 566, 430, 187, 300, 542, 305, 751, 606, 567, 905, 70, 369, + 524, 913, 829, 351, 456, 295, 29, 539, 694, 620, 1010, 441, 904, 706, 954, 777, 221, + 497, 586, 456, 694, 183, 631, 302, 391, 857, 864, 610, 880, 906, 299, 839, 399, 49, + 713, 220, 903, 788, 228, 256, 119, 562, 395, 991, 543, 205, 584, 130, 804, 70, 99, + }, + 7: []int64{1406, 1419, 1426, 1412, 1413, 1408, 1472, 1426, 1462, 1424, 1447, 1403, 1433, 1429, 1420, 1395, 1447, 1396, 1406, 1413, + 1432, 1420, 1425, 1411, 1432, 1437, 1444, 1407, 1448, 1450, 1477, 1431, 1451, 1437, 1403, 1459, 1478, 1452, 1447, 1446, + 1410, 1441, 1445, 1415, 1433, 1435, 1458, 1419, 1441, 1476, 1310, 1482, 1451, 1458, 1455, 1428, 1446, 1443, 1436, 1449, + 1422, 1394, 1424, 1402, 1417, 1410, 1419, 1432, 1446, 1421, 1440, 1430, 1406, 1463, 1448, 1446, 1432, 1435, 1465, 1484, + 1443, 1451, 1414, 1446, 1412, 1429, 1442, 1424, 1497, 1458, 1490, 1463, 1533, 1482, 1473, 1468, 1467, 294, 294, 293, + }, + 8: []int64{6539, 7702, 6548, 8268, 6700, 7397, 6790, 7898, 6476, 6905, 6238, 7278, 6627, 7807, 5958, 6792, 6036, 6789, 6141, 7983, + 7889, 6401, 5709, 6512, 5807, 7728, 5975, 6809, 6144, 7257, 8149, 7885, 6501, 8131, 7308, 6462, 8264, 8044, 6631, 7954, + 7046, 7166, 6704, 7344, 6438, 6346, 6730, 6478, 6916, 7791, 6944, 6179, 7985, 6202, 6726, 8141, 6854, 9215, 6561, 6467, + 6547, 7569, 6386, 7388, 7036, 6134, 6651, 7371, 6545, 11069, 6235, 6345, 6048, 8274, 6422, 7397, 6544, 6905, 7577, 7600, + 5693, 8974, 6178, 6603, 6656, 7968, 7048, 7406, 6370, 7129, 5815, 7886, 6045, 8873, 6834, 7219, 6213, 1852, 583, 753, + }, + 16: []int64{6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, + 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, + 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, + 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, + 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 6428, 100, 100, 100, + }, + 17: []int64{14, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 14, 14, 14, + 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 14, 15, 14, 15, 14, 16, 15, 14, 15, + 15, 14, 14, 15, 14, 14, 15, 14, 15, 15, 15, 14, 17, 13, 15, 14, 14, 21, 15, 14, + 14, 15, 14, 15, 15, 14, 14, 14, 14, 21, 14, 14, 14, 14, 14, 14, 14, 14, 15, 14, + 14, 21, 14, 14, 15, 14, 15, 14, 15, 14, 14, 15, 15, 20, 15, 14, 14, 253, 184, 198, + }, + 18: []int64{2805, 3008, 2834, 2990, 2887, 2897, 2838, 2978, 2875, 2848, 2889, 2868, 2799, 3006, 2816, 2871, 2885, 2862, 2764, 2979, + 2813, 2966, 2885, 2841, 2816, 3021, 2825, 2884, 2896, 2868, 3005, 2990, 2858, 3027, 2985, 2878, 3136, 3049, 2840, 3057, + 2932, 2952, 2886, 3029, 2822, 2907, 2908, 2846, 2885, 3019, 2957, 2938, 3268, 2858, 2922, 3005, 2894, 4130, 2912, 2893, + 2877, 3010, 2896, 3021, 2943, 2885, 2873, 2961, 2870, 4165, 2865, 2906, 2835, 3017, 2871, 2934, 2842, 2883, 2955, 2996, + 2852, 4035, 2909, 2881, 2864, 3050, 2947, 2936, 2978, 2983, 2850, 3069, 2881, 4073, 3006, 2929, 2824, 549, 402, 429, + }, + 19: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + }, + 20: []int64{196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 4, 4, 4, + }, + 22: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 30: []int64{71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71098368, 71100416, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 14680064, 14680064, 14680064, + }, + 31: []int64{71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, 71094272, + 71094272, 71094272, 71094272, 71094272, 71098368, 71098368, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 71102464, 14680064, 14680064, 14680064, + }, + 34: []int64{11984984, 12310048, 12089852, 11869644, 12131784, 11754300, 11806732, 11460704, 12268108, 12656084, 13316684, 12509284, 12362480, 12435872, 12236644, 11733332, 12320532, 11712352, 12194704, 11743820, + 11785764, 12603648, 12750452, 13044056, 12456848, 12194700, 12268112, 12519768, 12142276, 12456848, 12760936, 11995480, 11680904, 12477824, 13872424, 13117456, 12372964, 12855352, 12687536, 12551220, + 13253768, 12771416, 12026932, 11901100, 11796248, 12488304, 12530248, 13285224, 12729480, 12792396, 12918224, 12404420, 12844828, 12718996, 12792388, 12561704, 12016444, 12289072, 14312828, 13411048, + 12110816, 12089848, 11722844, 13002108, 13222312, 12656076, 12477820, 11953532, 12047904, 12760936, 13201340, 13106960, 12404420, 12561712, 12939200, 12582680, 12561704, 12142280, 12970648, 13138420, + 12477820, 12771420, 12519764, 12823848, 12456848, 13211828, 11984992, 12603648, 12698016, 12257620, 12729476, 12802884, 12519764, 12823852, 13379596, 12844820, 12624624, 4236240, 4341100, 4487900, + }, + 35: []int64{17406204, 17070628, 16022008, 16630184, 16797952, 14962948, 16493868, 15319468, 16672116, 17773168, 17500540, 16829408, 16493868, 15759872, 16042976, 17028680, 16892368, 15665488, 15749384, 16284196, + 15906708, 16850420, 18486248, 17668348, 17049608, 16441444, 16294680, 17332768, 17479532, 15382380, 15581652, 15455820, 17479532, 16147880, 18286976, 16609288, 16567348, 17343296, 16567264, 16619700, + 17374668, 17678756, 16703620, 17206936, 16735036, 16818920, 19377496, 18979120, 17668268, 16777024, 17227912, 17133576, 18444296, 17699768, 17133580, 16819008, 15508208, 18182080, 18958024, 17636860, + 16389092, 17227948, 15340432, 17951424, 19398464, 17867580, 16525400, 15969576, 16567272, 17322240, 18265960, 17217380, 16514832, 17123012, 16651156, 17217388, 17752164, 16797996, 17301312, 16965768, + 16640752, 17353780, 19786396, 16472900, 16756008, 16923780, 17343212, 17490056, 17825596, 15896180, 17500496, 18905632, 16913372, 17374748, 18737944, 17007748, 17196492, 5955908, 5221904, 5515508, + }, + 38: []int64{1224116, 1224140, 1224660, 1224576, 1224544, 1224472, 1224420, 1224404, 1224376, 1224348, 1224308, 1222636, 1221028, 1221104, 1219004, 1217960, 1217928, 1215552, 1215528, 1215884, + 1214788, 1214688, 1214632, 1214608, 1214404, 1214264, 1214148, 1214616, 1214152, 1214096, 1214064, 1214036, 1213972, 1213888, 1213556, 1213292, 1213264, 1213196, 1212664, 1211552, + 1211516, 1206068, 1206108, 1206048, 1205820, 1205496, 1205492, 1205468, 1204548, 1204572, 1204492, 1204240, 1204980, 1204828, 1204776, 1204740, 1204732, 1204696, 1204460, 1204440, + 1204424, 1204380, 1204336, 1204072, 1204016, 1203940, 1203892, 1203844, 1203796, 1203720, 1203688, 1203076, 1203056, 1203128, 1203084, 1203028, 1203740, 1203624, 1203580, 1203552, + 1203516, 1203448, 1201708, 1201616, 1201612, 1201516, 1201692, 1201520, 1201452, 1201384, 1198548, 1198516, 1198472, 1198576, 1198560, 1196536, 1196512, 0, 0, 0, + }, + 39: []int64{1224732, 1225764, 1224908, 1224660, 1224576, 1224544, 1224464, 1224420, 1224404, 1224376, 1224352, 1224320, 1223000, 1221336, 1221104, 1219004, 1217960, 1217728, 1215548, 1216128, + 1215840, 1214712, 1214656, 1214632, 1215200, 1214432, 1215632, 1215088, 1214612, 1214152, 1214092, 1214060, 1214032, 1213968, 1213888, 1213320, 1213612, 1213536, 1213176, 1212660, + 1211548, 1208264, 1206156, 1206080, 1205844, 1205812, 1205496, 1206136, 1205884, 1204784, 1204532, 1206052, 1205248, 1204968, 1204824, 1204780, 1204752, 1204740, 1204700, 1204460, + 1204796, 1204708, 1204376, 1204604, 1204268, 1203996, 1203908, 1203888, 1203824, 1203740, 1204148, 1203772, 1203408, 1203360, 1203124, 1203084, 1204252, 1203740, 1203620, 1203584, + 1203572, 1203516, 1203440, 1201708, 1201980, 1201896, 1201856, 1201540, 1201504, 1201448, 1201372, 1198532, 1198856, 1198604, 1198576, 1196552, 1196904, 0, 0, 0, + }, + 41: []int64{1055608, 1055673, 1055611, 1055552, 1055515, 1055476, 1055412, 1055381, 1055362, 1055339, 1055315, 1054702, 1054162, 1053129, 1053072, 1053034, 1053001, 1052964, 1052902, 1053140, + 1053065, 1052986, 1052956, 1052937, 1053154, 1053106, 1053207, 1053163, 1053114, 1053076, 1053048, 1053021, 1052985, 1052934, 1052884, 1052877, 1053076, 1053086, 1053020, 1052979, + 1052925, 1052908, 1052834, 1052773, 1052745, 1052715, 1052707, 1052783, 1052930, 1052939, 1052823, 1052902, 1052858, 1052810, 1052757, 1052723, 1052703, 1052680, 1052659, 1052649, + 1052844, 1052912, 1052870, 1052881, 1052877, 1052824, 1052791, 1052763, 1052717, 1052664, 1052715, 1052572, 1052357, 1052434, 1052378, 1052343, 1052500, 1052423, 1052385, 1052362, + 1052328, 1052257, 1051141, 1050565, 1050688, 1050780, 1050854, 1050744, 1050700, 1050671, 1050642, 1050621, 1050643, 1050660, 1050640, 1050610, 1050777, 0, 0, 0, + }, + 42: []int64{1055340, 1055544, 1055588, 1055528, 1055500, 1055440, 1055388, 1055376, 1055348, 1055328, 1055304, 1054396, 1052844, 1053096, 1053052, 1053016, 1052988, 1052920, 1052896, 1053104, + 1053060, 1052976, 1052948, 1052932, 1052864, 1053084, 1053024, 1053136, 1053100, 1053060, 1053032, 1053012, 1052968, 1052892, 1052880, 1052864, 1052844, 1053060, 1053004, 1052944, + 1052912, 1052788, 1052812, 1052760, 1052732, 1052708, 1052704, 1052684, 1052716, 1052880, 1052808, 1052780, 1052844, 1052784, 1052740, 1052712, 1052692, 1052664, 1052652, 1052644, + 1052640, 1052896, 1052852, 1052808, 1052852, 1052808, 1052784, 1052748, 1052704, 1052656, 1052632, 1052176, 1052164, 1052408, 1052364, 1052320, 1052444, 1052396, 1052368, 1052344, + 1052312, 1052244, 1050592, 1050528, 1050524, 1050756, 1050812, 1050736, 1050684, 1050656, 1050632, 1050616, 1050572, 1050648, 1050632, 1050604, 1050588, 0, 0, 0, + }, + 43: []int64{1055696, 1056120, 1055628, 1055588, 1055528, 1055500, 1055432, 1055388, 1055376, 1055348, 1055328, 1055308, 1054744, 1053152, 1053096, 1053052, 1053016, 1052988, 1052916, 1053220, + 1053072, 1053000, 1052968, 1052948, 1053416, 1053128, 1053340, 1053208, 1053136, 1053100, 1053056, 1053028, 1053008, 1052964, 1052892, 1052884, 1053172, 1053112, 1053040, 1053000, + 1052940, 1053068, 1052856, 1052792, 1052752, 1052724, 1052708, 1053040, 1053028, 1052968, 1052844, 1052988, 1052876, 1052832, 1052780, 1052732, 1052712, 1052692, 1052664, 1052652, + 1052976, 1052924, 1052892, 1053072, 1052904, 1052840, 1052800, 1052780, 1052728, 1052668, 1052884, 1052676, 1052504, 1052468, 1052404, 1052364, 1052556, 1052444, 1052392, 1052368, + 1052348, 1052308, 1052236, 1050592, 1050860, 1050808, 1050944, 1050752, 1050724, 1050680, 1050648, 1050624, 1050824, 1050672, 1050648, 1050612, 1050948, 0, 0, 0, + }, + 71: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 72: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 91: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 92: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 99: []int64{69960688, 69959600, 69960228, 69960116, 69960688, 69960736, 69959156, 69959576, 69960484, 69959796, 69957320, 69958684, 69961812, 69962888, 69964840, 69965848, 69965972, 69966228, 69968528, 69969252, + 69969080, 69968724, 69970196, 69969716, 69969888, 69970532, 69967824, 69967952, 69967564, 69967904, 69967848, 69967588, 69967500, 69966760, 69967660, 69968544, 69968168, 69966496, 69965724, 69965868, + 69965816, 69966268, 69968824, 69969272, 69968828, 69969344, 69969496, 69968924, 69969160, 69970168, 69970320, 69969004, 69969592, 69969720, 69970316, 69969928, 69969808, 69969612, 69969896, 69970544, + 69970444, 69971520, 69974856, 69972324, 69973136, 69974292, 69975128, 69976984, 69976008, 69975604, 69974656, 69975084, 69974348, 69973416, 69972924, 69972828, 69972744, 69972144, 69971712, 69971752, + 69972212, 69973544, 69973784, 69975728, 69975584, 69979180, 69981700, 69986452, 69987628, 69988032, 69985860, 69985764, 69985400, 69984384, 69983756, 69983760, 69983452, 14680064, 14680064, 14680064, + }, + 100: []int64{69963068, 69962232, 69962076, 69962484, 69963332, 69962460, 69962284, 69961492, 69962064, 69961940, 69960848, 69963564, 69965540, 69964756, 69967632, 69967936, 69967904, 69969332, 69969792, 69970912, + 69972048, 69971304, 69971508, 69971548, 69972064, 69972608, 69971052, 69969968, 69968996, 69969416, 69969212, 69968836, 69969444, 69968496, 69969572, 69969964, 69969912, 69970156, 69967196, 69967908, + 69967208, 69971704, 69970876, 69970952, 69971680, 69971172, 69970660, 69970884, 69971432, 69971980, 69971460, 69972160, 69971432, 69971556, 69971820, 69971812, 69971924, 69971856, 69972396, 69972084, + 69972636, 69975972, 69976760, 69974320, 69975224, 69976312, 69977512, 69978932, 69978144, 69976904, 69976420, 69976648, 69976040, 69975928, 69975108, 69974296, 69974592, 69973736, 69973496, 69973216, + 69973868, 69974892, 69977532, 69976804, 69981496, 69980680, 69985564, 69988184, 69988860, 69988992, 69989032, 69987924, 69987492, 69986820, 69984960, 69985268, 69985340, 14680064, 14680064, 14680064, + }, + 102: []int64{3492918, 3493174, 3492757, 3492740, 3493216, 3493191, 3493195, 3493207, 3493435, 3493248, 3492551, 3493147, 3493026, 3492751, 3492580, 3492757, 3492723, 3492774, 3492555, 3493055, + 3492784, 3492681, 3493216, 3492830, 3492892, 3492948, 3493046, 3493060, 3493087, 3492704, 3492637, 3492534, 3492642, 3492200, 3491916, 3492401, 3492365, 3492496, 3492244, 3492346, + 3492494, 3492328, 3492643, 3492845, 3492800, 3492768, 3492817, 3492966, 3492993, 3492775, 3492814, 3492854, 3492624, 3492659, 3492556, 3492909, 3492991, 3492511, 3492570, 3492676, + 3493124, 3493161, 3492891, 3492730, 3492821, 3492603, 3492387, 3492922, 3492765, 3492628, 3492580, 3492887, 3493048, 3492725, 3492645, 3492413, 3492408, 3492389, 3492519, 3492265, + 3492381, 3492345, 3492567, 3492055, 3492620, 3492210, 3492316, 3492033, 3491852, 3492023, 3492222, 3492334, 3492414, 3492141, 3492333, 3492270, 3492054, 99800, 99966, 100021, + }, + 103: []int64{3491848, 3492168, 3491848, 3491912, 3492200, 3492136, 3492088, 3491976, 3492280, 3492072, 3491768, 3491880, 3491992, 3491736, 3491608, 3491704, 3491720, 3491688, 3491400, 3492008, + 3491704, 3491496, 3491944, 3491672, 3491816, 3491640, 3491864, 3492152, 3491896, 3491336, 3491176, 3491016, 3491640, 3491112, 3490792, 3491272, 3491448, 3491592, 3491192, 3491352, + 3491320, 3491480, 3491416, 3491848, 3491864, 3491528, 3491832, 3491544, 3491624, 3491720, 3491656, 3491656, 3491464, 3491624, 3491608, 3492024, 3491960, 3491688, 3491112, 3491496, + 3491928, 3492040, 3491688, 3491400, 3491480, 3491528, 3491352, 3492152, 3491736, 3491348, 3491540, 3491764, 3491956, 3491508, 3491412, 3491316, 3491348, 3491460, 3491508, 3491348, + 3491172, 3491092, 3491288, 3490760, 3491264, 3491200, 3490984, 3490696, 3490568, 3490648, 3490824, 3491256, 3491240, 3491064, 3491192, 3491240, 3490744, 99416, 99752, 99704, + }, + 104: []int64{3494248, 3494072, 3493528, 3493720, 3494312, 3494168, 3494232, 3494216, 3494440, 3494360, 3493752, 3494504, 3494296, 3493784, 3493864, 3494424, 3493848, 3494056, 3493704, 3494152, + 3494024, 3493976, 3494216, 3493864, 3493912, 3494104, 3494264, 3494168, 3494248, 3493736, 3493960, 3494008, 3493464, 3493352, 3493128, 3493672, 3493528, 3493336, 3493336, 3493304, + 3493496, 3493288, 3493720, 3494040, 3493896, 3494104, 3494120, 3494264, 3494280, 3493880, 3493896, 3493928, 3493832, 3493720, 3493592, 3493816, 3493912, 3493496, 3493912, 3493672, + 3494024, 3494168, 3494264, 3493768, 3493832, 3493544, 3493480, 3494008, 3493768, 3493700, 3493556, 3493988, 3494212, 3494020, 3493828, 3493748, 3493476, 3493364, 3493556, 3493188, + 3493604, 3493576, 3493864, 3492936, 3493728, 3493120, 3493336, 3493016, 3492952, 3493080, 3493336, 3493352, 3493448, 3493144, 3493640, 3493320, 3493560, 100088, 100312, 100392, + }, + 105: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 106: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 107: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 108: []int64{254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, + 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, + 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, + 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, + 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 254812160, 14680064, 14680064, 14680064, + }, + 109: []int64{72669509, 72669222, 72668798, 72669432, 72669934, 72669814, 72668820, 72668626, 72669167, 72669100, 72667309, 72669518, 72671803, 72671876, 72674528, 72674987, 72675130, 72675893, 72677596, 72678840, + 72679130, 72678625, 72679555, 72679104, 72679477, 72680094, 72677130, 72677211, 72676337, 72676877, 72676613, 72676430, 72676661, 72675813, 72676695, 72677409, 72677011, 72676365, 72674592, 72674894, + 72674587, 72677618, 72677960, 72677989, 72678323, 72678753, 72677997, 72677835, 72677884, 72678533, 72678783, 72678153, 72678332, 72678647, 72679004, 72678684, 72678613, 72678731, 72678783, 72678797, + 72679536, 72682196, 72683921, 72681372, 72682292, 72682820, 72684300, 72686184, 72685409, 72684595, 72683952, 72683983, 72683356, 72682772, 72682415, 72681736, 72681594, 72680926, 72680580, 72680310, + 72681090, 72682132, 72684368, 72684699, 72688731, 72688798, 72693599, 72696711, 72697646, 72697938, 72696678, 72696250, 72695584, 72694773, 72693560, 72693871, 72693294, 14715452, 14715452, 14715452, + }, + 111: []int64{30656722, 31076179, 30770388, 30592011, 30996556, 30532182, 30390123, 30352947, 30675033, 31077121, 31877885, 31308104, 30952698, 30718327, 30548242, 30083717, 31245735, 30332823, 30207174, 30364905, + 30279320, 31032211, 32115237, 32021915, 30972413, 30812060, 30826516, 30672099, 30929837, 30838081, 30966531, 30490329, 30788887, 30599961, 32589503, 31589096, 31232156, 31685175, 31359139, 30879847, + 31365331, 31837189, 30903611, 30615977, 30361114, 31113485, 32588192, 31584467, 31259797, 31681825, 31810135, 31252656, 32144658, 31630300, 31588314, 31299303, 30411427, 31516131, 32632526, 31501616, + 30845373, 30970138, 30053117, 30947587, 31970379, 31453594, 31041957, 30678159, 30610308, 31591595, 32223776, 31467215, 30827138, 31322148, 31453916, 31040880, 31097992, 30641493, 31552559, 31244155, + 31054060, 31418432, 32604574, 31275788, 31245161, 31354098, 31005407, 30914706, 31448268, 30663530, 31529169, 32255806, 30915270, 31310240, 33316725, 31639878, 31426836, 4947895, 4803891, 4987044, + }, + 112: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 138: []int64{2230, 2625, 2415, 2525, 2444, 2452, 2567, 2789, 2390, 2748, 2639, 2602, 2475, 2902, 2513, 2845, 2500, 2471, 2566, 2865, + 2526, 2841, 2714, 2647, 2494, 2871, 2693, 2910, 2601, 2731, 2697, 2840, 2662, 3119, 3002, 2612, 2718, 3016, 2735, 2919, + 2864, 2973, 2713, 2782, 2290, 2544, 2365, 2346, 2323, 2851, 3113, 2561, 4712, 2480, 2570, 2801, 2484, 3698, 2650, 2606, + 2280, 2781, 2703, 2796, 2532, 2595, 2507, 2814, 2586, 3219, 2737, 2762, 2744, 2960, 2701, 2893, 2488, 2716, 3324, 2887, + 2641, 3578, 2718, 2797, 2781, 2970, 2637, 2917, 2638, 2763, 2521, 3081, 2977, 3492, 2563, 2511, 2277, 573, 296, 401, + }, + 139: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 152: []int64{1504328, 1575229, 1508808, 1539050, 1521242, 1501829, 1575085, 1588140, 1552456, 1612624, 1639628, 1537009, 1757880, 1629266, 1527363, 1627738, 1527973, 1533938, 1570509, 1570986, + 1567765, 1572046, 1611014, 1541704, 1585722, 1563972, 1559854, 1705802, 1580902, 1568416, 1592145, 1537276, 1605016, 1667988, 1727917, 1565331, 2161135, 1638339, 1562243, 1661089, + 1584488, 1584636, 1629115, 1601832, 1541515, 1597786, 1614639, 1601248, 1554451, 1760051, 2052848, 1585702, 3227857, 1567160, 1637085, 1542094, 1563545, 3143052, 1671157, 1556602, + 1595426, 1539979, 1573539, 1627501, 1602214, 1524304, 1528918, 1558122, 1587828, 2854876, 1617354, 1588144, 1562083, 1557448, 1583029, 1592644, 1552987, 1506212, 2721076, 1575108, + 1580946, 3205255, 1625244, 1557114, 1644929, 1716253, 1653792, 1612237, 1629766, 1748134, 1720512, 1606758, 1851552, 2960837, 1868642, 1616094, 1552098, 588169, 567729, 571114, + }, + 153: []int64{1210, 1210, 1212, 1214, 1206, 1224, 1224, 1202, 1190, 1332, 1260, 1186, 1256, 1292, 1290, 1238, 1256, 1204, 1280, 1200, + 1232, 1208, 1238, 1212, 1212, 1232, 1206, 1242, 1188, 1256, 1218, 1214, 1194, 1290, 1218, 1186, 1254, 1216, 1194, 1242, + 1202, 1212, 1316, 1230, 1180, 1262, 1730, 1204, 1238, 1222, 1204, 1376, 1418, 1238, 1208, 1218, 1208, 5360, 1204, 1222, + 1192, 1192, 1220, 1327, 1178, 1224, 1218, 1240, 1188, 5604, 1210, 1224, 1203, 1244, 1244, 1210, 1244, 1206, 1234, 1180, + 1226, 5422, 1268, 1188, 1216, 1222, 1196, 1200, 1240, 1198, 1208, 1206, 1254, 5459, 1234, 1180, 1388, 0, 0, 0, + }, + 157: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 159: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, +} + +var ClusterMetricData = map[int32][]int64{ + 6: []int64{2660, 2642, 2704, 2653, 2610, 2679, 2637, 2688, 2575, 2703, 2546, 2629, 2689, 2653, 2564, 2717, 2545, 2613, 2672, 2767, + 2549, 2648, 2535, 2618, 2693, 2635, 2584, 2684, 2585, 2770, 2655, 2721, 2665, 2804, 2563, 2920, 2718, 2661, 2741, 2731, + 2617, 2692, 2716, 2627, 2612, 2725, 2536, 2705, 2757, 2741, 2574, 3086, 2513, 2748, 2689, 2678, 3847, 2742, 2552, 2672, + 2731, 2667, 2717, 2727, 2570, 2687, 2650, 2702, 3887, 2694, 2583, 2679, 2687, 2690, 2664, 2668, 2592, 2809, 2669, 2610, + 3783, 2672, 2576, 2705, 2693, 2768, 2665, 2764, 2666, 2684, 2743, 2721, 3745, 2817, 2626, 2643}, + 98: []int64{80966231, 80972025, 80967147, 80971805, 80971461, 80960856, 80971698, 80968629, 80966792, 80968280, 80965688, 80968160, 80972184, 80967234, 80974374, 80973069, 80969175, 80972462, 80974107, 80971158, + 80973760, 80971466, 80972732, 80976757, 80968959, 80978902, 80973979, 80970096, 80972837, 80971344, 80970522, 80978912, 80973926, 80974815, 80982004, 80972623, 80975529, 80975408, 80974234, 80981847, + 80980402, 80980768, 80982646, 80978686, 80982500, 80984391, 80977749, 80983381, 80981437, 80983425, 80983920, 80977214, 80980461, 80983718, 80975363, 80982565, 80988168, 80977604, 80981236, 80977706, + 80983249, 80985807, 80977272, 80983595, 80987325, 80979731, 80987109, 80984116, 80986864, 80984657, 80983357, 80984733, 80983009, 80974655, 80981406, 80980158, 80977819, 80984935, 80980954, 80983489, + 80994774, 80985680, 80987050, 80996748, 80987352, 80996335, 80992486, 80991240, 80998195, 80990395, 80995222, 80997350, 80996714, 80992828, 80995344, 80991168}, + 29: []int64{73268364, 73268360, 73268358, 73268390, 73268427, 73268473, 73268419, 73268500, 73268407, 73268923, 73268921, 73269517, 73269343, 73269023, 73269710, 73268886, 73269368, 73269205, 73268503, 73268660, + 73268870, 73268673, 73268345, 73268344, 73268321, 73268895, 73268583, 73268411, 73268513, 73268571, 73268623, 73268251, 73268411, 73268306, 73268250, 73268253, 73268309, 73268317, 73269368, 73271047, + 73269682, 73268469, 73268720, 73268828, 73269641, 73269243, 73268832, 73269108, 73269050, 73268848, 73268895, 73268571, 73268889, 73268510, 73268253, 73268887, 73268927, 73268972, 73268729, 73268308, + 73268357, 73268252, 73268253, 73268572, 73268261, 73268299, 73268252, 73269763, 73269479, 73268300, 73268898, 73269226, 73268552, 73268331, 73268615, 73268571, 73268839, 73268481, 73268792, 73269221, + 73268894, 73269185, 73269022, 73272474, 73273345, 73276979, 73277015, 73277311, 73277095, 73277128, 73276683, 73276603, 73276938, 73276502, 73276687, 73276890}, + 33: []int64{14802617, 14334048, 14652589, 14878941, 14109341, 14296412, 14128174, 14512681, 15409736, 15727532, 15005265, 14784211, 14444092, 14427274, 14440723, 14999719, 14227289, 14192172, 14367760, 14124191, + 15086676, 16296614, 15694711, 14773850, 14615508, 14579159, 14913646, 14818759, 14431242, 14649121, 14070432, 14769608, 14726241, 16565988, 15190989, 15156258, 15454480, 15236560, 14920029, 15467985, + 15690148, 14625978, 14627532, 14433452, 15056912, 16335706, 15852718, 15089894, 15188408, 15779104, 15033057, 15910760, 15677495, 15311713, 14893944, 14156923, 15382805, 16640532, 15618825, 14590669, + 14815275, 13882064, 15580462, 16066677, 15450425, 14709417, 14396746, 14410821, 15454994, 16150884, 15504171, 14596072, 15298748, 15116741, 14893971, 15254242, 14718071, 15552055, 15301147, 14657525, + 15188266, 16529916, 15247158, 14850729, 15175486, 14894463, 14965769, 15417648, 14307234, 15317129, 16306939, 14662144, 15226145, 17060333, 15423605, 15096561}, + 49: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 90: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 7: []int64{1419, 1426, 1412, 1413, 1408, 1472, 1426, 1462, 1424, 1447, 1403, 1433, 1429, 1420, 1395, 1447, 1396, 1406, 1413, 1432, + 1420, 1425, 1411, 1432, 1437, 1444, 1407, 1448, 1450, 1477, 1431, 1451, 1437, 1403, 1459, 1478, 1452, 1447, 1446, 1410, + 1441, 1445, 1415, 1433, 1435, 1458, 1419, 1441, 1476, 1310, 1482, 1451, 1458, 1455, 1428, 1446, 1443, 1436, 1449, 1422, + 1394, 1424, 1402, 1417, 1410, 1419, 1432, 1446, 1421, 1440, 1430, 1406, 1463, 1448, 1446, 1432, 1435, 1465, 1484, 1443, + 1451, 1414, 1446, 1412, 1429, 1442, 1424, 1497, 1458, 1490, 1463, 1533, 1482, 1473, 1468, 1467, 294, 294, 293, 0, + }, + 8: []int64{7702, 6548, 8268, 6700, 7397, 6790, 7898, 6476, 6905, 6238, 7278, 6627, 7807, 5958, 6792, 6036, 6789, 6141, 7983, 7889, + 6401, 5709, 6512, 5807, 7728, 5975, 6809, 6144, 7257, 8149, 7885, 6501, 8131, 7308, 6462, 8264, 8044, 6631, 7954, 7046, + 7166, 6704, 7344, 6438, 6346, 6730, 6478, 6916, 7791, 6944, 6179, 7985, 6202, 6726, 8141, 6854, 9215, 6561, 6467, 6547, + 7569, 6386, 7388, 7036, 6134, 6651, 7371, 6545, 11069, 6235, 6345, 6048, 8274, 6422, 7397, 6544, 6905, 7577, 7600, 5693, + 8974, 6178, 6603, 6656, 7968, 7048, 7406, 6370, 7129, 5815, 7886, 6045, 8873, 6834, 7219, 6213, 1852, 583, 753, 0, + }, + 9: []int64{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, + }, + 15: []int64{16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, + 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, + 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, + 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, + 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 16008, 4608, 4608, 4608, 0, + }, + 17: []int64{1855, 1834, 1862, 1838, 1821, 1849, 1840, 1848, 1815, 1852, 1785, 1825, 1867, 1838, 1792, 1869, 1785, 1816, 1863, 1889, + 1805, 1827, 1782, 1819, 1871, 1824, 1805, 1853, 1808, 1897, 1850, 1870, 1869, 1895, 1795, 1964, 1888, 1840, 1883, 1873, + 1820, 1852, 1876, 1827, 1830, 1875, 1783, 1860, 1907, 1884, 1807, 2046, 1773, 1888, 1865, 1850, 2686, 1882, 1787, 1846, + 1887, 1844, 1868, 1871, 1811, 1853, 1844, 1857, 2700, 1856, 1804, 1854, 1871, 1853, 1839, 1846, 1812, 1915, 1855, 1819, + 2646, 1849, 1798, 1855, 1872, 1891, 1853, 1894, 1852, 1855, 1890, 1876, 2635, 1918, 1830, 1827, 560, 424, 451, 0, + }, + 18: []int64{2745, 2574, 2728, 2623, 2638, 2583, 2711, 2612, 2594, 2616, 2601, 2536, 2746, 2556, 2605, 2627, 2593, 2500, 2714, 2551, + 2718, 2599, 2578, 2556, 2754, 2559, 2623, 2636, 2605, 2741, 2728, 2596, 2758, 2718, 2626, 2855, 2783, 2582, 2791, 2663, + 2683, 2619, 2764, 2556, 2648, 2642, 2580, 2626, 2764, 2686, 2677, 2974, 2597, 2663, 2737, 2633, 3805, 2649, 2633, 2613, + 2760, 2622, 2757, 2680, 2623, 2607, 2699, 2602, 3839, 2600, 2643, 2570, 2757, 2608, 2675, 2572, 2619, 2680, 2749, 2580, + 3712, 2635, 2619, 2597, 2783, 2681, 2684, 2702, 2718, 2585, 2802, 2617, 3739, 2738, 2666, 2565, 532, 386, 412, 0, + }, + 19: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + }, + 20: []int64{8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 0, + }, + 21: []int64{196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 4, 4, 4, 0, + }, + 22: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 27: []int64{29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, + 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, + 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, + 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, + 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 29682, 131, 131, 131, 0, + }, + 30: []int64{73268344, 73268280, 73268276, 73268344, 73268348, 73268280, 73268164, 73268236, 73268168, 73268232, 73268152, 73268232, 73268164, 73268236, 73268164, 73268244, 73268232, 73268232, 73268260, 73268256, + 73268328, 73268324, 73268256, 73268324, 73268232, 73268232, 73268232, 73268232, 73268232, 73268152, 73268164, 73268232, 73268232, 73268232, 73268164, 73268232, 73268164, 73268232, 73268236, 73271020, + 73268232, 73268236, 73268168, 73268232, 73268232, 73268236, 73268164, 73268232, 73268232, 73268232, 73268232, 73268232, 73268232, 73268232, 73268232, 73268232, 73268432, 73268396, 73268244, 73268232, + 73268232, 73268164, 73268232, 73268232, 73268236, 73268232, 73268232, 73268232, 73268232, 73268164, 73268232, 73269180, 73268232, 73268232, 73268232, 73268428, 73268248, 73268244, 73268232, 73268244, + 73268244, 73268180, 73268244, 73268248, 73272328, 73274396, 73276432, 73276432, 73276444, 73276424, 73276424, 73276424, 73276424, 73276344, 73276424, 73276424, 14890228, 14890228, 14890240, 0, + }, + 31: []int64{73268368, 73268372, 73268372, 73268568, 73269088, 73269596, 73270732, 73271360, 73270648, 73270648, 73271360, 73271128, 73270648, 73270652, 73271360, 73272952, 73270648, 73271460, 73270744, 73270744, + 73271452, 73270824, 73268432, 73268356, 73268928, 73270736, 73270736, 73270648, 73270976, 73270732, 73270648, 73268256, 73270648, 73268972, 73268300, 73268260, 73268648, 73268960, 73271048, 73271116, + 73272952, 73270492, 73270652, 73271360, 73272480, 73271084, 73271364, 73270652, 73270648, 73271360, 73271080, 73270648, 73270648, 73270168, 73268260, 73270840, 73271560, 73271136, 73270904, 73268840, + 73269812, 73268340, 73268256, 73270652, 73268344, 73268968, 73268260, 73273700, 73273612, 73268984, 73271852, 73269560, 73271360, 73269444, 73270892, 73270344, 73271104, 73271008, 73270988, 73271360, + 73271312, 73270796, 73273624, 73275220, 73274936, 73279560, 73278936, 73279296, 73278852, 73279436, 73278840, 73278840, 73279544, 73276620, 73278848, 73280600, 14890312, 14890240, 14891172, 0, + }, + 34: []int64{13573636, 13002248, 13232404, 13175356, 13275844, 13230176, 13127300, 13568144, 13612048, 14592480, 13627248, 13985164, 13411512, 13174864, 12907024, 13597756, 13035444, 13325464, 12784236, 13117220, + 14368280, 14369512, 14242768, 13654828, 13504268, 13671344, 13702612, 13565052, 13809900, 14009700, 13128836, 13452396, 13911836, 15183136, 14288752, 13997060, 14624404, 13999096, 13946744, 14215416, + 14398652, 13538060, 12956208, 13435088, 14117772, 13809576, 14619364, 14017428, 14045920, 14123604, 13776464, 14910084, 14461688, 14374812, 13518124, 13266716, 13290340, 15790532, 14513540, 13337576, + 13707496, 12310184, 14176152, 14751044, 14524840, 13523504, 13161340, 13209344, 14672408, 14764948, 14025352, 13578740, 13831184, 13996332, 14060404, 13740364, 13589484, 14216632, 13945008, 13504136, + 14340892, 14902536, 14285608, 13537676, 14050268, 12958476, 14072020, 13737044, 13660844, 14156448, 15279864, 13640448, 14496604, 15288784, 14111028, 13936984, 4518340, 4622284, 4559412, 0, + }, + 35: []int64{16451724, 15740832, 16075320, 16662552, 14687076, 15559032, 15035376, 15928468, 17382060, 17301940, 16063212, 15857696, 15416452, 15831532, 16184788, 16503796, 15361564, 15465240, 15591476, 15277916, + 16013604, 18002948, 16912700, 16135880, 16086316, 15500396, 17031640, 16554584, 15236076, 15360668, 15132064, 17019276, 16012024, 17925268, 16065972, 16684352, 16621572, 16073528, 16623412, 17827680, + 16495588, 15456200, 16758360, 15778444, 16543684, 18657400, 18034944, 16920652, 16651804, 17215456, 17034072, 17876912, 17218256, 16420608, 16388500, 14953544, 17862656, 17755284, 17335396, 15667204, + 16453040, 15328760, 17585044, 17356552, 16685544, 15928732, 15615012, 15483988, 16272684, 17680048, 17019220, 15510164, 16777088, 16537912, 15886852, 16338096, 15759460, 16660716, 17019064, 15951896, + 16177416, 18331856, 16097232, 15953764, 16517084, 16434732, 16266236, 16630780, 15445868, 16788272, 17628480, 16335328, 16473208, 18507932, 17039820, 17177604, 5901968, 5127288, 5483576, 0, + }, + 37: []int64{1133164, 1133556, 1132948, 1132536, 1132687, 1133608, 1133749, 1133162, 1133226, 1135034, 1132928, 1130504, 1130466, 1127930, 1127539, 1127419, 1126692, 1125126, 1123936, 1123639, + 1124080, 1123182, 1123585, 1123228, 1122690, 1125536, 1125400, 1126177, 1125636, 1125881, 1126043, 1125876, 1126648, 1125743, 1125018, 1125371, 1125976, 1127658, 1127351, 1127686, + 1124517, 1124154, 1124262, 1124115, 1123758, 1124131, 1124254, 1124213, 1123537, 1123298, 1123893, 1123808, 1123529, 1123294, 1123588, 1123590, 1123511, 1123305, 1123449, 1122702, + 1120122, 1118483, 1120873, 1120026, 1119508, 1118141, 1116332, 1117074, 1117943, 1118530, 1118493, 1119064, 1119641, 1119993, 1120578, 1120717, 1121297, 1121658, 1121876, 1121164, + 1120189, 1118066, 1117956, 1117838, 1118358, 1117828, 1115200, 1114318, 1114018, 1115218, 1115605, 1116157, 1116889, 1118043, 1117833, 1118344, 0, 0, 0, 0, + }, + 38: []int64{1132264, 1132876, 1132384, 1131660, 1131872, 1132060, 1133136, 1132780, 1132640, 1133488, 1131120, 1129464, 1129632, 1126672, 1127056, 1126920, 1125480, 1124752, 1123396, 1122604, + 1122968, 1122800, 1123056, 1122520, 1122064, 1123224, 1125052, 1125684, 1125204, 1125464, 1125496, 1125228, 1125624, 1125508, 1124612, 1124848, 1124632, 1127172, 1126804, 1127332, + 1124032, 1123832, 1123756, 1123700, 1123444, 1123928, 1123924, 1123364, 1122904, 1123072, 1123112, 1123276, 1123036, 1123052, 1123296, 1122964, 1123380, 1122864, 1122680, 1122496, + 1118300, 1117848, 1120032, 1119496, 1117980, 1117040, 1115356, 1116388, 1117464, 1118092, 1118000, 1118240, 1119296, 1119428, 1120028, 1119716, 1120656, 1120840, 1121528, 1120408, + 1119624, 1117096, 1117664, 1117132, 1117776, 1116904, 1114352, 1113940, 1113740, 1113848, 1115252, 1115068, 1116460, 1117764, 1117288, 1117388, 0, 0, 0, 0, + }, + 39: []int64{1134064, 1133888, 1133276, 1133192, 1133524, 1134976, 1134692, 1133616, 1133920, 1136052, 1135580, 1131236, 1130960, 1129384, 1127876, 1128104, 1127552, 1125508, 1124832, 1124620, + 1125204, 1123664, 1124280, 1123960, 1123272, 1126440, 1125924, 1126524, 1126032, 1126188, 1126616, 1126588, 1127508, 1126272, 1125348, 1126056, 1127596, 1128352, 1128132, 1128284, + 1125216, 1124744, 1124736, 1124616, 1124636, 1124380, 1124460, 1124596, 1124072, 1123452, 1124528, 1124260, 1123956, 1123600, 1123916, 1124012, 1123756, 1123820, 1123672, 1123008, + 1122752, 1119104, 1121480, 1120868, 1119976, 1119144, 1117272, 1117404, 1118668, 1119372, 1118868, 1119612, 1119992, 1120568, 1121432, 1121404, 1121876, 1121984, 1122428, 1121896, + 1120704, 1119616, 1118340, 1119168, 1118960, 1118660, 1115880, 1114716, 1114284, 1116084, 1116240, 1116992, 1117680, 1118596, 1118360, 1118904, 0, 0, 0, 0, + }, + 41: []int64{1055673, 1055611, 1055552, 1055515, 1055476, 1055412, 1055381, 1055362, 1055339, 1055315, 1054702, 1054162, 1053129, 1053072, 1053034, 1053001, 1052964, 1052902, 1053140, 1053065, + 1052986, 1052956, 1052937, 1053154, 1053106, 1053207, 1053163, 1053114, 1053076, 1053048, 1053021, 1052985, 1052934, 1052884, 1052877, 1053076, 1053086, 1053020, 1052979, 1052925, + 1052908, 1052834, 1052773, 1052745, 1052715, 1052707, 1052783, 1052930, 1052939, 1052823, 1052902, 1052858, 1052810, 1052757, 1052723, 1052703, 1052680, 1052659, 1052649, 1052844, + 1052912, 1052870, 1052881, 1052877, 1052824, 1052791, 1052763, 1052717, 1052664, 1052715, 1052572, 1052357, 1052434, 1052378, 1052343, 1052500, 1052423, 1052385, 1052362, 1052328, + 1052257, 1051141, 1050565, 1050688, 1050780, 1050854, 1050744, 1050700, 1050671, 1050642, 1050621, 1050643, 1050660, 1050640, 1050610, 1050777, 0, 0, 0, 0, + }, + 42: []int64{1055544, 1055588, 1055528, 1055500, 1055440, 1055388, 1055376, 1055348, 1055328, 1055304, 1054396, 1052844, 1053096, 1053052, 1053016, 1052988, 1052920, 1052896, 1053104, 1053060, + 1052976, 1052948, 1052932, 1052864, 1053084, 1053024, 1053136, 1053100, 1053060, 1053032, 1053012, 1052968, 1052892, 1052880, 1052864, 1052844, 1053060, 1053004, 1052944, 1052912, + 1052788, 1052812, 1052760, 1052732, 1052708, 1052704, 1052684, 1052716, 1052880, 1052808, 1052780, 1052844, 1052784, 1052740, 1052712, 1052692, 1052664, 1052652, 1052644, 1052640, + 1052896, 1052852, 1052808, 1052852, 1052808, 1052784, 1052748, 1052704, 1052656, 1052632, 1052176, 1052164, 1052408, 1052364, 1052320, 1052444, 1052396, 1052368, 1052344, 1052312, + 1052244, 1050592, 1050528, 1050524, 1050756, 1050812, 1050736, 1050684, 1050656, 1050632, 1050616, 1050572, 1050648, 1050632, 1050604, 1050588, 0, 0, 0, 0, + }, + 43: []int64{1056120, 1055628, 1055588, 1055528, 1055500, 1055432, 1055388, 1055376, 1055348, 1055328, 1055308, 1054744, 1053152, 1053096, 1053052, 1053016, 1052988, 1052916, 1053220, 1053072, + 1053000, 1052968, 1052948, 1053416, 1053128, 1053340, 1053208, 1053136, 1053100, 1053056, 1053028, 1053008, 1052964, 1052892, 1052884, 1053172, 1053112, 1053040, 1053000, 1052940, + 1053068, 1052856, 1052792, 1052752, 1052724, 1052708, 1053040, 1053028, 1052968, 1052844, 1052988, 1052876, 1052832, 1052780, 1052732, 1052712, 1052692, 1052664, 1052652, 1052976, + 1052924, 1052892, 1053072, 1052904, 1052840, 1052800, 1052780, 1052728, 1052668, 1052884, 1052676, 1052504, 1052468, 1052404, 1052364, 1052556, 1052444, 1052392, 1052368, 1052348, + 1052308, 1052236, 1050592, 1050860, 1050808, 1050944, 1050752, 1050724, 1050680, 1050648, 1050624, 1050824, 1050672, 1050648, 1050612, 1050948, 0, 0, 0, 0, + }, + 91: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 92: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 99: []int64{80955148, 80960404, 80957508, 80955548, 80957400, 80950612, 80956196, 80958740, 80954664, 80951436, 80955712, 80955416, 80957924, 80959820, 80956868, 80955900, 80960360, 80957508, 80957732, 80957688, + 80959004, 80958536, 80957416, 80963656, 80959360, 80961324, 80960448, 80959620, 80957772, 80962312, 80959300, 80965516, 80958040, 80961036, 80967952, 80962692, 80961740, 80960276, 80962328, 80963768, + 80969220, 80964288, 80966832, 80969276, 80967472, 80966404, 80967664, 80968120, 80969608, 80970192, 80967012, 80963952, 80963904, 80968148, 80969840, 80968256, 80971992, 80965796, 80967800, 80969552, + 80967412, 80971864, 80966940, 80966896, 80972116, 80967868, 80969156, 80971276, 80972072, 80968776, 80973300, 80966892, 80966320, 80968164, 80967288, 80966168, 80966892, 80971512, 80967080, 80970084, + 80979524, 80974924, 80972848, 80981664, 80977260, 80979240, 80982364, 80978940, 80979776, 80982316, 80979048, 80983128, 80978060, 80978928, 80982384, 80981824, 18079872, 18080924, 18080340, 0, + }, + 100: []int64{80996308, 81003320, 80991996, 81001012, 81007940, 80983840, 81010980, 80990568, 81003736, 81002540, 80987020, 80990684, 81000464, 80989804, 81013404, 81007044, 80992728, 81003756, 80996512, 81009852, + 81003316, 80996392, 80995840, 81005208, 80991676, 81015008, 81001284, 80992808, 80998680, 81006744, 81000124, 81007504, 81013256, 81010716, 81011904, 80995596, 81007392, 80999712, 80999676, 81005240, + 81000508, 81020312, 81008460, 81006528, 81001688, 81017056, 80995256, 81012348, 81003216, 81018092, 81018360, 81002940, 81017784, 81031588, 80990180, 81009528, 81020616, 81019428, 81003884, 81001308, + 81025468, 81010316, 80994628, 81013328, 81019276, 80998984, 81018968, 81005740, 81025968, 81007368, 81007112, 81017240, 81017928, 80988336, 81018752, 81007952, 81019756, 81022204, 81003308, 81016856, + 81021608, 81015380, 81012848, 81022628, 81009976, 81023636, 81018212, 81020392, 81021388, 81007928, 81025372, 81028804, 81037136, 81019656, 81018072, 81023468, 18107732, 18088460, 18093904, 0, + }, + 102: []int64{3493174, 3492757, 3492740, 3493216, 3493191, 3493195, 3493207, 3493435, 3493248, 3492551, 3493147, 3493026, 3492751, 3492580, 3492757, 3492723, 3492774, 3492555, 3493055, 3492784, + 3492681, 3493216, 3492830, 3492892, 3492948, 3493046, 3493060, 3493087, 3492704, 3492637, 3492534, 3492642, 3492200, 3491916, 3492401, 3492365, 3492496, 3492244, 3492346, 3492494, + 3492328, 3492643, 3492845, 3492800, 3492768, 3492817, 3492966, 3492993, 3492775, 3492814, 3492854, 3492624, 3492659, 3492556, 3492909, 3492991, 3492511, 3492570, 3492676, 3493124, + 3493161, 3492891, 3492730, 3492821, 3492603, 3492387, 3492922, 3492765, 3492628, 3492580, 3492887, 3493048, 3492725, 3492645, 3492413, 3492408, 3492389, 3492519, 3492265, 3492381, + 3492345, 3492567, 3492055, 3492620, 3492210, 3492316, 3492033, 3491852, 3492023, 3492222, 3492334, 3492414, 3492141, 3492333, 3492270, 3492054, 99800, 99966, 100021, 0, + }, + 103: []int64{3492168, 3491848, 3491912, 3492200, 3492136, 3492088, 3491976, 3492280, 3492072, 3491768, 3491880, 3491992, 3491736, 3491608, 3491704, 3491720, 3491688, 3491400, 3492008, 3491704, + 3491496, 3491944, 3491672, 3491816, 3491640, 3491864, 3492152, 3491896, 3491336, 3491176, 3491016, 3491640, 3491112, 3490792, 3491272, 3491448, 3491592, 3491192, 3491352, 3491320, + 3491480, 3491416, 3491848, 3491864, 3491528, 3491832, 3491544, 3491624, 3491720, 3491656, 3491656, 3491464, 3491624, 3491608, 3492024, 3491960, 3491688, 3491112, 3491496, 3491928, + 3492040, 3491688, 3491400, 3491480, 3491528, 3491352, 3492152, 3491736, 3491348, 3491540, 3491764, 3491956, 3491508, 3491412, 3491316, 3491348, 3491460, 3491508, 3491348, 3491172, + 3491092, 3491288, 3490760, 3491264, 3491200, 3490984, 3490696, 3490568, 3490648, 3490824, 3491256, 3491240, 3491064, 3491192, 3491240, 3490744, 99416, 99752, 99704, 0, + }, + 104: []int64{3494072, 3493528, 3493720, 3494312, 3494168, 3494232, 3494216, 3494440, 3494360, 3493752, 3494504, 3494296, 3493784, 3493864, 3494424, 3493848, 3494056, 3493704, 3494152, 3494024, + 3493976, 3494216, 3493864, 3493912, 3494104, 3494264, 3494168, 3494248, 3493736, 3493960, 3494008, 3493464, 3493352, 3493128, 3493672, 3493528, 3493336, 3493336, 3493304, 3493496, + 3493288, 3493720, 3494040, 3493896, 3494104, 3494120, 3494264, 3494280, 3493880, 3493896, 3493928, 3493832, 3493720, 3493592, 3493816, 3493912, 3493496, 3493912, 3493672, 3494024, + 3494168, 3494264, 3493768, 3493832, 3493544, 3493480, 3494008, 3493768, 3493700, 3493556, 3493988, 3494212, 3494020, 3493828, 3493748, 3493476, 3493364, 3493556, 3493188, 3493604, + 3493576, 3493864, 3492936, 3493728, 3493120, 3493336, 3493016, 3492952, 3493080, 3493336, 3493352, 3493448, 3493144, 3493640, 3493320, 3493560, 100088, 100312, 100392, 0, + }, + 105: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 106: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 107: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 108: []int64{100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, + 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, + 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, + 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, + 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 100443136, 33440768, 33440768, 33440768, 0, + }, + 109: []int64{72669222, 72668798, 72669432, 72669934, 72669814, 72668820, 72668626, 72669167, 72669100, 72667309, 72669518, 72671803, 72671876, 72674528, 72674987, 72675130, 72675893, 72677596, 72678840, 72679130, + 72678625, 72679555, 72679104, 72679477, 72680094, 72677130, 72677211, 72676337, 72676877, 72676613, 72676430, 72676661, 72675813, 72676695, 72677409, 72677011, 72676365, 72674592, 72674894, 72674587, + 72677618, 72677960, 72677989, 72678323, 72678753, 72677997, 72677835, 72677884, 72678533, 72678783, 72678153, 72678332, 72678647, 72679004, 72678684, 72678613, 72678731, 72678783, 72678797, 72679536, + 72682196, 72683921, 72681372, 72682292, 72682820, 72684300, 72686184, 72685409, 72684595, 72683952, 72683983, 72683356, 72682772, 72682415, 72681736, 72681594, 72680926, 72680580, 72680310, 72681090, + 72682132, 72684368, 72684699, 72688731, 72688798, 72693599, 72696711, 72697646, 72697938, 72696678, 72696250, 72695584, 72694773, 72693560, 72693871, 72693294, 14715452, 14715452, 14715452, 0, + }, + 110: []int64{96343490, 96342832, 96342800, 96342813, 96342773, 96342675, 96342782, 96342826, 96342815, 96342861, 96342789, 96341979, 96340788, 96342668, 96342873, 96342834, 96343836, 96344837, 96344957, 96344919, + 96344922, 96344913, 96344860, 96344784, 96342984, 96342845, 96342836, 96342835, 96342796, 96342736, 96342898, 96341904, 96340786, 96340814, 96340822, 96340680, 96340807, 96340771, 96340876, 96340861, + 96340790, 96342570, 96342010, 96340804, 96340866, 96340821, 96340878, 96340695, 96340747, 96340721, 96340671, 96340718, 96340694, 96340533, 96340689, 96340734, 96340601, 96342637, 96342677, 96342548, + 96341423, 96340784, 96340744, 96340733, 96340718, 96340553, 96340810, 96340796, 96338504, 96340784, 96340735, 96341365, 96342774, 96342974, 96342750, 96342740, 96342711, 96339961, 96338666, 96338781, + 96336571, 96338619, 96338627, 96338497, 96339187, 96340659, 96341191, 96340702, 96340668, 96340546, 96340669, 96340734, 96339668, 96341872, 96340711, 96340541, 31694132, 31694104, 31694086, 0, + }, + 111: []int64{35632290, 35304782, 35227097, 35519814, 35125423, 34976530, 34924498, 35243128, 35664707, 36446316, 35876655, 35535231, 35289302, 35106530, 34678142, 35814198, 34900775, 34783747, 34930870, 34849678, + 35598604, 36742932, 36565451, 35517423, 35388206, 35389394, 35231873, 35493640, 35414609, 35526398, 35058473, 35362573, 35161627, 37159410, 36158944, 35771391, 36214553, 35906735, 35450783, 35904378, + 36413394, 35474727, 35190698, 34936447, 35688174, 37181402, 36150647, 35858610, 36253248, 36363912, 35830285, 36718428, 36200915, 36164304, 35874877, 34981992, 36086876, 37201282, 36061698, 35405163, + 35497549, 34623703, 35548273, 36554619, 36022158, 35613522, 35251515, 35192877, 36187359, 36897172, 35976279, 35386235, 35895938, 36021694, 35603572, 35667641, 35231012, 36123482, 35816696, 35626919, + 35994572, 37177668, 35848603, 35831990, 35926579, 35576224, 35488252, 35996734, 35238379, 36125143, 36828845, 35485371, 35885228, 37879992, 36198896, 35990422, 6872535, 6728553, 6911962, 0, + }, + 112: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 138: []int64{2696, 2502, 2601, 2536, 2519, 2635, 2854, 2456, 2870, 2725, 2702, 2544, 3016, 2605, 2896, 2610, 2536, 2614, 2979, 2597, + 2915, 2805, 2712, 2560, 2940, 2773, 3052, 2688, 2800, 2765, 2964, 2692, 3180, 3094, 2709, 2784, 3084, 2804, 2980, 2969, + 3072, 2794, 2890, 2363, 2617, 2474, 2405, 2394, 2921, 3178, 2663, 4804, 2547, 2631, 2915, 2554, 4245, 2754, 2678, 2350, + 2891, 2771, 2865, 2622, 2703, 2574, 2899, 2658, 3804, 2875, 2813, 2824, 3045, 2767, 2961, 2576, 2811, 3421, 2954, 2718, + 4225, 2811, 2863, 2896, 3039, 2705, 2992, 2736, 2877, 2591, 3146, 3090, 4025, 2644, 2625, 2336, 580, 302, 408, 0, + }, + 139: []int64{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, + }, + 150: []int64{768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 256000, 256000, 256000, 0, + }, + 151: []int64{768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, + 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 768000, 256000, 256000, 256000, 0, + }, + 152: []int64{2213, 2079, 2147, 2099, 2074, 2207, 2243, 2166, 2281, 2328, 2138, 2557, 2312, 2132, 2297, 2117, 2136, 2198, 2207, 2191, + 2212, 2273, 2153, 2224, 2200, 2173, 2464, 2212, 2204, 2239, 2143, 2259, 2392, 2422, 2161, 3320, 2306, 2153, 2355, 2193, + 2206, 2286, 2235, 2130, 2214, 2262, 2225, 2141, 2546, 3101, 2206, 5338, 2174, 2298, 2126, 2158, 4908, 2354, 2179, 2253, + 2143, 2207, 2318, 2225, 2115, 2121, 2181, 2232, 4384, 2284, 2241, 2183, 2185, 2218, 2250, 2158, 2083, 4414, 2212, 2222, + 5061, 2300, 2184, 2339, 2374, 2237, 2267, 2241, 2396, 2467, 2248, 2686, 4545, 2561, 2263, 2135, 580, 561, 564, 0, + }, + 153: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 157: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 158: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 159: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 256: []int64{245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + }, + 257: []int64{9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + }, + 258: []int64{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }, + 259: []int64{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }, + 260: []int64{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + }, + 261: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 262: []int64{8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + }, + 263: []int64{227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + }, + 264: []int64{9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + }, + 265: []int64{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + }, + 266: []int64{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + }, + 267: []int64{95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + }, + 268: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 269: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 270: []int64{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + }, + 271: []int64{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }, + 272: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 273: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 274: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 275: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 2: []int64{1662, 1651, 1690, 1658, 1631, 1674, 1648, 1680, 1609, 1689, 1591, 1643, 1680, 1658, 1602, 1698, 1590, 1633, 1670, 1729, + 1593, 1655, 1584, 1636, 1683, 1646, 1615, 1677, 1615, 1731, 1659, 1700, 1665, 1752, 1601, 1825, 1698, 1663, 1713, 1706, + 1635, 1682, 1697, 1641, 1632, 1703, 1585, 1690, 1723, 1713, 1608, 1928, 1570, 1717, 1680, 1673, 2404, 1713, 1595, 1670, + 1706, 1666, 1698, 1704, 1606, 1679, 1656, 1688, 2429, 1683, 1614, 1674, 1679, 1681, 1665, 1667, 1620, 1755, 1668, 1631, + 2364, 1670, 1610, 1690, 1683, 1730, 1665, 1727, 1666, 1677, 1714, 1700, 2340, 1760, 1641, 1651, 0, + }, + 3: []int64{886, 891, 882, 883, 880, 920, 891, 913, 890, 904, 876, 895, 893, 887, 871, 904, 872, 878, 883, 895, + 887, 890, 881, 895, 898, 902, 879, 905, 906, 923, 894, 906, 898, 876, 911, 923, 907, 904, 903, 881, + 900, 903, 884, 895, 896, 911, 886, 900, 922, 818, 926, 906, 911, 909, 892, 903, 901, 897, 905, 888, + 871, 890, 876, 885, 881, 886, 895, 903, 888, 900, 893, 878, 914, 905, 903, 895, 896, 915, 927, 901, + 906, 883, 903, 882, 893, 901, 890, 935, 911, 931, 914, 958, 926, 920, 917, 916, 183, 183, 183, 0, + }, + 4: []int64{4813, 4092, 5167, 4187, 4623, 4243, 4936, 4047, 4315, 3898, 4548, 4141, 4879, 3723, 4245, 3772, 4243, 3838, 4989, 4930, + 4000, 3568, 4070, 3629, 4830, 3734, 4255, 3840, 4535, 5093, 4928, 4063, 5081, 4567, 4038, 5165, 5027, 4144, 4971, 4403, + 4478, 4190, 4590, 4023, 3966, 4206, 4048, 4322, 4869, 4340, 3861, 4990, 3876, 4203, 5088, 4283, 5759, 4100, 4041, 4091, + 4730, 3991, 4617, 4397, 3833, 4156, 4606, 4090, 6918, 3896, 3965, 3780, 5171, 4013, 4623, 4090, 4315, 4735, 4750, 3558, + 5608, 3861, 4126, 4160, 4980, 4405, 4628, 3981, 4455, 3634, 4928, 3778, 5545, 4271, 4511, 3883, 1157, 364, 470, 0, + }, + 24: []int64{8408, 8409, 8408, 8409, 8409, 8408, 8409, 8408, 8408, 8408, 8408, 8408, 8409, 8408, 8409, 8409, 8408, 8409, 8409, 8408, + 8409, 8409, 8409, 8409, 8408, 8409, 8409, 8408, 8409, 8408, 8408, 8409, 8409, 8409, 8410, 8409, 8409, 8409, 8409, 8410, + 8409, 8409, 8410, 8409, 8410, 8410, 8409, 8410, 8410, 8410, 8410, 8409, 8409, 8410, 8409, 8410, 8410, 8409, 8409, 8409, + 8410, 8410, 8409, 8410, 8410, 8409, 8410, 8410, 8410, 8410, 8410, 8410, 8410, 8409, 8409, 8409, 8409, 8410, 8409, 8410, + 8411, 8410, 8410, 8411, 8410, 8411, 8411, 8410, 8411, 8410, 8411, 8411, 8411, 8411, 8411, 8410, 1810, 1810, 1810, 0, + }, + 25: []int64{8407, 8407, 8407, 8407, 8407, 8406, 8407, 8407, 8407, 8406, 8407, 8407, 8407, 8407, 8407, 8407, 8407, 8407, 8407, 8407, + 8407, 8407, 8407, 8408, 8407, 8407, 8407, 8407, 8407, 8407, 8407, 8408, 8407, 8407, 8408, 8408, 8407, 8407, 8407, 8408, + 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, + 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8409, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, 8408, + 8409, 8409, 8408, 8409, 8409, 8409, 8409, 8409, 8409, 8409, 8409, 8410, 8409, 8409, 8409, 8409, 1809, 1810, 1809, 0, + }, + 50: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 26: []int64{8411, 8412, 8411, 8412, 8412, 8410, 8413, 8411, 8412, 8412, 8410, 8411, 8412, 8410, 8413, 8412, 8411, 8412, 8411, 8412, + 8412, 8411, 8411, 8412, 8411, 8413, 8412, 8411, 8411, 8412, 8411, 8412, 8413, 8412, 8413, 8411, 8412, 8411, 8411, 8412, + 8411, 8413, 8412, 8412, 8412, 8413, 8411, 8413, 8412, 8413, 8413, 8412, 8413, 8415, 8410, 8412, 8413, 8413, 8412, 8412, + 8414, 8413, 8411, 8413, 8413, 8411, 8413, 8412, 8414, 8412, 8412, 8413, 8413, 8410, 8413, 8412, 8413, 8414, 8412, 8413, + 8414, 8413, 8413, 8414, 8412, 8414, 8413, 8413, 8414, 8412, 8414, 8414, 8415, 8413, 8413, 8414, 1812, 1810, 1811, 0, + }, + 51: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, +} + +var DatastoreMetricData = map[int32][]int64{ + 180: []int64{1, 5, 3, 1, 3, 39, 19, 13, 5, 0, 1, 0, 1, 1, 1, 1, 1, 1, 15, 9, + 17, 1, 2, 0, 1, 25, 0, 13, 23, 4, 26, 7, 2, 2, 480, 1, 0, 55, 2, 4, + 1, 0, 5, 6, 6, 18, 3, 155, 120, 13, 330, 7, 10, 2, 0, 247, 1, 1, 89, 1, + 22, 13, 18, 2, 11, 0, 1, 184, 4, 0, 1, 1, 0, 1, 0, 5, 595, 1, 37, 320, + 7, 9, 73, 27, 2, 7, 5, 4, 149, 0, 2, 190, 13, 14, 0, 0, 0, 0}, + 181: []int64{433, 464, 439, 426, 490, 460, 455, 510, 544, 466, 657, 526, 457, 538, 448, 456, 488, 482, 470, 479, + 506, 470, 500, 469, 479, 591, 495, 474, 483, 448, 486, 567, 553, 461, 522, 506, 455, 497, 470, 470, + 516, 485, 434, 480, 501, 477, 448, 468, 783, 473, 1630, 454, 516, 430, 457, 912, 546, 483, 424, 444, + 471, 535, 466, 445, 442, 471, 505, 738, 525, 512, 480, 463, 499, 514, 469, 424, 937, 485, 460, 920, + 528, 475, 480, 466, 445, 503, 474, 497, 452, 489, 687, 781, 555, 498, 447, 0, 0, 0}, + 187: []int64{434, 469, 442, 427, 493, 499, 474, 523, 549, 466, 658, 526, 458, 539, 449, 457, 489, 483, 485, 488, + 523, 471, 502, 469, 480, 616, 495, 487, 506, 452, 512, 574, 555, 463, 1002, 507, 455, 552, 472, 474, + 517, 485, 439, 486, 507, 495, 451, 623, 903, 486, 1960, 461, 526, 432, 457, 1159, 547, 484, 513, 445, + 493, 548, 484, 447, 453, 471, 506, 922, 529, 512, 481, 464, 499, 515, 469, 429, 1532, 486, 497, 1240, + 535, 484, 553, 493, 447, 510, 479, 501, 601, 489, 689, 971, 568, 512, 447, 0, 0, 0}, + 281: []int64{174225912, 174227200, 174230104, 174230532, 174237664, 174237600, 174239588, 174235728, 174234644, 174234904, 174235132, 174236888, 174237012, 174240640, 174240148, 174246032}, + 282: []int64{3536110027, 3536111315, 3536114219, 3536114647, 3536121779, 3536121715, 3536123703, 3536119843, 3536118759, 3536066971, 3536067199, 3536067623, 3536067747, 3536066811, 3536066319, 3536066979}, + 283: []int64{426434020, 426425152, 426411808, 426402768, 426387204, 426370512, 426355764, 426340480, 426076860, 426176184, 426064540, 426487536, 426370184, 426424376, 426320528, 426406408}, + 286: []int64{3536110027, 3536111315, 3536114219, 3536114647, 3536121779, 3536121715, 3536123703, 3536119843, 3536118759, 3536066971, 3536067199, 3536067623, 3536067747, 3536066811, 3536066319, 3536066979}, + 287: []int64{174225912, 174227200, 174230104, 174230532, 174237664, 174237600, 174239588, 174235728, 174234644, 174234904, 174235132, 174236888, 174237012, 174240640, 174240148, 174246032}, + 288: []int64{133298, 133303, 133311, 133316, 133328, 133337, 133346, 133352, 133491, 133437, 133496, 133273, 133335, 133308, 133363, 133320}, +} + +var DatacenterMetricData = map[int32][]int64{ + 256: []int64{1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, + 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, + 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, + 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, + 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 1383, + }, + 257: []int64{833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, 833, + }, + 258: []int64{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + }, + 259: []int64{6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + }, + 260: []int64{151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + }, + 261: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 262: []int64{353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, + }, + 263: []int64{598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, + 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, + 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, + 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, + 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, + }, + 264: []int64{1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, + 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, + 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, + 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, + 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, + }, + 265: []int64{19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + }, + 266: []int64{16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + 267: []int64{3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, + 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, + 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, + 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, + 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, 3409, + }, + 268: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 269: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 270: []int64{646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, + 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, + 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, + 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, + 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, + }, + 271: []int64{34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + }, + 272: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + 273: []int64{3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, + 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, + 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, + 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, + 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, 3082, + }, + 274: []int64{124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + }, + 275: []int64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/root_folder.go b/vendor/github.com/vmware/govmomi/simulator/vpx/root_folder.go new file mode 100644 index 0000000000..a1cce0d8d9 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/root_folder.go @@ -0,0 +1,64 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vpx + +import ( + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +var RootFolder = mo.Folder{ + ManagedEntity: mo.ManagedEntity{ + ExtensibleManagedObject: mo.ExtensibleManagedObject{ + Self: types.ManagedObjectReference{Type: "Folder", Value: "group-d1"}, + Value: nil, + AvailableField: nil, + }, + Parent: (*types.ManagedObjectReference)(nil), + CustomValue: nil, + OverallStatus: "green", + ConfigStatus: "green", + ConfigIssue: nil, + EffectiveRole: []int32{-1}, + Permission: []types.Permission{ + { + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "Folder", Value: "group-d1"}, + Principal: "VSPHERE.LOCAL\\Administrator", + Group: false, + RoleId: -1, + Propagate: true, + }, + { + DynamicData: types.DynamicData{}, + Entity: &types.ManagedObjectReference{Type: "Folder", Value: "group-d1"}, + Principal: "VSPHERE.LOCAL\\Administrators", + Group: true, + RoleId: -1, + Propagate: true, + }, + }, + Name: "Datacenters", + DisabledMethod: nil, + RecentTask: nil, + DeclaredAlarmState: nil, + AlarmActionsEnabled: (*bool)(nil), + Tag: nil, + }, + ChildType: []string{"Folder", "Datacenter"}, + ChildEntity: nil, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/service_content.go b/vendor/github.com/vmware/govmomi/simulator/vpx/service_content.go new file mode 100644 index 0000000000..227c47c916 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/service_content.go @@ -0,0 +1,91 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vpx + +import ( + "github.com/google/uuid" + + "github.com/vmware/govmomi/vim25/types" +) + +// ServiceContent is the default template for the ServiceInstance content property. +// Capture method: +// govc object.collect -s -dump - content +var ServiceContent = types.ServiceContent{ + RootFolder: types.ManagedObjectReference{Type: "Folder", Value: "group-d1"}, + PropertyCollector: types.ManagedObjectReference{Type: "PropertyCollector", Value: "propertyCollector"}, + ViewManager: &types.ManagedObjectReference{Type: "ViewManager", Value: "ViewManager"}, + About: types.AboutInfo{ + Name: "VMware vCenter Server", + FullName: "VMware vCenter Server 6.5.0 build-5973321", + Vendor: "VMware, Inc.", + Version: "6.5.0", + Build: "5973321", + LocaleVersion: "INTL", + LocaleBuild: "000", + OsType: "linux-x64", + ProductLineId: "vpx", + ApiType: "VirtualCenter", + ApiVersion: "6.5", + InstanceUuid: uuid.NewSHA1(uuid.NameSpaceOID, uuid.NodeID()).String(), + LicenseProductName: "VMware VirtualCenter Server", + LicenseProductVersion: "6.0", + }, + Setting: &types.ManagedObjectReference{Type: "OptionManager", Value: "VpxSettings"}, + UserDirectory: &types.ManagedObjectReference{Type: "UserDirectory", Value: "UserDirectory"}, + SessionManager: &types.ManagedObjectReference{Type: "SessionManager", Value: "SessionManager"}, + AuthorizationManager: &types.ManagedObjectReference{Type: "AuthorizationManager", Value: "AuthorizationManager"}, + ServiceManager: &types.ManagedObjectReference{Type: "ServiceManager", Value: "ServiceMgr"}, + PerfManager: &types.ManagedObjectReference{Type: "PerformanceManager", Value: "PerfMgr"}, + ScheduledTaskManager: &types.ManagedObjectReference{Type: "ScheduledTaskManager", Value: "ScheduledTaskManager"}, + AlarmManager: &types.ManagedObjectReference{Type: "AlarmManager", Value: "AlarmManager"}, + EventManager: &types.ManagedObjectReference{Type: "EventManager", Value: "EventManager"}, + TaskManager: &types.ManagedObjectReference{Type: "TaskManager", Value: "TaskManager"}, + ExtensionManager: &types.ManagedObjectReference{Type: "ExtensionManager", Value: "ExtensionManager"}, + CustomizationSpecManager: &types.ManagedObjectReference{Type: "CustomizationSpecManager", Value: "CustomizationSpecManager"}, + CustomFieldsManager: &types.ManagedObjectReference{Type: "CustomFieldsManager", Value: "CustomFieldsManager"}, + AccountManager: (*types.ManagedObjectReference)(nil), + DiagnosticManager: &types.ManagedObjectReference{Type: "DiagnosticManager", Value: "DiagMgr"}, + LicenseManager: &types.ManagedObjectReference{Type: "LicenseManager", Value: "LicenseManager"}, + SearchIndex: &types.ManagedObjectReference{Type: "SearchIndex", Value: "SearchIndex"}, + FileManager: &types.ManagedObjectReference{Type: "FileManager", Value: "FileManager"}, + DatastoreNamespaceManager: &types.ManagedObjectReference{Type: "DatastoreNamespaceManager", Value: "DatastoreNamespaceManager"}, + VirtualDiskManager: &types.ManagedObjectReference{Type: "VirtualDiskManager", Value: "virtualDiskManager"}, + VirtualizationManager: (*types.ManagedObjectReference)(nil), + SnmpSystem: &types.ManagedObjectReference{Type: "HostSnmpSystem", Value: "SnmpSystem"}, + VmProvisioningChecker: &types.ManagedObjectReference{Type: "VirtualMachineProvisioningChecker", Value: "ProvChecker"}, + VmCompatibilityChecker: &types.ManagedObjectReference{Type: "VirtualMachineCompatibilityChecker", Value: "CompatChecker"}, + OvfManager: &types.ManagedObjectReference{Type: "OvfManager", Value: "OvfManager"}, + IpPoolManager: &types.ManagedObjectReference{Type: "IpPoolManager", Value: "IpPoolManager"}, + DvSwitchManager: &types.ManagedObjectReference{Type: "DistributedVirtualSwitchManager", Value: "DVSManager"}, + HostProfileManager: &types.ManagedObjectReference{Type: "HostProfileManager", Value: "HostProfileManager"}, + ClusterProfileManager: &types.ManagedObjectReference{Type: "ClusterProfileManager", Value: "ClusterProfileManager"}, + ComplianceManager: &types.ManagedObjectReference{Type: "ProfileComplianceManager", Value: "MoComplianceManager"}, + LocalizationManager: &types.ManagedObjectReference{Type: "LocalizationManager", Value: "LocalizationManager"}, + StorageResourceManager: &types.ManagedObjectReference{Type: "StorageResourceManager", Value: "StorageResourceManager"}, + GuestOperationsManager: &types.ManagedObjectReference{Type: "GuestOperationsManager", Value: "guestOperationsManager"}, + OverheadMemoryManager: &types.ManagedObjectReference{Type: "OverheadMemoryManager", Value: "OverheadMemoryManager"}, + CertificateManager: &types.ManagedObjectReference{Type: "CertificateManager", Value: "certificateManager"}, + IoFilterManager: &types.ManagedObjectReference{Type: "IoFilterManager", Value: "IoFilterManager"}, + VStorageObjectManager: &types.ManagedObjectReference{Type: "VcenterVStorageObjectManager", Value: "VStorageObjectManager"}, + HostSpecManager: &types.ManagedObjectReference{Type: "HostSpecificationManager", Value: "HostSpecificationManager"}, + CryptoManager: &types.ManagedObjectReference{Type: "CryptoManagerKmip", Value: "CryptoManager"}, + HealthUpdateManager: &types.ManagedObjectReference{Type: "HealthUpdateManager", Value: "HealthUpdateManager"}, + FailoverClusterConfigurator: &types.ManagedObjectReference{Type: "FailoverClusterConfigurator", Value: "FailoverClusterConfigurator"}, + FailoverClusterManager: &types.ManagedObjectReference{Type: "FailoverClusterManager", Value: "FailoverClusterManager"}, + TenantManager: &types.ManagedObjectReference{Type: "TenantTenantManager", Value: "TenantManager"}, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/setting.go b/vendor/github.com/vmware/govmomi/simulator/vpx/setting.go new file mode 100644 index 0000000000..7625824da6 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/setting.go @@ -0,0 +1,78 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vpx + +import "github.com/vmware/govmomi/vim25/types" + +// TODO: figure out whether this is Setting or AdvancedOptions - see esx/setting.go for the difference + +// Setting is captured from VC's ServiceContent.OptionManager.setting +var Setting = []types.BaseOptionValue{ + // This list is currently pruned to include sso options only with sso.enabled set to false + &types.OptionValue{ + Key: "config.vpxd.sso.sts.uri", + Value: "https://127.0.0.1/sts/STSService/vsphere.local", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.solutionUser.privateKey", + Value: "/etc/vmware-vpx/ssl/vcsoluser.key", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.solutionUser.name", + Value: "vpxd-b643d01c-928f-469b-96a5-d571d762a78e@vsphere.local", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.solutionUser.certificate", + Value: "/etc/vmware-vpx/ssl/vcsoluser.crt", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.groupcheck.uri", + Value: "https://127.0.0.1/sso-adminserver/sdk/vsphere.local", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.enabled", + Value: "false", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.default.isGroup", + Value: "false", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.default.admin", + Value: "Administrator@vsphere.local", + }, + &types.OptionValue{ + Key: "config.vpxd.sso.admin.uri", + Value: "https://127.0.0.1/sso-adminserver/sdk/vsphere.local", + }, + &types.OptionValue{ + Key: "VirtualCenter.InstanceName", + Value: "127.0.0.1", + }, + &types.OptionValue{ + Key: "event.batchsize", + Value: int32(2000), + }, + &types.OptionValue{ + Key: "event.maxAge", + Value: int32(30), + }, + &types.OptionValue{ + Key: "event.maxAgeEnabled", + Value: bool(true), + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vpx/task_manager.go b/vendor/github.com/vmware/govmomi/simulator/vpx/task_manager.go new file mode 100644 index 0000000000..a3fcc302d8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vpx/task_manager.go @@ -0,0 +1,11133 @@ +/* +Copyright (c) 2018-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vpx + +import "github.com/vmware/govmomi/vim25/types" + +// Description is the default template for the TaskManager description property. +// Capture method: +// govc object.collect -s -dump TaskManager:TaskManager description +var Description = types.TaskDescription{ + MethodInfo: []types.BaseElementDescription{ + &types.ElementDescription{ + Description: types.Description{ + Label: "createEntry", + Summary: "createEntry", + }, + Key: "host.OperationCleanupManager.createEntry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateEntry", + Summary: "updateEntry", + }, + Key: "host.OperationCleanupManager.updateEntry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryEntry", + Summary: "queryEntry", + }, + Key: "host.OperationCleanupManager.queryEntry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query disabled guest operations", + Summary: "Returns a list of guest operations not supported by a virtual machine", + }, + Key: "vm.guest.GuestOperationsManager.queryDisabledMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSpecification", + Summary: "updateHostSpecification", + }, + Key: "profile.host.HostSpecificationManager.updateHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSubSpecification", + Summary: "updateHostSubSpecification", + }, + Key: "profile.host.HostSpecificationManager.updateHostSubSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostSpecification", + Summary: "retrieveHostSpecification", + }, + Key: "profile.host.HostSpecificationManager.retrieveHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteHostSubSpecification", + Summary: "deleteHostSubSpecification", + }, + Key: "profile.host.HostSpecificationManager.deleteHostSubSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteHostSpecification", + Summary: "deleteHostSpecification", + }, + Key: "profile.host.HostSpecificationManager.deleteHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getUpdatedHosts", + Summary: "getUpdatedHosts", + }, + Key: "profile.host.HostSpecificationManager.getUpdatedHosts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set graphics manager custom value", + Summary: "Sets the value of a custom field of the graphics manager", + }, + Key: "host.GraphicsManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh graphics information", + Summary: "Refresh graphics device information", + }, + Key: "host.GraphicsManager.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check if shared graphics is active", + Summary: "Check if shared graphics is active on the host", + }, + Key: "host.GraphicsManager.isSharedGraphicsActive", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateGraphicsConfig", + Summary: "updateGraphicsConfig", + }, + Key: "host.GraphicsManager.updateGraphicsConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration option descriptor", + Summary: "Get the list of configuration option keys available in this browser", + }, + Key: "EnvironmentBrowser.queryConfigOptionDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure option query", + Summary: "Search for a specific configuration option", + }, + Key: "EnvironmentBrowser.queryConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryConfigOptionEx", + Summary: "queryConfigOptionEx", + }, + Key: "EnvironmentBrowser.queryConfigOptionEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration target", + Summary: "Search for a specific configuration target", + }, + Key: "EnvironmentBrowser.queryConfigTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query target capabilities", + Summary: "Query for compute-resource capabilities associated with this browser", + }, + Key: "EnvironmentBrowser.queryTargetCapabilities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine provisioning operation policy", + Summary: "Query environment browser for information about the virtual machine provisioning operation policy", + }, + Key: "EnvironmentBrowser.queryProvisioningPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryConfigTargetSpec", + Summary: "queryConfigTargetSpec", + }, + Key: "EnvironmentBrowser.queryConfigTargetSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set scheduled task custom value", + Summary: "Sets the value of a custom field of a scheduled task", + }, + Key: "scheduler.ScheduledTask.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove scheduled task", + Summary: "Remove the scheduled task", + }, + Key: "scheduler.ScheduledTask.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure scheduled task", + Summary: "Reconfigure the scheduled task properties", + }, + Key: "scheduler.ScheduledTask.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Run scheduled task", + Summary: "Run the scheduled task immediately", + }, + Key: "scheduler.ScheduledTask.run", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query CMMDS", + Summary: "Queries CMMDS contents in the vSAN cluster", + }, + Key: "host.VsanInternalSystem.queryCmmds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query physical vSAN disks", + Summary: "Queries the physical vSAN disks", + }, + Key: "host.VsanInternalSystem.queryPhysicalVsanDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN objects", + Summary: "Queries the vSAN objects in the cluster", + }, + Key: "host.VsanInternalSystem.queryVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN objects on physical disks", + Summary: "Queries the vSAN objects that have at least one component on the current set of physical disks", + }, + Key: "host.VsanInternalSystem.queryObjectsOnPhysicalVsanDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Drop ownership of DOM objects", + Summary: "Drop ownership of the DOM objects that are owned by this host", + }, + Key: "host.VsanInternalSystem.abdicateDomOwnership", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN statistics", + Summary: "Gathers low level statistic counters from the vSAN cluster", + }, + Key: "host.VsanInternalSystem.queryVsanStatistics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigures vSAN objects", + Summary: "Reconfigures the vSAN objects in the cluster", + }, + Key: "host.VsanInternalSystem.reconfigureDomObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSAN objects that are currently synchronizing data", + Summary: "Queries vSAN objects that are updating stale components or synchronizing new replicas", + }, + Key: "host.VsanInternalSystem.querySyncingVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Run diagnostics on vSAN disks", + Summary: "Runs diagnostic tests on vSAN physical disks and verifies if objects are successfully created on the disks", + }, + Key: "host.VsanInternalSystem.runVsanPhysicalDiskDiagnostics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attributes of vSAN objects", + Summary: "Shows the extended attributes of the vSAN objects", + }, + Key: "host.VsanInternalSystem.getVsanObjExtAttrs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configurable vSAN objects", + Summary: "Identifies the vSAN objects that can be reconfigured using the assigned storage policy in the current cluster", + }, + Key: "host.VsanInternalSystem.reconfigurationSatisfiable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN objects available for provisioning", + Summary: "Identifies the vSAN objects that are available for provisioning using the assigned storage policy in the current cluster", + }, + Key: "host.VsanInternalSystem.canProvisionObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteVsanObjects", + Summary: "deleteVsanObjects", + }, + Key: "host.VsanInternalSystem.deleteVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vSAN object format", + Summary: "Upgrade vSAN object format, to fit in vSAN latest features", + }, + Key: "host.VsanInternalSystem.upgradeVsanObjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryVsanObjectUuidsByFilter", + Summary: "queryVsanObjectUuidsByFilter", + }, + Key: "host.VsanInternalSystem.queryVsanObjectUuidsByFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN entities available for decommissioning", + Summary: "Identifies the vSAN entities that are available for decommissioning in the current cluster", + }, + Key: "host.VsanInternalSystem.canDecommission", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Authenticate credentials in guest", + Summary: "Authenticate credentials in the guest operating system", + }, + Key: "vm.guest.AuthManager.validateCredentials", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire credentials in guest", + Summary: "Acquire credentials in the guest operating system", + }, + Key: "vm.guest.AuthManager.acquireCredentials", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Release credentials in guest", + Summary: "Release credentials in the guest operating system", + }, + Key: "vm.guest.AuthManager.releaseCredentials", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create user", + Summary: "Creates a local user account", + }, + Key: "host.LocalAccountManager.createUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update user", + Summary: "Updates a local user account", + }, + Key: "host.LocalAccountManager.updateUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create group", + Summary: "Creates a local group account", + }, + Key: "host.LocalAccountManager.createGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete user", + Summary: "Removes a local user account", + }, + Key: "host.LocalAccountManager.removeUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove group", + Summary: "Removes a local group account", + }, + Key: "host.LocalAccountManager.removeGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Assign user to group", + Summary: "Assign user to group", + }, + Key: "host.LocalAccountManager.assignUserToGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unassign user from group", + Summary: "Unassigns a user from a group", + }, + Key: "host.LocalAccountManager.unassignUserFromGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add an image library", + Summary: "Register an image library server with vCenter", + }, + Key: "ImageLibraryManager.addLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update image library", + Summary: "Update image library information", + }, + Key: "ImageLibraryManager.updateLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove an image library", + Summary: "Unregister an image library server from vCenter", + }, + Key: "ImageLibraryManager.removeLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import from image library", + Summary: "Import files from the image library", + }, + Key: "ImageLibraryManager.importLibraryMedia", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export to image library", + Summary: "Export files to the image library", + }, + Key: "ImageLibraryManager.exportMediaToLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Publish to image library", + Summary: "Publish files from datastore to image library", + }, + Key: "ImageLibraryManager.publishMediaToLibrary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.ContentLibrary.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.ContentLibrary.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.ContentLibrary.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.ContentLibrary.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.ContentLibrary.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.ContentLibrary.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.ContentLibrary.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set EVC manager custom value", + Summary: "Sets the value of a custom field for an Enhanced vMotion Compatibility manager", + }, + Key: "cluster.TransitionalEVCManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure cluster EVC", + Summary: "Enable/reconfigure Enhanced vMotion Compatibility for a cluster", + }, + Key: "cluster.TransitionalEVCManager.configureEVC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable cluster EVC", + Summary: "Disable Enhanced vMotion Compatibility for a cluster", + }, + Key: "cluster.TransitionalEVCManager.disableEVC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate EVC mode for cluster", + Summary: "Test the validity of configuring Enhanced vMotion Compatibility mode on the managed cluster", + }, + Key: "cluster.TransitionalEVCManager.checkConfigureEVC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate host for EVC cluster", + Summary: "Tests the validity of adding a host into the Enhanced vMotion Compatibility cluster", + }, + Key: "cluster.TransitionalEVCManager.checkAddHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "lookupVmOverheadMemory", + Summary: "lookupVmOverheadMemory", + }, + Key: "OverheadMemoryManager.lookupVmOverheadMemory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set event history latest page size", + Summary: "Set the last page viewed size of event history", + }, + Key: "event.EventHistoryCollector.setLatestPageSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rewind event history", + Summary: "Moves view to the oldest item of event history", + }, + Key: "event.EventHistoryCollector.rewind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset event history", + Summary: "Moves view to the newest item of event history", + }, + Key: "event.EventHistoryCollector.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove event history", + Summary: "Removes the event history collector", + }, + Key: "event.EventHistoryCollector.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read next event history", + Summary: "Reads view from current position of event history, and then the position is moved to the next newer page", + }, + Key: "event.EventHistoryCollector.readNext", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read previous event history", + Summary: "Reads view from current position of event history and moves the position to the next older page", + }, + Key: "event.EventHistoryCollector.readPrev", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set managed entity custom value", + Summary: "Sets the value of a custom field of a managed entity", + }, + Key: "ManagedEntity.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload managed entity", + Summary: "Reload the entity state", + }, + Key: "ManagedEntity.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename managed entity", + Summary: "Rename this entity", + }, + Key: "ManagedEntity.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove entity", + Summary: "Deletes the entity and removes it from parent folder", + }, + Key: "ManagedEntity.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the entity", + }, + Key: "ManagedEntity.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the entity", + }, + Key: "ManagedEntity.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ManagedEntity.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set a custom value for EVC manager", + Summary: "Sets a value in the custom field for Enhanced vMotion Compatibility manager", + }, + Key: "cluster.EVCManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable/reconfigure EVC", + Summary: "Enable/reconfigure Enhanced vMotion Compatibility in a cluster", + }, + Key: "cluster.EVCManager.configureEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable cluster EVC", + Summary: "Disable Enhanced vMotion Compatibility in a cluster", + }, + Key: "cluster.EVCManager.disableEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate EVC configuration", + Summary: "Validates the configuration of Enhanced vMotion Compatibility mode in the managed cluster", + }, + Key: "cluster.EVCManager.checkConfigureEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate hosts in EVC", + Summary: "Validates new hosts in the Enhanced vMotion Compatibility cluster", + }, + Key: "cluster.EVCManager.checkAddHostEvc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve host profile description", + Summary: "Retrieve host profile description", + }, + Key: "profile.host.HostProfile.retrieveDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete host profile", + Summary: "Delete host profile", + }, + Key: "profile.host.HostProfile.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach host profile", + Summary: "Attach host profile to host or cluster", + }, + Key: "profile.host.HostProfile.associateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach host profile", + Summary: "Detach host profile from host or cluster", + }, + Key: "profile.host.HostProfile.dissociateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance of a host or cluster against a host profile", + }, + Key: "profile.host.HostProfile.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export host profile", + Summary: "Export host profile to a file", + }, + Key: "profile.host.HostProfile.exportProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update reference host", + Summary: "Update reference host", + }, + Key: "profile.host.HostProfile.updateReferenceHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host profile", + Summary: "Update host profile", + }, + Key: "profile.host.HostProfile.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "validate", + Summary: "validate", + }, + Key: "profile.host.HostProfile.validate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute profile", + Summary: "Execute profile", + }, + Key: "profile.host.HostProfile.execute", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a host profile", + Summary: "Create a host profile", + }, + Key: "profile.host.ProfileManager.createProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query policy metadata", + Summary: "Query policy metadata", + }, + Key: "profile.host.ProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find associated profile", + Summary: "Find associated profile", + }, + Key: "profile.host.ProfileManager.findAssociatedProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply host configuration", + Summary: "Apply host configuration", + }, + Key: "profile.host.ProfileManager.applyHostConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryMetadata", + Summary: "queryMetadata", + }, + Key: "profile.host.ProfileManager.queryMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate configuration task list for host profile", + Summary: "Generates a list of configuration tasks to be performed when applying a host profile", + }, + Key: "profile.host.ProfileManager.generateConfigTaskList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate task list", + Summary: "Generate task list", + }, + Key: "profile.host.ProfileManager.generateTaskList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile metadata", + Summary: "Query profile metadata", + }, + Key: "profile.host.ProfileManager.queryProfileMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query metadata for profile categories", + Summary: "Retrieves the metadata for a set of profile categories", + }, + Key: "profile.host.ProfileManager.queryProfileCategoryMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query metadata for profile components", + Summary: "Retrieves the metadata for a set of profile components", + }, + Key: "profile.host.ProfileManager.queryProfileComponentMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile structure", + Summary: "Gets information about the structure of a profile", + }, + Key: "profile.host.ProfileManager.queryProfileStructure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create default profile", + Summary: "Create default profile", + }, + Key: "profile.host.ProfileManager.createDefaultProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host customizations", + Summary: "Update host customizations for host", + }, + Key: "profile.host.ProfileManager.updateAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate host customizations", + Summary: "Validate host customizations for host", + }, + Key: "profile.host.ProfileManager.validateAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve host customizations", + Summary: "Returns the host customization data associated with a particular host", + }, + Key: "profile.host.ProfileManager.retrieveAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveAnswerFileForProfile", + Summary: "retrieveAnswerFileForProfile", + }, + Key: "profile.host.ProfileManager.retrieveAnswerFileForProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export host customizations", + Summary: "Export host customizations for host", + }, + Key: "profile.host.ProfileManager.exportAnswerFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check host customizations status", + Summary: "Check the status of the host customizations against associated profile", + }, + Key: "profile.host.ProfileManager.checkAnswerFileStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host customization status", + Summary: "Returns the status of the host customization data associated with the specified hosts", + }, + Key: "profile.host.ProfileManager.queryAnswerFileStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host customizations", + Summary: "Update host customizations", + }, + Key: "profile.host.ProfileManager.updateHostCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "validateHostCustomizations", + Summary: "validateHostCustomizations", + }, + Key: "profile.host.ProfileManager.validateHostCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostCustomizations", + Summary: "retrieveHostCustomizations", + }, + Key: "profile.host.ProfileManager.retrieveHostCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostCustomizationsForProfile", + Summary: "retrieveHostCustomizationsForProfile", + }, + Key: "profile.host.ProfileManager.retrieveHostCustomizationsForProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export host customizations", + Summary: "Export host customizations", + }, + Key: "profile.host.ProfileManager.exportCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import host customizations", + Summary: "Import host customizations", + }, + Key: "profile.host.ProfileManager.importCustomizations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Pre-check Remediation", + Summary: "Checks customization data and host state is valid for remediation", + }, + Key: "profile.host.ProfileManager.generateHostConfigTaskSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Batch apply host configuration", + Summary: "Batch apply host configuration", + }, + Key: "profile.host.ProfileManager.applyEntitiesConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare validation of settings to be copied", + Summary: "Generate differences between source and target host profile to validate settings to be copied", + }, + Key: "profile.host.ProfileManager.validateComposition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy settings to host profiles", + Summary: "Copy settings to host profiles", + }, + Key: "profile.host.ProfileManager.compositeProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create inventory view", + Summary: "Create a view for browsing the inventory and tracking changes to open folders", + }, + Key: "view.ViewManager.createInventoryView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create container view", + Summary: "Create a view for monitoring the contents of a single container", + }, + Key: "view.ViewManager.createContainerView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create list view", + Summary: "Create a view for getting updates", + }, + Key: "view.ViewManager.createListView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create list view", + Summary: "Create a list view from an existing view", + }, + Key: "view.ViewManager.createListViewFromView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add key", + Summary: "Add the specified key to the current host", + }, + Key: "encryption.CryptoManager.addKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add keys", + Summary: "Add the specified keys to the current host", + }, + Key: "encryption.CryptoManager.addKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove key", + Summary: "Remove the specified key from the current host", + }, + Key: "encryption.CryptoManager.removeKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove keys", + Summary: "Remove the specified keys from the current host", + }, + Key: "encryption.CryptoManager.removeKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List all keys", + Summary: "List all the keys registered on the current host", + }, + Key: "encryption.CryptoManager.listKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.AntiAffinityGroup.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.AntiAffinityGroup.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.AntiAffinityGroup.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.AntiAffinityGroup.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.AntiAffinityGroup.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.AntiAffinityGroup.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.AntiAffinityGroup.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query supported switch specification", + Summary: "Query supported switch specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.querySupportedSwitchSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compatible hosts for a vSphere Distributed Switch specification", + Summary: "Returns a list of hosts that are compatible with a given vSphere Distributed Switch specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryCompatibleHostForNewDvs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compatible hosts for existing vSphere Distributed Switch", + Summary: "Returns a list of hosts that are compatible with an existing vSphere Distributed Switch", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryCompatibleHostForExistingDvs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compatible host specification", + Summary: "Query compatible host specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryCompatibleHostSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query feature capabilities for vSphere Distributed Switch specification", + Summary: "Queries feature capabilities available for a given vSphere Distributed Switch specification", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryFeatureCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query switch by UUID", + Summary: "Query switch by UUID", + }, + Key: "dvs.DistributedVirtualSwitchManager.querySwitchByUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration target", + Summary: "Query configuration target", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryDvsConfigTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compatibility of hosts against a vSphere Distributed Switch version", + Summary: "Check compatibility of hosts against a vSphere Distributed Switch version", + }, + Key: "dvs.DistributedVirtualSwitchManager.checkCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update opaque data for set of entities", + Summary: "Update opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.updateOpaqueData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update opaque data for set of entities", + Summary: "Update opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.updateOpaqueDataEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch opaque data for set of entities", + Summary: "Fetch opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.fetchOpaqueData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch opaque data for set of entities", + Summary: "Fetch opaque data for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.fetchOpaqueDataEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute opaque command for set of entities", + Summary: "Execute opaque command for set of entities", + }, + Key: "dvs.DistributedVirtualSwitchManager.executeOpaqueCommand", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rectify vNetwork Distributed Switch host", + Summary: "Rectify vNetwork Distributed Switch host", + }, + Key: "dvs.DistributedVirtualSwitchManager.rectifyHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export configuration of the entity", + Summary: "Export configuration of the entity", + }, + Key: "dvs.DistributedVirtualSwitchManager.exportEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import configuration of the entity", + Summary: "Import configuration of the entity", + }, + Key: "dvs.DistributedVirtualSwitchManager.importEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Look up portgroup based on portgroup key", + Summary: "Look up portgroup based on portgroup key", + }, + Key: "dvs.DistributedVirtualSwitchManager.lookupPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query uplink team information", + Summary: "Query uplink team information", + }, + Key: "dvs.DistributedVirtualSwitchManager.QueryDvpgUplinkTeam", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryHostNetworkResource", + Summary: "queryHostNetworkResource", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryHostNetworkResource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryVwirePort", + Summary: "queryVwirePort", + }, + Key: "dvs.DistributedVirtualSwitchManager.queryVwirePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance of host against profile", + Summary: "Checks compliance of a host against a profile", + }, + Key: "profile.host.profileEngine.ComplianceManager.checkHostCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query expression metadata", + Summary: "Queries the metadata for the given expression names", + }, + Key: "profile.host.profileEngine.ComplianceManager.queryExpressionMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get the default compliance from host configuration subprofiles", + Summary: "Get the default compliance from host configuration subprofiles", + }, + Key: "profile.host.profileEngine.ComplianceManager.getDefaultCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move file", + Summary: "Move the file, folder, or disk from source datacenter to destination datacenter", + }, + Key: "FileManager.move", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move file", + Summary: "Move the source file or folder to destination datacenter", + }, + Key: "FileManager.moveFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy file", + Summary: "Copy the file, folder, or disk from source datacenter to destination datacenter", + }, + Key: "FileManager.copy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy file", + Summary: "Copy the source file or folder to destination datacenter", + }, + Key: "FileManager.copyFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete file", + Summary: "Delete the file, folder, or disk from source datacenter", + }, + Key: "FileManager.delete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete file", + Summary: "Delete the source file or folder from the datastore", + }, + Key: "FileManager.deleteFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Make Directory", + Summary: "Create a directory using the specified name", + }, + Key: "FileManager.makeDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change owner", + Summary: "Change the owner of the specified file to the specified user", + }, + Key: "FileManager.changeOwner", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.TagPolicyOption.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.TagPolicyOption.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.TagPolicyOption.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.TagPolicyOption.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.TagPolicyOption.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.TagPolicyOption.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.TagPolicyOption.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve cluster profile description", + Summary: "Retrieve cluster profile description", + }, + Key: "profile.cluster.ClusterProfile.retrieveDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete cluster profile", + Summary: "Delete cluster profile", + }, + Key: "profile.cluster.ClusterProfile.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach cluster profile", + Summary: "Attach cluster profile to cluster", + }, + Key: "profile.cluster.ClusterProfile.associateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach cluster profile", + Summary: "Detach cluster profile from cluster", + }, + Key: "profile.cluster.ClusterProfile.dissociateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance of a cluster against a cluster profile", + }, + Key: "profile.cluster.ClusterProfile.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export cluster profile", + Summary: "Export cluster profile to a file", + }, + Key: "profile.cluster.ClusterProfile.exportProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update cluster profile", + Summary: "Update configuration of cluster profile", + }, + Key: "profile.cluster.ClusterProfile.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check", + Summary: "Check for dependencies, conflicts, and obsolete updates", + }, + Key: "host.PatchManager.Check", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scan", + Summary: "Scan the host for patch status", + }, + Key: "host.PatchManager.Scan", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scan", + Summary: "Scan the host for patch status", + }, + Key: "host.PatchManager.ScanV2", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stage", + Summary: "Stage the updates to the host", + }, + Key: "host.PatchManager.Stage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install", + Summary: "Install the patch", + }, + Key: "host.PatchManager.Install", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install", + Summary: "Install the patch", + }, + Key: "host.PatchManager.InstallV2", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall", + Summary: "Uninstall the patch", + }, + Key: "host.PatchManager.Uninstall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query", + Summary: "Query the host for installed bulletins", + }, + Key: "host.PatchManager.Query", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query process information", + Summary: "Retrieves information regarding processes", + }, + Key: "host.SystemDebugManager.queryProcessInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure AutoStart Manager", + Summary: "Changes the power on or power off sequence", + }, + Key: "host.AutoStartManager.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Auto power On", + Summary: "Powers On virtual machines according to the current AutoStart configuration", + }, + Key: "host.AutoStartManager.autoPowerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Auto power Off", + Summary: "Powers Off virtual machines according to the current AutoStart configuration", + }, + Key: "host.AutoStartManager.autoPowerOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove managed object", + Summary: "Remove the managed objects", + }, + Key: "view.ManagedObjectView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove list view", + Summary: "Remove the list view object", + }, + Key: "view.ListView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Modify list view", + Summary: "Modify the list view", + }, + Key: "view.ListView.modify", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset list view", + Summary: "Reset the list view", + }, + Key: "view.ListView.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset view", + Summary: "Resets a set of objects in a given view", + }, + Key: "view.ListView.resetFromView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Creates a registry key", + Summary: "Creates a registry key in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.createRegistryKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Lists all registry subkeys for a specified registry key", + Summary: "Lists all registry subkeys for a specified registry key in the Windows guest operating system.", + }, + Key: "vm.guest.WindowsRegistryManager.listRegistryKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deletes a registry key", + Summary: "Deletes a registry key in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.deleteRegistryKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Sets and creates a registry value", + Summary: "Sets and creates a registry value in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.setRegistryValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Lists all registry values for a specified registry key", + Summary: "Lists all registry values for a specified registry key in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.listRegistryValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deletes a registry value", + Summary: "Deletes a registry value in the Windows guest operating system", + }, + Key: "vm.guest.WindowsRegistryManager.deleteRegistryValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register Fault Tolerant Secondary VM", + Summary: "Registers a Secondary VM with a Fault Tolerant Primary VM", + }, + Key: "host.FaultToleranceManager.registerSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister Fault Tolerant Secondary VM", + Summary: "Unregister a Secondary VM from the associated Primary VM", + }, + Key: "host.FaultToleranceManager.unregisterSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Make Primary VM", + Summary: "Test Fault Tolerance failover by making a Secondary VM in a Fault Tolerance pair the Primary VM", + }, + Key: "host.FaultToleranceManager.makePrimary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Make peer VM primary", + Summary: "Makes the peer VM primary and terminates the local virtual machine", + }, + Key: "host.FaultToleranceManager.goLivePeerVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop Fault Tolerant virtual machine", + Summary: "Stop a specified virtual machine in a Fault Tolerant pair", + }, + Key: "host.FaultToleranceManager.terminateFaultTolerantVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable Secondary VM", + Summary: "Disable Fault Tolerance on a specified Secondary VM", + }, + Key: "host.FaultToleranceManager.disableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable Secondary VM", + Summary: "Enable Fault Tolerance on a specified Secondary VM", + }, + Key: "host.FaultToleranceManager.enableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start Fault Tolerant Secondary VM", + Summary: "Start Fault Tolerant Secondary VM on remote host", + }, + Key: "host.FaultToleranceManager.startSecondaryOnRemoteHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister Fault Tolerance", + Summary: "Unregister the Fault Tolerance service", + }, + Key: "host.FaultToleranceManager.unregister", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set local VM component health", + Summary: "Sets the component health information of the specified local virtual machine", + }, + Key: "host.FaultToleranceManager.setLocalVMComponentHealth", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get peer VM component health", + Summary: "Gets component health information of the FT peer of the specified local virtual machine", + }, + Key: "host.FaultToleranceManager.getPeerVMComponentHealth", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set vCenter HA cluster mode", + Summary: "Set vCenter HA cluster mode", + }, + Key: "vcha.FailoverClusterManager.setClusterMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getClusterMode", + Summary: "getClusterMode", + }, + Key: "vcha.FailoverClusterManager.getClusterMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getClusterHealth", + Summary: "getClusterHealth", + }, + Key: "vcha.FailoverClusterManager.getClusterHealth", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate failover", + Summary: "Initiate a failover from active vCenter Server node to the passive node", + }, + Key: "vcha.FailoverClusterManager.initiateFailover", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "executeStep", + Summary: "executeStep", + }, + Key: "modularity.WorkflowStepHandler.executeStep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "undoStep", + Summary: "undoStep", + }, + Key: "modularity.WorkflowStepHandler.undoStep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "finalizeStep", + Summary: "finalizeStep", + }, + Key: "modularity.WorkflowStepHandler.finalizeStep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.TagPolicy.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.TagPolicy.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.TagPolicy.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.TagPolicy.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.TagPolicy.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.TagPolicy.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.TagPolicy.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "CreateVRP", + Summary: "CreateVRP", + }, + Key: "VRPResourceManager.CreateVRP", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "UpdateVRP", + Summary: "UpdateVRP", + }, + Key: "VRPResourceManager.UpdateVRP", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DeleteVRP", + Summary: "DeleteVRP", + }, + Key: "VRPResourceManager.DeleteVRP", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DeployVM", + Summary: "DeployVM", + }, + Key: "VRPResourceManager.DeployVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "UndeployVM", + Summary: "UndeployVM", + }, + Key: "VRPResourceManager.UndeployVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "SetManagedByVDC", + Summary: "SetManagedByVDC", + }, + Key: "VRPResourceManager.SetManagedByVDC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetAllVRPIds", + Summary: "GetAllVRPIds", + }, + Key: "VRPResourceManager.GetAllVRPIds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetRPSettings", + Summary: "GetRPSettings", + }, + Key: "VRPResourceManager.GetRPSettings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetVRPSettings", + Summary: "GetVRPSettings", + }, + Key: "VRPResourceManager.GetVRPSettings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetVRPUsage", + Summary: "GetVRPUsage", + }, + Key: "VRPResourceManager.GetVRPUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetVRPofVM", + Summary: "GetVRPofVM", + }, + Key: "VRPResourceManager.GetVRPofVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "GetChildRPforHub", + Summary: "GetChildRPforHub", + }, + Key: "VRPResourceManager.GetChildRPforHub", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create directory", + Summary: "Creates a top-level directory on the specified datastore", + }, + Key: "DatastoreNamespaceManager.CreateDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete directory", + Summary: "Deletes the specified top-level directory from the datastore", + }, + Key: "DatastoreNamespaceManager.DeleteDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "ConvertNamespacePathToUuidPath", + Summary: "ConvertNamespacePathToUuidPath", + }, + Key: "DatastoreNamespaceManager.ConvertNamespacePathToUuidPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.VirtualDatacenter.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.VirtualDatacenter.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.VirtualDatacenter.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.VirtualDatacenter.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.VirtualDatacenter.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.VirtualDatacenter.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.VirtualDatacenter.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve profile description", + Summary: "Retrieve profile description", + }, + Key: "profile.Profile.retrieveDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove profile", + Summary: "Remove profile", + }, + Key: "profile.Profile.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Associate entities", + Summary: "Associate entities with the profile", + }, + Key: "profile.Profile.associateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Dissociate entities", + Summary: "Dissociate entities from the profile", + }, + Key: "profile.Profile.dissociateEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance against the profile", + }, + Key: "profile.Profile.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export profile", + Summary: "Export profile to a file", + }, + Key: "profile.Profile.exportProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getNetworkIpSettings", + Summary: "getNetworkIpSettings", + }, + Key: "vdcs.IpManager.getNetworkIpSettings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "allocate", + Summary: "allocate", + }, + Key: "vdcs.IpManager.allocate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "release", + Summary: "release", + }, + Key: "vdcs.IpManager.release", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "releaseAll", + Summary: "releaseAll", + }, + Key: "vdcs.IpManager.releaseAll", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryAll", + Summary: "queryAll", + }, + Key: "vdcs.IpManager.queryAll", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set datastore cluster custom value", + Summary: "Sets the value of a custom field of a datastore cluster", + }, + Key: "StoragePod.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload datastore cluster", + Summary: "Reloads the datastore cluster", + }, + Key: "StoragePod.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename a datastore cluster", + Summary: "Rename a datastore cluster", + }, + Key: "StoragePod.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove a datastore cluster", + Summary: "Remove a datastore cluster", + }, + Key: "StoragePod.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tags to datastore cluster", + Summary: "Adds a set of tags to a datastore cluster", + }, + Key: "StoragePod.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tags from datastore cluster", + Summary: "Removes a set of tags from a datastore cluster", + }, + Key: "StoragePod.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "StoragePod.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create folder", + Summary: "Creates a new folder", + }, + Key: "StoragePod.createFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move datastores into a datastore cluster", + Summary: "Move datastores into a datastore cluster", + }, + Key: "StoragePod.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a new virtual machine", + }, + Key: "StoragePod.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to this datastore cluster", + }, + Key: "StoragePod.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Creates a new cluster compute-resource in this datastore cluster", + }, + Key: "StoragePod.createCluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Creates a new cluster compute-resource in this datastore cluster", + }, + Key: "StoragePod.createClusterEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host", + Summary: "Creates a new single-host compute-resource", + }, + Key: "StoragePod.addStandaloneHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host and enable lockdown mode", + Summary: "Creates a new single-host compute-resource and enables lockdown mode on the host", + }, + Key: "StoragePod.addStandaloneHostWithAdminDisabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create datacenter", + Summary: "Create a new datacenter with the given name", + }, + Key: "StoragePod.createDatacenter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister and delete", + Summary: "Recursively deletes all child virtual machine folders and unregisters all virtual machines", + }, + Key: "StoragePod.unregisterAndDestroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vSphere Distributed Switch", + Summary: "Creates a vSphere Distributed Switch", + }, + Key: "StoragePod.createDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create datastore cluster", + Summary: "Creates a new datastore cluster", + }, + Key: "StoragePod.createStoragePod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare to upgrade", + Summary: "Deletes the content of the temporary directory on the host", + }, + Key: "AgentManager.prepareToUpgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade", + Summary: "Validates and executes the installer/uninstaller executable uploaded to the temporary directory", + }, + Key: "AgentManager.upgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure host power management policy", + Summary: "Configure host power management policy", + }, + Key: "host.PowerSystem.configurePolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set network custom Value", + Summary: "Sets the value of a custom field of a network", + }, + Key: "Network.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload network", + Summary: "Reload information about the network", + }, + Key: "Network.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename network", + Summary: "Rename network", + }, + Key: "Network.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete network", + Summary: "Deletes a network if it is not used by any host or virtual machine", + }, + Key: "Network.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the network", + }, + Key: "Network.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the network", + }, + Key: "Network.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Network.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove network", + Summary: "Remove network", + }, + Key: "Network.destroyNetwork", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve argument description for event type", + Summary: "Retrieves the argument meta-data for a given event type", + }, + Key: "event.EventManager.retrieveArgumentDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create event collector", + Summary: "Creates an event collector to retrieve all server events based on a filter", + }, + Key: "event.EventManager.createCollector", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Log user event", + Summary: "Logs a user-defined event", + }, + Key: "event.EventManager.logUserEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get events", + Summary: "Provides the events selected by the specified filter", + }, + Key: "event.EventManager.QueryEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query events by IDs", + Summary: "Returns the events specified by a list of IDs", + }, + Key: "event.EventManager.queryEventsById", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Post event", + Summary: "Posts the specified event", + }, + Key: "event.EventManager.postEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query latest events in event filter", + Summary: "Query the latest events in the specified filter", + }, + Key: "event.EventManager.queryLastEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual disk", + Summary: "Create the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.createVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual disk", + Summary: "Delete the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.deleteVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk information", + Summary: "Queries information about a virtual disk", + }, + Key: "VirtualDiskManager.queryVirtualDiskInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move virtual disk", + Summary: "Move the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.moveVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy virtual disk", + Summary: "Copy the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.copyVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend virtual disk", + Summary: "Expand the capacity of a virtual disk to the new capacity", + }, + Key: "VirtualDiskManager.extendVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk fragmentation", + Summary: "Return the percentage of fragmentation of the sparse virtual disk", + }, + Key: "VirtualDiskManager.queryVirtualDiskFragmentation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Defragment virtual disk", + Summary: "Defragment a sparse virtual disk", + }, + Key: "VirtualDiskManager.defragmentVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Shrink virtual disk", + Summary: "Shrink a sparse virtual disk", + }, + Key: "VirtualDiskManager.shrinkVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inflate virtual disk", + Summary: "Inflate a sparse virtual disk up to the full size", + }, + Key: "VirtualDiskManager.inflateVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Zero out virtual disk", + Summary: "Explicitly zero out the virtual disk.", + }, + Key: "VirtualDiskManager.eagerZeroVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fill virtual disk", + Summary: "Overwrite all blocks of the virtual disk with zeros", + }, + Key: "VirtualDiskManager.zeroFillVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Optimally eager zero the virtual disk", + Summary: "Optimally eager zero a VMFS thick virtual disk.", + }, + Key: "VirtualDiskManager.optimizeEagerZeroVirtualDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual disk UUID", + Summary: "Set the UUID for the disk, either a datastore path or a URL referring to the virtual disk", + }, + Key: "VirtualDiskManager.setVirtualDiskUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk UUID", + Summary: "Get the virtual disk SCSI inquiry page data", + }, + Key: "VirtualDiskManager.queryVirtualDiskUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk geometry", + Summary: "Get the disk geometry information for the virtual disk", + }, + Key: "VirtualDiskManager.queryVirtualDiskGeometry", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reparent disks", + Summary: "Reparent disks", + }, + Key: "VirtualDiskManager.reparentDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a child disk", + Summary: "Create a new disk and attach it to the end of disk chain specified", + }, + Key: "VirtualDiskManager.createChildDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "revertToChildDisk", + Summary: "revertToChildDisk", + }, + Key: "VirtualDiskManager.revertToChildDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Consolidate disks", + Summary: "Consolidate a list of disks to the parent most disk", + }, + Key: "VirtualDiskManager.consolidateDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "importUnmanagedSnapshot", + Summary: "importUnmanagedSnapshot", + }, + Key: "VirtualDiskManager.importUnmanagedSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "releaseManagedSnapshot", + Summary: "releaseManagedSnapshot", + }, + Key: "VirtualDiskManager.releaseManagedSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "enableUPIT", + Summary: "enableUPIT", + }, + Key: "VirtualDiskManager.enableUPIT", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "disableUPIT", + Summary: "disableUPIT", + }, + Key: "VirtualDiskManager.disableUPIT", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryObjectInfo", + Summary: "queryObjectInfo", + }, + Key: "VirtualDiskManager.queryObjectInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryObjectTypes", + Summary: "queryObjectTypes", + }, + Key: "VirtualDiskManager.queryObjectTypes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a virtual disk object", + Summary: "Create a virtual disk object", + }, + Key: "vslm.host.VStorageObjectManager.createDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register a legacy disk to be a virtual disk object", + Summary: "Register a legacy disk to be a virtual disk object", + }, + Key: "vslm.host.VStorageObjectManager.registerDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend a virtual disk to the new capacity", + Summary: "Extend a virtual disk to the new capacity", + }, + Key: "vslm.host.VStorageObjectManager.extendDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inflate a thin virtual disk", + Summary: "Inflate a thin virtual disk", + }, + Key: "vslm.host.VStorageObjectManager.inflateDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename a virtual storage object", + Summary: "Rename a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.renameVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update storage policy on a virtual storage object", + Summary: "Update storage policy on a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.updateVStorageObjectPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a virtual storage object", + Summary: "Delete a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.deleteVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve a virtual storage object", + Summary: "Retrieve a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.retrieveVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveVStorageObjectState", + Summary: "retrieveVStorageObjectState", + }, + Key: "vslm.host.VStorageObjectManager.retrieveVStorageObjectState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List virtual storage objects on a datastore", + Summary: "List virtual storage objects on a datastore", + }, + Key: "vslm.host.VStorageObjectManager.listVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone a virtual storage object", + Summary: "Clone a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.cloneVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate a virtual storage object", + Summary: "Relocate a virtual storage object", + }, + Key: "vslm.host.VStorageObjectManager.relocateVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconcile datastore inventory", + Summary: "Reconcile datastore inventory", + }, + Key: "vslm.host.VStorageObjectManager.reconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Schedule reconcile datastore inventory", + Summary: "Schedule reconcile datastore inventory", + }, + Key: "vslm.host.VStorageObjectManager.scheduleReconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare vMotion send operation", + Summary: "Prepare a vMotion send operation", + }, + Key: "host.VMotionManager.prepareSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare VMotion send operation asynchronously", + Summary: "Prepares a VMotion send operation asynchronously", + }, + Key: "host.VMotionManager.prepareSourceEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare vMotion receive operation", + Summary: "Prepare a vMotion receive operation", + }, + Key: "host.VMotionManager.prepareDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare vMotion receive operation asynchronously", + Summary: "Prepares a vMotion receive operation asynchronously", + }, + Key: "host.VMotionManager.prepareDestinationEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate vMotion receive operation", + Summary: "Initiate a vMotion receive operation", + }, + Key: "host.VMotionManager.initiateDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate vMotion send operation", + Summary: "Initiate a vMotion send operation", + }, + Key: "host.VMotionManager.initiateSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate VMotion send operation", + Summary: "Initiates a VMotion send operation", + }, + Key: "host.VMotionManager.initiateSourceEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Complete vMotion source notification", + Summary: "Tell the source that vMotion migration is complete (success or failure)", + }, + Key: "host.VMotionManager.completeSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Complete vMotion receive notification", + Summary: "Tell the destination that vMotion migration is complete (success or failure)", + }, + Key: "host.VMotionManager.completeDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Commit vMotion destination upgrade", + Summary: "Reparent the disks at destination and commit the redo logs at the end of a vMotion migration", + }, + Key: "host.VMotionManager.upgradeDestination", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update VMotionManager memory mirror migrate flag", + Summary: "Enables or disables VMotionManager memory mirror migrate", + }, + Key: "host.VMotionManager.updateMemMirrorFlag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryMigrationIds", + Summary: "queryMigrationIds", + }, + Key: "host.VMotionManager.queryMigrationIds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSubSpecificationByFile", + Summary: "updateHostSubSpecificationByFile", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.updateHostSubSpecificationByFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateHostSubSpecificationByData", + Summary: "updateHostSubSpecificationByData", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.updateHostSubSpecificationByData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveHostSpecification", + Summary: "retrieveHostSpecification", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.retrieveHostSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "deleteHostSubSpecification", + Summary: "deleteHostSubSpecification", + }, + Key: "profile.host.profileEngine.HostSpecificationAgent.deleteHostSubSpecification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addKey", + Summary: "addKey", + }, + Key: "encryption.CryptoManagerKmip.addKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addKeys", + Summary: "addKeys", + }, + Key: "encryption.CryptoManagerKmip.addKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeKey", + Summary: "removeKey", + }, + Key: "encryption.CryptoManagerKmip.removeKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeKeys", + Summary: "removeKeys", + }, + Key: "encryption.CryptoManagerKmip.removeKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listKeys", + Summary: "listKeys", + }, + Key: "encryption.CryptoManagerKmip.listKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "registerKmipServer", + Summary: "registerKmipServer", + }, + Key: "encryption.CryptoManagerKmip.registerKmipServer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "markDefault", + Summary: "markDefault", + }, + Key: "encryption.CryptoManagerKmip.markDefault", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateKmipServer", + Summary: "updateKmipServer", + }, + Key: "encryption.CryptoManagerKmip.updateKmipServer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeKmipServer", + Summary: "removeKmipServer", + }, + Key: "encryption.CryptoManagerKmip.removeKmipServer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listKmipServers", + Summary: "listKmipServers", + }, + Key: "encryption.CryptoManagerKmip.listKmipServers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveKmipServersStatus", + Summary: "retrieveKmipServersStatus", + }, + Key: "encryption.CryptoManagerKmip.retrieveKmipServersStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateKey", + Summary: "generateKey", + }, + Key: "encryption.CryptoManagerKmip.generateKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveKmipServerCert", + Summary: "retrieveKmipServerCert", + }, + Key: "encryption.CryptoManagerKmip.retrieveKmipServerCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "uploadKmipServerCert", + Summary: "uploadKmipServerCert", + }, + Key: "encryption.CryptoManagerKmip.uploadKmipServerCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateSelfSignedClientCert", + Summary: "generateSelfSignedClientCert", + }, + Key: "encryption.CryptoManagerKmip.generateSelfSignedClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateClientCsr", + Summary: "generateClientCsr", + }, + Key: "encryption.CryptoManagerKmip.generateClientCsr", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveSelfSignedClientCert", + Summary: "retrieveSelfSignedClientCert", + }, + Key: "encryption.CryptoManagerKmip.retrieveSelfSignedClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveClientCsr", + Summary: "retrieveClientCsr", + }, + Key: "encryption.CryptoManagerKmip.retrieveClientCsr", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveClientCert", + Summary: "retrieveClientCert", + }, + Key: "encryption.CryptoManagerKmip.retrieveClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateSelfSignedClientCert", + Summary: "updateSelfSignedClientCert", + }, + Key: "encryption.CryptoManagerKmip.updateSelfSignedClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateKmsSignedCsrClientCert", + Summary: "updateKmsSignedCsrClientCert", + }, + Key: "encryption.CryptoManagerKmip.updateKmsSignedCsrClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "uploadClientCert", + Summary: "uploadClientCert", + }, + Key: "encryption.CryptoManagerKmip.uploadClientCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister extension", + Summary: "Unregisters an extension", + }, + Key: "ExtensionManager.unregisterExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find extension", + Summary: "Find an extension", + }, + Key: "ExtensionManager.findExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register extension", + Summary: "Registers an extension", + }, + Key: "ExtensionManager.registerExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update extension", + Summary: "Updates extension information", + }, + Key: "ExtensionManager.updateExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get server public key", + Summary: "Get vCenter Server's public key", + }, + Key: "ExtensionManager.getPublicKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set extension public key", + Summary: "Set public key of the extension", + }, + Key: "ExtensionManager.setPublicKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set extension certificate", + Summary: "Update the stored authentication certificate for a specified extension", + }, + Key: "ExtensionManager.setCertificate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update extension data", + Summary: "Updates extension-specific data associated with an extension", + }, + Key: "ExtensionManager.updateExtensionData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query extension data", + Summary: "Retrieves extension-specific data associated with an extension", + }, + Key: "ExtensionManager.queryExtensionData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query extension data keys", + Summary: "Retrieves extension-specific data keys associated with an extension", + }, + Key: "ExtensionManager.queryExtensionDataKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear extension data", + Summary: "Clears extension-specific data associated with an extension", + }, + Key: "ExtensionManager.clearExtensionData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query extension data usage", + Summary: "Retrieves statistics about the amount of data being stored by extensions registered with vCenter Server", + }, + Key: "ExtensionManager.queryExtensionDataUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query entities managed by extension", + Summary: "Finds entities managed by an extension", + }, + Key: "ExtensionManager.queryManagedBy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query statistics about IP allocation usage", + Summary: "Query statistics about IP allocation usage, system-wide or for specified extensions", + }, + Key: "ExtensionManager.queryExtensionIpAllocationUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable replication of virtual machine", + Summary: "Enable replication of virtual machine", + }, + Key: "HbrManager.enableReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable replication of virtual machine", + Summary: "Disable replication of virtual machine", + }, + Key: "HbrManager.disableReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure replication for virtual machine", + Summary: "Reconfigure replication for virtual machine", + }, + Key: "HbrManager.reconfigureReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve replication configuration of virtual machine", + Summary: "Retrieve replication configuration of virtual machine", + }, + Key: "HbrManager.retrieveReplicationConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Pause replication of virtual machine", + Summary: "Pause replication of virtual machine", + }, + Key: "HbrManager.pauseReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resume replication of virtual machine", + Summary: "Resume replication of virtual machine", + }, + Key: "HbrManager.resumeReplication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start a replication resynchronization for virtual machine", + Summary: "Start a replication resynchronization for virtual machine", + }, + Key: "HbrManager.fullSync", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start new replication instance for virtual machine", + Summary: "Start extraction and transfer of a new replication instance for virtual machine", + }, + Key: "HbrManager.createInstance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replicate powered-off virtual machine", + Summary: "Transfer a replication instance for powered-off virtual machine", + }, + Key: "HbrManager.startOfflineInstance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop replication of powered-off virtual machine", + Summary: "Stop replication of powered-off virtual machine", + }, + Key: "HbrManager.stopOfflineInstance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine replication state", + Summary: "Qureies the current state of a replicated virtual machine", + }, + Key: "HbrManager.queryReplicationState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryReplicationCapabilities", + Summary: "queryReplicationCapabilities", + }, + Key: "HbrManager.queryReplicationCapabilities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set storage custom value", + Summary: "Sets the value of a custom field of a host storage system", + }, + Key: "host.StorageSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve disk partition information", + Summary: "Gets the partition information for the disks named by the device names", + }, + Key: "host.StorageSystem.retrieveDiskPartitionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Compute disk partition information", + Summary: "Computes the disk partition information given the desired disk layout", + }, + Key: "host.StorageSystem.computeDiskPartitionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Compute disk partition information for resize", + Summary: "Compute disk partition information for resizing a partition", + }, + Key: "host.StorageSystem.computeDiskPartitionInfoForResize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update disk partitions", + Summary: "Change the partitions on the disk by supplying a partition specification and the device name", + }, + Key: "host.StorageSystem.updateDiskPartitions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Format VMFS", + Summary: "Formats a new VMFS on a disk partition", + }, + Key: "host.StorageSystem.formatVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mount VMFS volume", + Summary: "Mounts an unmounted VMFS volume", + }, + Key: "host.StorageSystem.mountVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount VMFS volume", + Summary: "Unmount a mounted VMFS volume", + }, + Key: "host.StorageSystem.unmountVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount VMFS volumes", + Summary: "Unmounts one or more mounted VMFS volumes", + }, + Key: "host.StorageSystem.unmountVmfsVolumeEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "mountVmfsVolumeEx", + Summary: "mountVmfsVolumeEx", + }, + Key: "host.StorageSystem.mountVmfsVolumeEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unmapVmfsVolumeEx", + Summary: "unmapVmfsVolumeEx", + }, + Key: "host.StorageSystem.unmapVmfsVolumeEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete state information for unmounted VMFS volume", + Summary: "Removes the state information for a previously unmounted VMFS volume", + }, + Key: "host.StorageSystem.deleteVmfsVolumeState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan VMFS", + Summary: "Rescan for new VMFS volumes", + }, + Key: "host.StorageSystem.rescanVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend VMFS", + Summary: "Extend a VMFS by attaching a disk partition", + }, + Key: "host.StorageSystem.attachVmfsExtent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Expand VMFS extent", + Summary: "Expand the capacity of the VMFS extent", + }, + Key: "host.StorageSystem.expandVmfsExtent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade VMFS", + Summary: "Upgrade the VMFS to the current VMFS version", + }, + Key: "host.StorageSystem.upgradeVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate virtual machine disks", + Summary: "Relocate the disks for all virtual machines into directories if stored in the ROOT", + }, + Key: "host.StorageSystem.upgradeVmLayout", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query unbound VMFS volumes", + Summary: "Query for the list of unbound VMFS volumes", + }, + Key: "host.StorageSystem.queryUnresolvedVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve VMFS volumes", + Summary: "Resolve the detected copies of VMFS volumes", + }, + Key: "host.StorageSystem.resolveMultipleUnresolvedVmfsVolumes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve VMFS volumes", + Summary: "Resolves the detected copies of VMFS volumes", + }, + Key: "host.StorageSystem.resolveMultipleUnresolvedVmfsVolumesEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount force mounted VMFS", + Summary: "Unmounts a force mounted VMFS volume", + }, + Key: "host.StorageSystem.unmountForceMountedVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan HBA", + Summary: "Rescan a specific storage adapter for new storage devices", + }, + Key: "host.StorageSystem.rescanHba", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan all HBAs", + Summary: "Rescan all storage adapters for new storage devices", + }, + Key: "host.StorageSystem.rescanAllHba", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change Software Internet SCSI Status", + Summary: "Enables or disables Software Internet SCSI", + }, + Key: "host.StorageSystem.updateSoftwareInternetScsiEnabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI discovery properties", + Summary: "Updates the discovery properties for an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiDiscoveryProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI authentication properties", + Summary: "Updates the authentication properties for an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiAuthenticationProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI digest properties", + Summary: "Update the digest properties of an Internet SCSI host bus adapter or target", + }, + Key: "host.StorageSystem.updateInternetScsiDigestProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI advanced options", + Summary: "Update the advanced options of an Internet SCSI host bus adapter or target", + }, + Key: "host.StorageSystem.updateInternetScsiAdvancedOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI IP properties", + Summary: "Updates the IP properties for an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiIPProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI name", + Summary: "Updates the name of an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Internet SCSI alias", + Summary: "Updates the alias of an Internet SCSI host bus adapter", + }, + Key: "host.StorageSystem.updateInternetScsiAlias", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Internet SCSI send targets", + Summary: "Adds send target entries to the host bus adapter discovery list", + }, + Key: "host.StorageSystem.addInternetScsiSendTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Internet SCSI send targets", + Summary: "Removes send target entries from the host bus adapter discovery list", + }, + Key: "host.StorageSystem.removeInternetScsiSendTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Internet SCSI static targets ", + Summary: "Adds static target entries to the host bus adapter discovery list", + }, + Key: "host.StorageSystem.addInternetScsiStaticTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Internet SCSI static targets", + Summary: "Removes static target entries from the host bus adapter discovery list", + }, + Key: "host.StorageSystem.removeInternetScsiStaticTargets", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable multiple path", + Summary: "Enable a path for a logical unit", + }, + Key: "host.StorageSystem.enableMultipathPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable multiple path", + Summary: "Disable a path for a logical unit", + }, + Key: "host.StorageSystem.disableMultipathPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set logical unit policy", + Summary: "Set the multipath policy for a logical unit ", + }, + Key: "host.StorageSystem.setMultipathLunPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query path selection policy options", + Summary: "Queries the set of path selection policy options", + }, + Key: "host.StorageSystem.queryPathSelectionPolicyOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query storage array type policy options", + Summary: "Queries the set of storage array type policy options", + }, + Key: "host.StorageSystem.queryStorageArrayTypePolicyOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update SCSI LUN display name", + Summary: "Updates the display name of a SCSI LUN", + }, + Key: "host.StorageSystem.updateScsiLunDisplayName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach SCSI LUN", + Summary: "Blocks I/O operations to the attached SCSI LUN", + }, + Key: "host.StorageSystem.detachScsiLun", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach SCSI LUNs", + Summary: "Blocks I/O operations to one or more attached SCSI LUNs", + }, + Key: "host.StorageSystem.detachScsiLunEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete state information for detached SCSI LUN", + Summary: "Removes the state information for a previously detached SCSI LUN", + }, + Key: "host.StorageSystem.deleteScsiLunState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach SCSI LUN", + Summary: "Allow I/O issue to the specified detached SCSI LUN", + }, + Key: "host.StorageSystem.attachScsiLun", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach SCSI LUNs", + Summary: "Enables I/O operations to one or more detached SCSI LUNs", + }, + Key: "host.StorageSystem.attachScsiLunEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh host storage system", + Summary: "Refresh the storage information and settings to pick up any changes that have occurred", + }, + Key: "host.StorageSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Discover FCOE storage", + Summary: "Discovers new storage using FCOE", + }, + Key: "host.StorageSystem.discoverFcoeHbas", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update FCOE HBA state", + Summary: "Mark or unmark the specified FCOE HBA for removal from the host system", + }, + Key: "host.StorageSystem.markForRemoval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Format VFFS", + Summary: "Formats a new VFFS on a SSD disk", + }, + Key: "host.StorageSystem.formatVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend VFFS", + Summary: "Extends a VFFS by attaching a SSD disk", + }, + Key: "host.StorageSystem.extendVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete VFFS", + Summary: "Deletes a VFFS from the host", + }, + Key: "host.StorageSystem.destroyVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mounts VFFS volume", + Summary: "Mounts an unmounted VFFS volume", + }, + Key: "host.StorageSystem.mountVffsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmounts VFFS volume", + Summary: "Unmounts a mounted VFFS volume", + }, + Key: "host.StorageSystem.unmountVffsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete state information for unmounted VFFS volume", + Summary: "Removes the state information for a previously unmounted VFFS volume", + }, + Key: "host.StorageSystem.deleteVffsVolumeState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rescan VFFS", + Summary: "Rescans for new VFFS volumes", + }, + Key: "host.StorageSystem.rescanVffs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query available SSD disks", + Summary: "Queries available SSD disks", + }, + Key: "host.StorageSystem.queryAvailableSsds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set NFS user", + Summary: "Sets an NFS user", + }, + Key: "host.StorageSystem.setNFSUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change NFS user password", + Summary: "Changes the password of an NFS user", + }, + Key: "host.StorageSystem.changeNFSUserPassword", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query NFS user", + Summary: "Queries an NFS user", + }, + Key: "host.StorageSystem.queryNFSUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear NFS user", + Summary: "Deletes an NFS user", + }, + Key: "host.StorageSystem.clearNFSUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn on disk locator LEDs", + Summary: "Turns on one or more disk locator LEDs", + }, + Key: "host.StorageSystem.turnDiskLocatorLedOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn off locator LEDs", + Summary: "Turns off one or more disk locator LEDs", + }, + Key: "host.StorageSystem.turnDiskLocatorLedOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a flash disk", + Summary: "Marks the disk as a flash disk", + }, + Key: "host.StorageSystem.markAsSsd", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a HDD disk", + Summary: "Marks the disk as a HDD disk", + }, + Key: "host.StorageSystem.markAsNonSsd", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a local disk", + Summary: "Marks the disk as a local disk", + }, + Key: "host.StorageSystem.markAsLocal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark the disk as a remote disk", + Summary: "Marks the disk as a remote disk", + }, + Key: "host.StorageSystem.markAsNonLocal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "QueryIoFilterProviderId", + Summary: "QueryIoFilterProviderId", + }, + Key: "host.StorageSystem.QueryIoFilterProviderId", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "FetchIoFilterSharedSecret", + Summary: "FetchIoFilterSharedSecret", + }, + Key: "host.StorageSystem.FetchIoFilterSharedSecret", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update VMFS unmap priority", + Summary: "Updates the priority of VMFS space reclamation operation", + }, + Key: "host.StorageSystem.updateVmfsUnmapPriority", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query VMFS config option", + Summary: "Query VMFS config option", + }, + Key: "host.StorageSystem.queryVmfsConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate vMotion migration of VMs to hosts", + Summary: "Checks whether the specified VMs can be migrated with vMotion to all the specified hosts", + }, + Key: "vm.check.ProvisioningChecker.queryVMotionCompatibilityEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate migration of VM to destination", + Summary: "Checks whether the VM can be migrated to the specified destination host, resource pool, and datastores", + }, + Key: "vm.check.ProvisioningChecker.checkMigrate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate relocation of VM to destination", + Summary: "Checks whether the VM can be relocated to the specified destination host, resource pool, and datastores", + }, + Key: "vm.check.ProvisioningChecker.checkRelocate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evaluate cloning VM to destination", + Summary: "Checks whether the VM can be cloned to the specified destination host, resource pool, and datastores", + }, + Key: "vm.check.ProvisioningChecker.checkClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "checkInstantClone", + Summary: "checkInstantClone", + }, + Key: "vm.check.ProvisioningChecker.checkInstantClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster profile", + Summary: "Create cluster profile", + }, + Key: "profile.cluster.ProfileManager.createProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query policy metadata", + Summary: "Query policy metadata", + }, + Key: "profile.cluster.ProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find associated profile", + Summary: "Find associated profile", + }, + Key: "profile.cluster.ProfileManager.findAssociatedProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare a vCenter HA setup", + Summary: "Prepare vCenter HA setup on the local vCenter Server", + }, + Key: "vcha.FailoverClusterConfigurator.prepare", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy a vCenter HA cluster", + Summary: "Deploy and configure vCenter HA on the local vCenter Server", + }, + Key: "vcha.FailoverClusterConfigurator.deploy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure a vCenter HA cluster", + Summary: "Configure vCenter HA on the local vCenter Server", + }, + Key: "vcha.FailoverClusterConfigurator.configure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create passive node", + Summary: "Create a passive node in a vCenter HA Cluster", + }, + Key: "vcha.FailoverClusterConfigurator.createPassiveNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create witness node", + Summary: "Create a witness node in a vCenter HA Cluster", + }, + Key: "vcha.FailoverClusterConfigurator.createWitnessNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getConfig", + Summary: "getConfig", + }, + Key: "vcha.FailoverClusterConfigurator.getConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Destroy the vCenter HA cluster", + Summary: "Destroy the vCenter HA cluster setup and remove all configuration files", + }, + Key: "vcha.FailoverClusterConfigurator.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get current time", + Summary: "Returns the current time on the server", + }, + Key: "ServiceInstance.currentTime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve content", + Summary: "Get the properties of the service instance", + }, + Key: "ServiceInstance.retrieveContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve internal properties", + Summary: "Retrieves the internal properties of the service instance", + }, + Key: "ServiceInstance.retrieveInternalContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate migration", + Summary: "Checks for errors and warnings of virtual machines migrated from one host to another", + }, + Key: "ServiceInstance.validateMigration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vMotion compatibility", + Summary: "Validates the vMotion compatibility of a set of hosts", + }, + Key: "ServiceInstance.queryVMotionCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve product components", + Summary: "Component information for bundled products", + }, + Key: "ServiceInstance.retrieveProductComponents", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vSphere Distributed Switch", + Summary: "Create vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.createDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove vSphere Distributed Switch", + Summary: "Remove vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.removeDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere Distributed Switch", + Summary: "Reconfigure vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.reconfigureDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update dvPort", + Summary: "Update dvPort", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.updatePorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete ports", + Summary: "Delete ports", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.deletePorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve port state", + Summary: "Retrieve port state", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.fetchPortState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone port", + Summary: "Clone port", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.clonePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve vSphere Distributed Switch configuration specification", + Summary: "Retrieve vSphere Distributed Switch configuration specification", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDvsConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Distributed Port Groups", + Summary: "Update Distributed Port Group", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.updateDVPortgroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve port group keys for vSphere Distributed Switch", + Summary: "Retrieve the list of port group keys on a given vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDVPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve distributed virtual port group specification", + Summary: "Retrievs the configuration specification for distributed virtual port groups", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDVPortgroupConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Load port", + Summary: "Load port", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.loadDVPort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve the list of port keys on the given vSphere Distributed Switch", + Summary: "Retrieve the list of port keys on the given vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.retrieveDVPort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update dvPorts", + Summary: "Update dvPort", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Distributed Port Groups", + Summary: "Update Distributed Port Group", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch", + Summary: "Update vSphere Distributed Switch", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDvs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch list", + Summary: "Update vSphere Distributed Switch list", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDvsList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Distributed Port Group list", + Summary: "Update Distributed Port Group list", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPortgroupList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update dvPort list", + Summary: "Update dvPort list", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.applyDVPortList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute opaque command", + Summary: "Execute opaque command", + }, + Key: "dvs.HostDistributedVirtualSwitchManager.executeOpaqueCommand", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create default host profile of specified type", + Summary: "Creates a default host profile of the specified type", + }, + Key: "profile.host.profileEngine.HostProfileManager.createDefaultProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile policy option metadata", + Summary: "Gets the profile policy option metadata for the specified policy names", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile metadata", + Summary: "Gets the profile metadata for the specified profile names and profile types", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile category metadata", + Summary: "Gets the profile category metadata for the specified category names", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileCategoryMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile component metadata", + Summary: "Gets the profile component metadata for the specified component names", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileComponentMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute host profile manager engine", + Summary: "Executes the host profile manager engine", + }, + Key: "profile.host.profileEngine.HostProfileManager.execute", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Bookkeep host profile", + Summary: "Bookkeep host profile", + }, + Key: "profile.host.profileEngine.HostProfileManager.bookKeep", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve profile description", + Summary: "Retrieves description of a profile", + }, + Key: "profile.host.profileEngine.HostProfileManager.retrieveProfileDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update configuration tasks from host configuration", + Summary: "Update configuration tasks from host configuration", + }, + Key: "profile.host.profileEngine.HostProfileManager.updateTaskConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateTaskList", + Summary: "generateTaskList", + }, + Key: "profile.host.profileEngine.HostProfileManager.generateTaskList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateHostConfigTaskSpec", + Summary: "generateHostConfigTaskSpec", + }, + Key: "profile.host.profileEngine.HostProfileManager.generateHostConfigTaskSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve profile from host configuration", + Summary: "Retrieves a profile from the host's configuration", + }, + Key: "profile.host.profileEngine.HostProfileManager.retrieveProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare host profile for export", + Summary: "Prepares a host profile for export", + }, + Key: "profile.host.profileEngine.HostProfileManager.prepareExport", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query user input policy options", + Summary: "Gets a list of policy options that are set to require user inputs", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryUserInputPolicyOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query profile structure", + Summary: "Gets information about the structure of a profile", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryProfileStructure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply host configuration", + Summary: "Applies the specified host configuration to the host", + }, + Key: "profile.host.profileEngine.HostProfileManager.applyHostConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host profile manager state", + Summary: "Gets the current state of the host profile manager and plug-ins on a host", + }, + Key: "profile.host.profileEngine.HostProfileManager.queryState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check virtual machine's compatibility on host", + Summary: "Checks whether a virtual machine is compatible on a host", + }, + Key: "vm.check.CompatibilityChecker.checkCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compatibility of a VM specification on a host", + Summary: "Checks compatibility of a VM specification on a host", + }, + Key: "vm.check.CompatibilityChecker.checkVMCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query service list", + Summary: "Location information that needs to match a service", + }, + Key: "ServiceManager.queryServiceList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove inventory view", + Summary: "Remove the inventory view object", + }, + Key: "view.InventoryView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open inventory view folder", + Summary: "Adds the child objects of a given managed entity to the view", + }, + Key: "view.InventoryView.openFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Close inventory view", + Summary: "Notify the server that folders have been closed", + }, + Key: "view.InventoryView.closeFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure host update proxy", + Summary: "Reconfigure host update proxy", + }, + Key: "host.HostUpdateProxyManager.reconfigureHostUpdateProxy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve configuration of the host update proxy", + Summary: "Retrieve configuration of the host update proxy", + }, + Key: "host.HostUpdateProxyManager.retrieveHostUpdateProxyConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update VMCI access rights", + Summary: "Updates VMCI (Virtual Machine Communication Interface) access rights for one or more virtual machines", + }, + Key: "host.VmciAccessManager.updateAccess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve VMCI service rights granted to virtual machine", + Summary: "Retrieve VMCI (Virtual Machine Communication Interface) service rights granted to a VM", + }, + Key: "host.VmciAccessManager.retrieveGrantedServices", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machines with access to VMCI service", + Summary: "Gets the VMs with granted access to a service", + }, + Key: "host.VmciAccessManager.queryAccessToService", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "promoteDisks", + Summary: "promoteDisks", + }, + Key: "host.LowLevelProvisioningManager.promoteDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a virtual machine on disk", + }, + Key: "host.LowLevelProvisioningManager.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual machine", + Summary: "Deletes a virtual machine on disk", + }, + Key: "host.LowLevelProvisioningManager.deleteVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual machine without deleting its virtual disks", + Summary: "Deletes a virtual machine from its storage, all virtual machine files are deleted except its associated virtual disks", + }, + Key: "host.LowLevelProvisioningManager.deleteVmExceptDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve virtual machine recovery information", + Summary: "Retrieves virtual machine recovery information", + }, + Key: "host.LowLevelProvisioningManager.retrieveVmRecoveryInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve last virtual machine migration status", + Summary: "Retrieves the last virtual machine migration status if available", + }, + Key: "host.LowLevelProvisioningManager.retrieveLastVmMigrationStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure virtual machine", + Summary: "Reconfigures the virtual machine", + }, + Key: "host.LowLevelProvisioningManager.reconfigVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload disks", + Summary: "Reloads virtual disk information", + }, + Key: "host.LowLevelProvisioningManager.reloadDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Consolidate disks", + Summary: "Consolidates virtual disks", + }, + Key: "host.LowLevelProvisioningManager.consolidateDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update snapshot layout information", + Summary: "Updates the snapshot layout information of a virtual machine and reloads its snapshots", + }, + Key: "host.LowLevelProvisioningManager.relayoutSnapshots", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reserve files for provisioning", + Summary: "Reserves files or directories on a datastore to be used for a provisioning", + }, + Key: "host.LowLevelProvisioningManager.reserveFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete files", + Summary: "Deletes a list of files from a datastore", + }, + Key: "host.LowLevelProvisioningManager.deleteFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extract NVRAM content", + Summary: "Extracts the NVRAM content from a checkpoint file", + }, + Key: "host.LowLevelProvisioningManager.extractNvramContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "setCustomValue", + Summary: "setCustomValue", + }, + Key: "external.ContentLibraryItem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "reload", + Summary: "reload", + }, + Key: "external.ContentLibraryItem.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rename", + Summary: "rename", + }, + Key: "external.ContentLibraryItem.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "destroy", + Summary: "destroy", + }, + Key: "external.ContentLibraryItem.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addTag", + Summary: "addTag", + }, + Key: "external.ContentLibraryItem.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeTag", + Summary: "removeTag", + }, + Key: "external.ContentLibraryItem.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "external.ContentLibraryItem.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete container view", + Summary: "Remove a list view object from current contents of this view", + }, + Key: "view.ContainerView.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set datastore custom value", + Summary: "Sets the value of a custom field of a datastore", + }, + Key: "Datastore.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload datastore", + Summary: "Reload information about the datastore", + }, + Key: "Datastore.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename datastore", + Summary: "Renames a datastore", + }, + Key: "Datastore.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datastore", + Summary: "Removes a datastore if it is not used by any host or virtual machine", + }, + Key: "Datastore.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Tag", + Summary: "Add a set of tags to the datastore", + }, + Key: "Datastore.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the datastore", + }, + Key: "Datastore.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Datastore.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh datastore", + Summary: "Refreshes free space on this datastore", + }, + Key: "Datastore.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh storage information", + Summary: "Refresh the storage information of the datastore", + }, + Key: "Datastore.refreshStorageInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update virtual machine files", + Summary: "Update virtual machine files on the datastore", + }, + Key: "Datastore.updateVirtualMachineFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename datastore", + Summary: "Rename the datastore", + }, + Key: "Datastore.renameDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete datastore", + Summary: "Delete datastore", + }, + Key: "Datastore.destroyDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replace embedded file paths", + Summary: "Replace embedded file paths on the datastore", + }, + Key: "Datastore.replaceEmbeddedFilePaths", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter SDRS maintenance mode", + Summary: "Virtual machine evacuation recommendations from the selected datastore are generated for SDRS maintenance mode", + }, + Key: "Datastore.enterMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit SDRS maintenance mode", + Summary: "Exit SDRS maintenance mode", + }, + Key: "Datastore.exitMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get native clone capability", + Summary: "Check if the datastore supports native clone", + }, + Key: "Datastore.isNativeCloneCapable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cleanup locks", + Summary: "Cleanup lock files on NFSV3 datastore", + }, + Key: "Datastore.cleanupLocks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateVVolVirtualMachineFiles", + Summary: "updateVVolVirtualMachineFiles", + }, + Key: "Datastore.updateVVolVirtualMachineFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create scheduled task", + Summary: "Create a scheduled task", + }, + Key: "scheduler.ScheduledTaskManager.create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve scheduled task", + Summary: "Available scheduled tasks defined on the entity", + }, + Key: "scheduler.ScheduledTaskManager.retrieveEntityScheduledTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create scheduled task", + Summary: "Create a scheduled task", + }, + Key: "scheduler.ScheduledTaskManager.createObjectScheduledTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve scheduled task", + Summary: "Available scheduled tasks defined on the object", + }, + Key: "scheduler.ScheduledTaskManager.retrieveObjectScheduledTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add role", + Summary: "Add a new role", + }, + Key: "AuthorizationManager.addRole", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove role", + Summary: "Remove a role", + }, + Key: "AuthorizationManager.removeRole", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update role", + Summary: "Update a role's name and/or privileges", + }, + Key: "AuthorizationManager.updateRole", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reassign permissions", + Summary: "Reassign all permissions of a role to another role", + }, + Key: "AuthorizationManager.mergePermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get role permissions", + Summary: "Gets all the permissions that use a particular role", + }, + Key: "AuthorizationManager.retrieveRolePermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get entity permissions", + Summary: "Get permissions defined on an entity", + }, + Key: "AuthorizationManager.retrieveEntityPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get permissions", + Summary: "Get the permissions defined for all users", + }, + Key: "AuthorizationManager.retrieveAllPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrievePermissions", + Summary: "retrievePermissions", + }, + Key: "AuthorizationManager.retrievePermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set entity permission rules", + Summary: "Define or update permission rules on an entity", + }, + Key: "AuthorizationManager.setEntityPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset entity permission rules", + Summary: "Reset permission rules on an entity to the provided set", + }, + Key: "AuthorizationManager.resetEntityPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove entity permission", + Summary: "Remove a permission rule from the entity", + }, + Key: "AuthorizationManager.removeEntityPermission", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query disabled methods", + Summary: "Get the list of source objects that have been disabled on the target entity", + }, + Key: "AuthorizationManager.queryDisabledMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable authorization methods", + Summary: "Gets the set of method names to be disabled", + }, + Key: "AuthorizationManager.disableMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable authorization methods", + Summary: "Gets the set of method names to be enabled", + }, + Key: "AuthorizationManager.enableMethods", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check privileges on a managed entity", + Summary: "Checks whether a session holds a set of privileges on a managed entity", + }, + Key: "AuthorizationManager.hasPrivilegeOnEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check privileges on a set of managed entities", + Summary: "Checks whether a session holds a set of privileges on a set of managed entities", + }, + Key: "AuthorizationManager.hasPrivilegeOnEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "hasUserPrivilegeOnEntities", + Summary: "hasUserPrivilegeOnEntities", + }, + Key: "AuthorizationManager.hasUserPrivilegeOnEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "fetchUserPrivilegeOnEntities", + Summary: "fetchUserPrivilegeOnEntities", + }, + Key: "AuthorizationManager.fetchUserPrivilegeOnEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check method invocation privileges", + Summary: "Checks whether a session holds a set of privileges required to invoke a specified method", + }, + Key: "AuthorizationManager.checkMethodInvocation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query required permissions", + Summary: "Get the permission requirements for the specified request", + }, + Key: "AuthorizationManager.queryPermissions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "", + Summary: "", + }, + Key: "ServiceDirectory.queryServiceEndpointList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register service endpoint", + Summary: "Registers a service endpoint", + }, + Key: "ServiceDirectory.registerService", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister service endpoint", + Summary: "Unregisters a service endpoint", + }, + Key: "ServiceDirectory.unregisterService", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query options view", + Summary: "Returns nodes in the option hierarchy", + }, + Key: "option.OptionManager.queryView", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update option values", + Summary: "Updates one or more properties", + }, + Key: "option.OptionManager.updateValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "validate", + Summary: "validate", + }, + Key: "vdcs.NicManager.validate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "bind", + Summary: "bind", + }, + Key: "vdcs.NicManager.bind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unbind", + Summary: "unbind", + }, + Key: "vdcs.NicManager.unbind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Specification exists", + Summary: "Check the existence of a specification", + }, + Key: "CustomizationSpecManager.exists", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get specification", + Summary: "Gets a specification", + }, + Key: "CustomizationSpecManager.get", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create new specification", + Summary: "Create a new specification", + }, + Key: "CustomizationSpecManager.create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Overwrite specification", + Summary: "Overwrite an existing specification", + }, + Key: "CustomizationSpecManager.overwrite", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete specification", + Summary: "Delete a specification", + }, + Key: "CustomizationSpecManager.delete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Duplicate specification", + Summary: "Duplicate a specification", + }, + Key: "CustomizationSpecManager.duplicate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename specification", + Summary: "Rename a specification", + }, + Key: "CustomizationSpecManager.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert specification item", + Summary: "Convert a specification item to XML text", + }, + Key: "CustomizationSpecManager.specItemToXml", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert XML item", + Summary: "Convert an XML string to a specification item", + }, + Key: "CustomizationSpecManager.xmlToSpecItem", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate required resources", + Summary: "Validate that required resources are available on the server to customize a particular guest operating system", + }, + Key: "CustomizationSpecManager.checkResources", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set cluster resource custom value", + Summary: "Sets the value of a custom field for a cluster of objects as a unified compute-resource", + }, + Key: "ClusterComputeResource.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload cluster", + Summary: "Reloads the cluster", + }, + Key: "ClusterComputeResource.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename cluster", + Summary: "Rename the compute-resource", + }, + Key: "ClusterComputeResource.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove cluster", + Summary: "Deletes the cluster compute-resource and removes it from its parent folder (if any)", + }, + Key: "ClusterComputeResource.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the cluster", + }, + Key: "ClusterComputeResource.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Removes a set of tags from the cluster", + }, + Key: "ClusterComputeResource.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ClusterComputeResource.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure cluster", + Summary: "Reconfigures a cluster", + }, + Key: "ClusterComputeResource.reconfigureEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure cluster", + Summary: "Reconfigures a cluster", + }, + Key: "ClusterComputeResource.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply recommendation", + Summary: "Applies a recommendation", + }, + Key: "ClusterComputeResource.applyRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel recommendation", + Summary: "Cancels a recommendation", + }, + Key: "ClusterComputeResource.cancelRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Recommended power On hosts", + Summary: "Get recommendations for a location to power on a specific virtual machine", + }, + Key: "ClusterComputeResource.recommendHostsForVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add host", + Summary: "Adds a new host to the cluster", + }, + Key: "ClusterComputeResource.addHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add host and enable lockdown", + Summary: "Adds a new host to the cluster and enables lockdown mode on the host", + }, + Key: "ClusterComputeResource.addHostWithAdminDisabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move host into cluster", + Summary: "Moves a set of existing hosts into the cluster", + }, + Key: "ClusterComputeResource.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move host into cluster", + Summary: "Moves a host into the cluster", + }, + Key: "ClusterComputeResource.moveHostInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh recommendations", + Summary: "Refreshes the list of recommendations", + }, + Key: "ClusterComputeResource.refreshRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve EVC", + Summary: "Retrieve Enhanced vMotion Compatibility information for this cluster", + }, + Key: "ClusterComputeResource.evcManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve transitional EVC manager", + Summary: "Retrieve the transitional EVC manager for this cluster", + }, + Key: "ClusterComputeResource.transitionalEVCManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve DAS advanced runtime information", + Summary: "Retrieve DAS advanced runtime information for this cluster", + }, + Key: "ClusterComputeResource.retrieveDasAdvancedRuntimeInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve vShpere HA data for cluster", + Summary: "Retrieves HA data for a cluster", + }, + Key: "ClusterComputeResource.retrieveDasData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check VM admission in vSphere HA cluster", + Summary: "Checks if HA admission control allows a set of virtual machines to be powered on in the cluster", + }, + Key: "ClusterComputeResource.checkDasAdmission", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check cluster for vSphere HA configuration", + Summary: "Check how the specified HA config will affect the cluster state if high availability is enabled", + }, + Key: "ClusterComputeResource.checkReconfigureDas", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "checkReconfigureDasVmcp", + Summary: "checkReconfigureDasVmcp", + }, + Key: "ClusterComputeResource.checkReconfigureDasVmcp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DRS recommends hosts to evacuate", + Summary: "DRS recommends hosts to evacuate", + }, + Key: "ClusterComputeResource.enterMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find Fault Tolerance compatible hosts for placing secondary VM", + Summary: "Find the set of Fault Tolerance compatible hosts for placing secondary of a given primary virtual machine", + }, + Key: "ClusterComputeResource.queryFaultToleranceCompatibleHosts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find Fault Tolerance compatible datastores for a VM", + Summary: "Find the set of Fault Tolerance compatible datastores for a given virtual machine", + }, + Key: "ClusterComputeResource.queryFaultToleranceCompatibleDatastores", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Verify FaultToleranceConfigSpec", + Summary: "Verify whether a given FaultToleranceConfigSpec satisfies the requirements for Fault Tolerance", + }, + Key: "ClusterComputeResource.verifyFaultToleranceConfigSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check Fault Tolerance compatibility for VM", + Summary: "Check whether a VM is compatible for turning on Fault Tolerance", + }, + Key: "ClusterComputeResource.queryCompatibilityForFaultTolerance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Call DRS for cross vMotion placement recommendations", + Summary: "Calls vSphere DRS for placement recommendations when migrating a VM across vCenter Server instances and virtual switches", + }, + Key: "ClusterComputeResource.placeVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find rules for VM", + Summary: "Locates all affinity and anti-affinity rules the specified VM participates in", + }, + Key: "ClusterComputeResource.findRulesForVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "stampAllRulesWithUuid", + Summary: "stampAllRulesWithUuid", + }, + Key: "ClusterComputeResource.stampAllRulesWithUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getResourceUsage", + Summary: "getResourceUsage", + }, + Key: "ClusterComputeResource.getResourceUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryDrmDumpHistory", + Summary: "queryDrmDumpHistory", + }, + Key: "ClusterComputeResource.queryDrmDumpHistory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "generateDrmBundle", + Summary: "generateDrmBundle", + }, + Key: "ClusterComputeResource.generateDrmBundle", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "waitForChanges", + Summary: "waitForChanges", + }, + Key: "cdc.ChangeLogCollector.waitForChanges", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "initializeSequence", + Summary: "initializeSequence", + }, + Key: "cdc.ChangeLogCollector.initializeSequence", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "exchangeSequence", + Summary: "exchangeSequence", + }, + Key: "cdc.ChangeLogCollector.exchangeSequence", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate a certificate signing request", + Summary: "Generates a certificate signing request (CSR) for the host", + }, + Key: "host.CertificateManager.generateCertificateSigningRequest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate a certificate signing request using the specified Distinguished Name", + Summary: "Generates a certificate signing request (CSR) for the host using the specified Distinguished Name", + }, + Key: "host.CertificateManager.generateCertificateSigningRequestByDn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install a server certificate", + Summary: "Installs a server certificate for the host", + }, + Key: "host.CertificateManager.installServerCertificate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replace CA certificates and certificate revocation lists", + Summary: "Replaces the CA certificates and certificate revocation lists (CRLs) on the host", + }, + Key: "host.CertificateManager.replaceCACertificatesAndCRLs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify services affected by SSL credentials change", + Summary: "Notifies the host services affected by SSL credentials change", + }, + Key: "host.CertificateManager.notifyAffectedServices", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List CA certificates", + Summary: "Lists the CA certificates on the host", + }, + Key: "host.CertificateManager.listCACertificates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List CA certificate revocation lists", + Summary: "Lists the CA certificate revocation lists (CRLs) on the host", + }, + Key: "host.CertificateManager.listCACertificateRevocationLists", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set CPU scheduler system custom value", + Summary: "Sets the value of a custom field of a host CPU scheduler", + }, + Key: "host.CpuSchedulerSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable hyperthreading", + Summary: "Enable hyperthreads as schedulable resources", + }, + Key: "host.CpuSchedulerSystem.enableHyperThreading", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable hyperthreading", + Summary: "Disable hyperthreads as schedulable resources", + }, + Key: "host.CpuSchedulerSystem.disableHyperThreading", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Search datastore", + Summary: "Returns the information for the files that match the given search criteria", + }, + Key: "host.DatastoreBrowser.search", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Search datastore subfolders", + Summary: "Returns the information for the files that match the given search criteria", + }, + Key: "host.DatastoreBrowser.searchSubFolders", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete datastore file", + Summary: "Deletes the specified files from the datastore", + }, + Key: "host.DatastoreBrowser.deleteFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update configuration", + Summary: "Update the date and time on the host", + }, + Key: "host.DateTimeSystem.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query available time zones", + Summary: "Retrieves the list of available time zones on the host", + }, + Key: "host.DateTimeSystem.queryAvailableTimeZones", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query date and time", + Summary: "Get the current date and time on the host", + }, + Key: "host.DateTimeSystem.queryDateTime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update date or time", + Summary: "Update the date/time on the host", + }, + Key: "host.DateTimeSystem.updateDateTime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh", + Summary: "Refresh the date and time settings", + }, + Key: "host.DateTimeSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire disk lease", + Summary: "Acquire a lease for the files associated with the virtual disk referenced by the given datastore path", + }, + Key: "host.DiskManager.acquireLease", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire lease extension", + Summary: "Acquires a lease for the files associated with the virtual disk of a virtual machine", + }, + Key: "host.DiskManager.acquireLeaseExt", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Renew all leases", + Summary: "Resets the watchdog timer and confirms that all the locks for all the disks managed by this watchdog are still valid", + }, + Key: "host.DiskManager.renewAllLeases", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set task custom value", + Summary: "Sets the value of a custom field of a task", + }, + Key: "Task.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel", + Summary: "Cancels a running/queued task", + }, + Key: "Task.cancel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update progress", + Summary: "Update task progress", + }, + Key: "Task.UpdateProgress", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set task state", + Summary: "Sets task state", + }, + Key: "Task.setState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update task description", + Summary: "Updates task description with the current phase of the task", + }, + Key: "Task.UpdateDescription", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Renew disk lease", + Summary: "Renew a lease to prevent it from timing out", + }, + Key: "host.DiskManager.Lease.renew", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Release disk lease", + Summary: "End the lease if it is still active", + }, + Key: "host.DiskManager.Lease.release", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Allocate blocks", + Summary: "Prepare for writing to blocks", + }, + Key: "host.DiskManager.Lease.allocateBlocks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear lazy zero", + Summary: "Honor the contents of a block range", + }, + Key: "host.DiskManager.Lease.clearLazyZero", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Map disk region", + Summary: "Mapping a specified region of a virtual disk", + }, + Key: "host.DiskManager.Lease.MapDiskRegion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update ESX agent configuration", + Summary: "Updates the ESX agent configuration of a host", + }, + Key: "host.EsxAgentHostManager.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset to factory default", + Summary: "Reset the configuration to factory default", + }, + Key: "host.FirmwareSystem.resetToFactoryDefaults", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Backup configuration", + Summary: "Backup the configuration of the host", + }, + Key: "host.FirmwareSystem.backupConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration upload URL", + Summary: "Host configuration must be uploaded for a restore operation", + }, + Key: "host.FirmwareSystem.queryConfigUploadURL", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Restore configuration", + Summary: "Restore configuration of the host", + }, + Key: "host.FirmwareSystem.restoreConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Flush firmware configuration", + Summary: "Writes the configuration of the firmware system to persistent storage", + }, + Key: "host.FirmwareSystem.syncConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryQuantumMinutes", + Summary: "queryQuantumMinutes", + }, + Key: "host.FirmwareSystem.queryQuantumMinutes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "querySyncsPerQuantum", + Summary: "querySyncsPerQuantum", + }, + Key: "host.FirmwareSystem.querySyncsPerQuantum", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh hardware information", + Summary: "Refresh hardware information", + }, + Key: "host.HealthStatusSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset system health sensors", + Summary: "Resets the state of the sensors of the IPMI subsystem", + }, + Key: "host.HealthStatusSystem.resetSystemHealthInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear hardware IPMI System Event Log", + Summary: "Clear hardware IPMI System Event Log", + }, + Key: "host.HealthStatusSystem.clearSystemEventLog", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh hardware IPMI System Event Log", + Summary: "Refresh hardware IPMI System Event Log", + }, + Key: "host.HealthStatusSystem.FetchSystemEventLog", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve access entries", + Summary: "Retrieves the access mode for each user or group with access permissions on the host", + }, + Key: "host.HostAccessManager.retrieveAccessEntries", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change access mode", + Summary: "Changes the access mode for a user or group on the host", + }, + Key: "host.HostAccessManager.changeAccessMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve special DCUI access users", + Summary: "Retrieves the list of users with special access to DCUI", + }, + Key: "host.HostAccessManager.queryDcuiAccess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update special DCUI access users", + Summary: "Updates the list of users with special access to DCUI", + }, + Key: "host.HostAccessManager.updateDcuiAccess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve system users", + Summary: "Retrieve the list of special system users on the host", + }, + Key: "host.HostAccessManager.querySystemUsers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update system users", + Summary: "Updates the list of special system users on the host", + }, + Key: "host.HostAccessManager.updateSystemUsers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query lockdown exceptions", + Summary: "Queries the current list of user exceptions for lockdown mode", + }, + Key: "host.HostAccessManager.queryLockdownExceptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update lockdown exceptions", + Summary: "Updates the current list of user exceptions for lockdown mode", + }, + Key: "host.HostAccessManager.updateLockdownExceptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change lockdown mode", + Summary: "Changes lockdown mode on the host", + }, + Key: "host.HostAccessManager.changeLockdownMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get acceptance level for host image configuration", + Summary: "Get acceptance level settings for host image configuration", + }, + Key: "host.ImageConfigManager.queryHostAcceptanceLevel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host image profile", + Summary: "Queries the current host image profile information", + }, + Key: "host.ImageConfigManager.queryHostImageProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update acceptance level", + Summary: "Updates the acceptance level of a host", + }, + Key: "host.ImageConfigManager.updateAcceptanceLevel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "fetchSoftwarePackages", + Summary: "fetchSoftwarePackages", + }, + Key: "host.ImageConfigManager.fetchSoftwarePackages", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "installDate", + Summary: "installDate", + }, + Key: "host.ImageConfigManager.installDate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host kernel modules", + Summary: "Retrieves information about the kernel modules on the host", + }, + Key: "host.KernelModuleSystem.queryModules", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update kernel module option", + Summary: "Specifies the options to be passed to the kernel module when loaded", + }, + Key: "host.KernelModuleSystem.updateModuleOptionString", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query kernel module options", + Summary: "Retrieves the options configured to be passed to a kernel module when loaded", + }, + Key: "host.KernelModuleSystem.queryConfiguredModuleOptionString", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set memory manager custom value", + Summary: "Sets the value of a custom field of a host memory manager system", + }, + Key: "host.MemoryManagerSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set console memory reservation", + Summary: "Set the configured service console memory reservation", + }, + Key: "host.MemoryManagerSystem.reconfigureServiceConsoleReservation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure virtual machine reservation", + Summary: "Updates the virtual machine reservation information", + }, + Key: "host.MemoryManagerSystem.reconfigureVirtualMachineReservation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query proxy information", + Summary: "Query the common message bus proxy service information", + }, + Key: "host.MessageBusProxy.retrieveInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure proxy", + Summary: "Configure the common message bus proxy service", + }, + Key: "host.MessageBusProxy.configure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove proxy configuration", + Summary: "Remove the common message proxy service configuration and disable the service", + }, + Key: "host.MessageBusProxy.unconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start proxy", + Summary: "Start the common message bus proxy service", + }, + Key: "host.MessageBusProxy.start", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop proxy", + Summary: "Stop the common message bus proxy service", + }, + Key: "host.MessageBusProxy.stop", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload proxy", + Summary: "Reload the common message bus proxy service and enable any configuration changes", + }, + Key: "host.MessageBusProxy.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set service custom value", + Summary: "Sets the value of a custom field of a host service system.", + }, + Key: "host.ServiceSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update service activation policy", + Summary: "Updates the activation policy of the service", + }, + Key: "host.ServiceSystem.updatePolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start service", + Summary: "Starts the service", + }, + Key: "host.ServiceSystem.start", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop service", + Summary: "Stops the service", + }, + Key: "host.ServiceSystem.stop", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Restart service", + Summary: "Restarts the service", + }, + Key: "host.ServiceSystem.restart", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall service", + Summary: "Uninstalls the service", + }, + Key: "host.ServiceSystem.uninstall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh service information", + Summary: "Refresh the service information and settings to detect any changes made directly on the host", + }, + Key: "host.ServiceSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure SNMP agent", + Summary: "Reconfigure the SNMP agent", + }, + Key: "host.SnmpSystem.reconfigureSnmpAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send test notification", + Summary: "Send test notification", + }, + Key: "host.SnmpSystem.sendTestNotification", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual flash resource", + Summary: "Configures virtual flash resource on a list of SSD devices", + }, + Key: "host.VFlashManager.configureVFlashResourceEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual flash resource", + Summary: "Configures virtual flash resource on a host", + }, + Key: "host.VFlashManager.configureVFlashResource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual flash resource", + Summary: "Removes virtual flash resource from a host", + }, + Key: "host.VFlashManager.removeVFlashResource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual flash host swap cache", + Summary: "Configures virtual flash host swap cache", + }, + Key: "host.VFlashManager.configureHostVFlashCache", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve virtual flash module configuration options from a host", + Summary: "Retrieves virtual flash module configuration options from a host", + }, + Key: "host.VFlashManager.getVFlashModuleDefaultConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query disks for use in vSAN cluster", + Summary: "Queries disk eligibility for use in the vSAN cluster", + }, + Key: "host.VsanSystem.queryDisksForVsan", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add disks to vSAN", + Summary: "Adds the selected disks to the vSAN cluster", + }, + Key: "host.VsanSystem.addDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initialize disks in the vSAN cluster", + Summary: "Initializes the selected disks to be used in the vSAN cluster", + }, + Key: "host.VsanSystem.initializeDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove disk from vSAN", + Summary: "Removes the disks that are used in the vSAN cluster", + }, + Key: "host.VsanSystem.removeDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove disk group from vSAN", + Summary: "Removes the selected disk group from the vSAN cluster", + }, + Key: "host.VsanSystem.removeDiskMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unmountDiskMapping", + Summary: "unmountDiskMapping", + }, + Key: "host.VsanSystem.unmountDiskMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSAN configuration", + Summary: "Updates the vSAN configuration for this host", + }, + Key: "host.VsanSystem.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve vSAN runtime information", + Summary: "Retrieves the current vSAN runtime information for this host", + }, + Key: "host.VsanSystem.queryHostStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Evacuate this host from vSAN cluster", + Summary: "Evacuates the specified host from the vSAN cluster", + }, + Key: "host.VsanSystem.evacuateNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Recommission this host back to vSAN cluster", + Summary: "Recommissions the host back to vSAN cluster", + }, + Key: "host.VsanSystem.recommissionNode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve a ticket to register the vSAN VASA Provider", + Summary: "Retrieves a ticket to register the VASA Provider for vSAN in the Storage Monitoring Service", + }, + Key: "host.VsanSystem.fetchVsanSharedSecret", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Join Windows Domain", + Summary: "Enables ActiveDirectory authentication on the host", + }, + Key: "host.ActiveDirectoryAuthentication.joinDomain", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Join Windows Domain through vSphere Authentication Proxy service", + Summary: "Enables Active Directory authentication on the host using a vSphere Authentication Proxy server", + }, + Key: "host.ActiveDirectoryAuthentication.joinDomainWithCAM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import the certificate of vSphere Authentication Proxy server", + Summary: "Import the certificate of vSphere Authentication Proxy server to ESXi's authentication store", + }, + Key: "host.ActiveDirectoryAuthentication.importCertificateForCAM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Leave Windows Domain", + Summary: "Disables ActiveDirectory authentication on the host", + }, + Key: "host.ActiveDirectoryAuthentication.leaveCurrentDomain", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable Smart Card Authentication", + Summary: "Enables smart card authentication of ESXi Direct Console UI users", + }, + Key: "host.ActiveDirectoryAuthentication.enableSmartCardAuthentication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install a Smart Card Trust Anchor", + Summary: "Installs a smart card trust anchor on the host", + }, + Key: "host.ActiveDirectoryAuthentication.installSmartCardTrustAnchor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "replaceSmartCardTrustAnchors", + Summary: "replaceSmartCardTrustAnchors", + }, + Key: "host.ActiveDirectoryAuthentication.replaceSmartCardTrustAnchors", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove a Smart Card Trust Anchor", + Summary: "Removes an installed smart card trust anchor from the host", + }, + Key: "host.ActiveDirectoryAuthentication.removeSmartCardTrustAnchor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Smart Card Trust Anchor", + Summary: "Removes the installed smart card trust anchor from the host", + }, + Key: "host.ActiveDirectoryAuthentication.removeSmartCardTrustAnchorByFingerprint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List Smart Card Trust Anchors", + Summary: "Lists the smart card trust anchors installed on the host", + }, + Key: "host.ActiveDirectoryAuthentication.listSmartCardTrustAnchors", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable Smart Card Authentication", + Summary: "Disables smart card authentication of ESXi Direct Console UI users", + }, + Key: "host.ActiveDirectoryAuthentication.disableSmartCardAuthentication", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update local swap datastore", + Summary: "Changes the datastore for virtual machine swap files", + }, + Key: "host.DatastoreSystem.updateLocalSwapDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve disks for VMFS datastore", + Summary: "Retrieves the list of disks that can be used to contain VMFS datastore extents", + }, + Key: "host.DatastoreSystem.queryAvailableDisksForVmfs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore create options", + Summary: "Queries options for creating a new VMFS datastore for a disk", + }, + Key: "host.DatastoreSystem.queryVmfsDatastoreCreateOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create VMFS datastore", + Summary: "Creates a new VMFS datastore", + }, + Key: "host.DatastoreSystem.createVmfsDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore extend options", + Summary: "Queries options for extending an existing VMFS datastore for a disk", + }, + Key: "host.DatastoreSystem.queryVmfsDatastoreExtendOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query VMFS datastore expand options", + Summary: "Query the options available for expanding the extents of a VMFS datastore", + }, + Key: "host.DatastoreSystem.queryVmfsDatastoreExpandOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend datastore", + Summary: "Extends an existing VMFS datastore", + }, + Key: "host.DatastoreSystem.extendVmfsDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Expand VMFS datastore", + Summary: "Expand the capacity of a VMFS datastore extent", + }, + Key: "host.DatastoreSystem.expandVmfsDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "processVmfsDatastoreUpdate", + Summary: "processVmfsDatastoreUpdate", + }, + Key: "host.DatastoreSystem.processVmfsDatastoreUpdate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create NAS datastore", + Summary: "Creates a new Network Attached Storage (NAS) datastore", + }, + Key: "host.DatastoreSystem.createNasDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create local datastore", + Summary: "Creates a new local datastore", + }, + Key: "host.DatastoreSystem.createLocalDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Virtual Volume datastore", + Summary: "Updates the Virtual Volume datastore configuration according to the provided settings", + }, + Key: "host.DatastoreSystem.UpdateVvolDatastoreInternal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Virtual Volume datastore", + Summary: "Creates a datastore backed by a Virtual Volume storage container", + }, + Key: "host.DatastoreSystem.createVvolDatastoreInternal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Virtual Volume datastore", + Summary: "Creates a Virtuial Volume datastore", + }, + Key: "host.DatastoreSystem.createVvolDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datastore", + Summary: "Removes a datastore from a host", + }, + Key: "host.DatastoreSystem.removeDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datastores", + Summary: "Removes one or more datastores from a host", + }, + Key: "host.DatastoreSystem.removeDatastoreEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure datastore principal", + Summary: "Configures datastore principal user for the host", + }, + Key: "host.DatastoreSystem.configureDatastorePrincipal", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query unbound VMFS volumes", + Summary: "Gets the list of unbound VMFS volumes", + }, + Key: "host.DatastoreSystem.queryUnresolvedVmfsVolumes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resignature unresolved VMFS volume", + Summary: "Resignature unresolved VMFS volume with new VMFS identifier", + }, + Key: "host.DatastoreSystem.resignatureUnresolvedVmfsVolume", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "NotifyDatastore", + Summary: "NotifyDatastore", + }, + Key: "host.DatastoreSystem.NotifyDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check accessibility", + Summary: "Check if the file objects for the specified virtual machine IDs are accessible", + }, + Key: "host.DatastoreSystem.checkVmFileAccessibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set firewall custom value", + Summary: "Sets the value of a custom field of a host firewall system", + }, + Key: "host.FirewallSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update default firewall policy", + Summary: "Updates the default firewall policy", + }, + Key: "host.FirewallSystem.updateDefaultPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open firewall ports", + Summary: "Open the firewall ports belonging to the specified ruleset", + }, + Key: "host.FirewallSystem.enableRuleset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Block firewall ports", + Summary: "Block the firewall ports belonging to the specified ruleset", + }, + Key: "host.FirewallSystem.disableRuleset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update allowed IP list of the firewall ruleset", + Summary: "Update the allowed IP list of the specified ruleset", + }, + Key: "host.FirewallSystem.updateRuleset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh firewall information", + Summary: "Refresh the firewall information and settings to detect any changes made directly on the host", + }, + Key: "host.FirewallSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set network custom value", + Summary: "Sets the value of a custom field of a host network system", + }, + Key: "host.NetworkSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network configuration", + Summary: "Network configuration information", + }, + Key: "host.NetworkSystem.updateNetworkConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update DNS configuration", + Summary: "Update the DNS configuration for the host", + }, + Key: "host.NetworkSystem.updateDnsConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IP route configuration", + Summary: "Update IP route configuration", + }, + Key: "host.NetworkSystem.updateIpRouteConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update console IP route configuration", + Summary: "Update console IP route configuration", + }, + Key: "host.NetworkSystem.updateConsoleIpRouteConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IP route table configuration", + Summary: "Applies the IP route table configuration for the host", + }, + Key: "host.NetworkSystem.updateIpRouteTableConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add virtual switch", + Summary: "Add a new virtual switch to the system", + }, + Key: "host.NetworkSystem.addVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual switch", + Summary: "Remove an existing virtual switch from the system", + }, + Key: "host.NetworkSystem.removeVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update virtual switch", + Summary: "Updates the properties of the virtual switch", + }, + Key: "host.NetworkSystem.updateVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add port group", + Summary: "Add a port group to the virtual switch", + }, + Key: "host.NetworkSystem.addPortGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove port group", + Summary: "Remove a port group from the virtual switch", + }, + Key: "host.NetworkSystem.removePortGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure port group", + Summary: "Reconfigure a port group on the virtual switch", + }, + Key: "host.NetworkSystem.updatePortGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update physical NIC link speed", + Summary: "Configure link speed and duplexity", + }, + Key: "host.NetworkSystem.updatePhysicalNicLinkSpeed", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query network hint", + Summary: "Request network hint information for a physical NIC", + }, + Key: "host.NetworkSystem.queryNetworkHint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add virtual NIC", + Summary: "Add a virtual host or service console NIC", + }, + Key: "host.NetworkSystem.addVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual NIC", + Summary: "Remove a virtual host or service console NIC", + }, + Key: "host.NetworkSystem.removeVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update virtual NIC", + Summary: "Configure virtual host or VMkernel NIC", + }, + Key: "host.NetworkSystem.updateVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add service console virtual NIC", + Summary: "Add a virtual service console NIC", + }, + Key: "host.NetworkSystem.addServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove service console virtual NIC", + Summary: "Remove a virtual service console NIC", + }, + Key: "host.NetworkSystem.removeServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update service console virtual NIC", + Summary: "Update IP configuration for a service console virtual NIC", + }, + Key: "host.NetworkSystem.updateServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Restart virtual network adapter interface", + Summary: "Restart the service console virtual network adapter interface", + }, + Key: "host.NetworkSystem.restartServiceConsoleVirtualNic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh network information", + Summary: "Refresh the network information and settings to detect any changes that have occurred", + }, + Key: "host.NetworkSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Invoke API call on host with transactionId", + Summary: "Invoke API call on host with transactionId", + }, + Key: "host.NetworkSystem.invokeHostTransactionCall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Commit transaction to confirm that host is connected to vCenter Server", + Summary: "Commit transaction to confirm that host is connected to vCenter Server", + }, + Key: "host.NetworkSystem.commitTransaction", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "performHostOpaqueNetworkDataOperation", + Summary: "performHostOpaqueNetworkDataOperation", + }, + Key: "host.NetworkSystem.performHostOpaqueNetworkDataOperation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve available diagnostic partitions", + Summary: "Retrieves a list of available diagnostic partitions", + }, + Key: "host.DiagnosticSystem.queryAvailablePartition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change active diagnostic partition", + Summary: "Changes the active diagnostic partition to a different partition", + }, + Key: "host.DiagnosticSystem.selectActivePartition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve diagnostic partitionable disks", + Summary: "Retrieves a list of disks that can be used to contain a diagnostic partition", + }, + Key: "host.DiagnosticSystem.queryPartitionCreateOptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve diagnostic partition creation description", + Summary: "Retrieves the diagnostic partition creation description for a disk", + }, + Key: "host.DiagnosticSystem.queryPartitionCreateDesc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create diagnostic partition", + Summary: "Creates a diagnostic partition according to the provided creation specification", + }, + Key: "host.DiagnosticSystem.createDiagnosticPartition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set vApp custom value", + Summary: "Sets the value of a custom field on a vApp", + }, + Key: "VirtualApp.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload vApp", + Summary: "Reload the vApp", + }, + Key: "VirtualApp.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename vApp", + Summary: "Rename the vApp", + }, + Key: "VirtualApp.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete vApp", + Summary: "Delete the vApp, including all child vApps and virtual machines", + }, + Key: "VirtualApp.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the vApp", + }, + Key: "VirtualApp.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the vApp", + }, + Key: "VirtualApp.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "VirtualApp.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vApp resource configuration", + Summary: "Updates the resource configuration for the vApp", + }, + Key: "VirtualApp.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move into vApp", + Summary: "Moves a set of entities into this vApp", + }, + Key: "VirtualApp.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update child resource configuration", + Summary: "Change resource configuration of a set of children of the vApp", + }, + Key: "VirtualApp.updateChildResourceConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create resource pool", + Summary: "Creates a new resource pool", + }, + Key: "VirtualApp.createResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete vApp children", + Summary: "Deletes all child resource pools recursively", + }, + Key: "VirtualApp.destroyChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vApp", + Summary: "Creates a child vApp of this vApp", + }, + Key: "VirtualApp.createVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a virtual machine in this vApp", + }, + Key: "VirtualApp.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to this vApp", + }, + Key: "VirtualApp.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys a virtual machine or vApp", + }, + Key: "VirtualApp.importVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query Virtual App resource configuration options", + Summary: "Returns configuration options for a set of resources for a Virtual App", + }, + Key: "VirtualApp.queryResourceConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh Virtual App runtime information", + Summary: "Refreshes the resource usage runtime information for a Virtual App", + }, + Key: "VirtualApp.refreshRuntime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vApp Configuration", + Summary: "Updates the vApp configuration", + }, + Key: "VirtualApp.updateVAppConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update linked children", + Summary: "Updates the list of linked children", + }, + Key: "VirtualApp.updateLinkedChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone vApp", + Summary: "Clone the vApp, including all child entities", + }, + Key: "VirtualApp.clone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the vApp as an OVF template", + }, + Key: "VirtualApp.exportVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start vApp", + Summary: "Starts the vApp", + }, + Key: "VirtualApp.powerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop vApp", + Summary: "Stops the vApp", + }, + Key: "VirtualApp.powerOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend vApp", + Summary: "Suspends the vApp", + }, + Key: "VirtualApp.suspend", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister vApp", + Summary: "Unregister all child virtual machines and remove the vApp", + }, + Key: "VirtualApp.unregister", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual NIC custom value", + Summary: "Set the value of a custom filed of a host's virtual NIC manager", + }, + Key: "host.VirtualNicManager.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query network configuration", + Summary: "Gets the network configuration for the specified NIC type", + }, + Key: "host.VirtualNicManager.queryNetConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Select virtual NIC", + Summary: "Select the virtual NIC to be used for the specified NIC type", + }, + Key: "host.VirtualNicManager.selectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deselect virtual NIC", + Summary: "Deselect the virtual NIC used for the specified NIC type", + }, + Key: "host.VirtualNicManager.deselectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download overhead computation script", + Summary: "Download overhead computation scheme script", + }, + Key: "OverheadService.downloadScript", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download host configuration", + Summary: "Download host configuration consumed by overhead computation script", + }, + Key: "OverheadService.downloadHostConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download VM configuration", + Summary: "Download VM configuration consumed by overhead computation script", + }, + Key: "OverheadService.downloadVMXConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add an alias to the alias store in the guest", + Summary: "Add an alias to the alias store in the guest operating system", + }, + Key: "vm.guest.AliasManager.addAlias", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove an alias from the alias store in the guest", + Summary: "Remove an alias from the alias store in the guest operating system", + }, + Key: "vm.guest.AliasManager.removeAlias", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove all aliases associated with a SSO Server certificate from the guest", + Summary: "Remove all aliases associated with a SSO Server certificate from the guest operating system", + }, + Key: "vm.guest.AliasManager.removeAliasByCert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List all aliases for a user in the guest", + Summary: "List all aliases for a user in the guest operating system", + }, + Key: "vm.guest.AliasManager.listAliases", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List all mapped aliases in the guest", + Summary: "List all mapped aliases in the guest operating system", + }, + Key: "vm.guest.AliasManager.listMappedAliases", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a directory in the guest", + Summary: "Create a directory in the guest operating system", + }, + Key: "vm.guest.FileManager.makeDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a file in the guest", + Summary: "Delete a file in the guest operating system", + }, + Key: "vm.guest.FileManager.deleteFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a directory in the guest", + Summary: "Delete a directory in the guest operating system", + }, + Key: "vm.guest.FileManager.deleteDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move or rename a directory in the guest", + Summary: "Move or rename a directory in the guest operating system", + }, + Key: "vm.guest.FileManager.moveDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move or rename a file in the guest", + Summary: "Move or rename a file in the guest operating system", + }, + Key: "vm.guest.FileManager.moveFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a temporary file in the guest", + Summary: "Create a temporary file in the guest operating system", + }, + Key: "vm.guest.FileManager.createTemporaryFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a temporary directory in the guest", + Summary: "Create a temporary directory in the guest operating system", + }, + Key: "vm.guest.FileManager.createTemporaryDirectory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List files or directories in the guest", + Summary: "List files or directories in the guest operating system", + }, + Key: "vm.guest.FileManager.listFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Change the attributes of a file in the guest", + Summary: "Change the attributes of a file in the guest operating system", + }, + Key: "vm.guest.FileManager.changeFileAttributes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiates an operation to transfer a file from the guest", + Summary: "Initiates an operation to transfer a file from the guest operating system", + }, + Key: "vm.guest.FileManager.initiateFileTransferFromGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiates an operation to transfer a file to the guest", + Summary: "Initiates an operation to transfer a file to the guest operating system", + }, + Key: "vm.guest.FileManager.initiateFileTransferToGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start a program in the guest", + Summary: "Start a program in the guest operating system", + }, + Key: "vm.guest.ProcessManager.startProgram", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List processes in the guest", + Summary: "List processes in the guest operating system", + }, + Key: "vm.guest.ProcessManager.listProcesses", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Terminate a process in the guest", + Summary: "Terminate a process in the guest operating system", + }, + Key: "vm.guest.ProcessManager.terminateProcess", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read an environment variable in the guest", + Summary: "Read an environment variable in the guest operating system", + }, + Key: "vm.guest.ProcessManager.readEnvironmentVariable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove view", + Summary: "Remove view", + }, + Key: "view.View.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve associated License Data objects", + Summary: "Retrieves all the associated License Data objects", + }, + Key: "LicenseDataManager.queryEntityLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve license data associated with managed entity", + Summary: "Retrieves the license data associated with a specified managed entity", + }, + Key: "LicenseDataManager.queryAssociatedLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update entity license container", + Summary: "Updates the license container associated with a specified managed entity", + }, + Key: "LicenseDataManager.updateAssociatedLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply associated license data to managed entity", + Summary: "Applies associated license data to a managed entity", + }, + Key: "LicenseDataManager.applyAssociatedLicenseData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update assigned license", + Summary: "Updates the license assigned to an entity", + }, + Key: "LicenseAssignmentManager.updateAssignedLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove assigned license", + Summary: "Removes an assignment of a license to an entity", + }, + Key: "LicenseAssignmentManager.removeAssignedLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query assigned licenses", + Summary: "Queries for all the licenses assigned to an entity or all entities", + }, + Key: "LicenseAssignmentManager.queryAssignedLicenses", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check feature availability", + Summary: "Checks if the corresponding features are licensed for a list of entities", + }, + Key: "LicenseAssignmentManager.isFeatureAvailable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update in-use status of a licensed feature", + Summary: "Updates in-use status of a licensed feature", + }, + Key: "LicenseAssignmentManager.updateFeatureInUse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register licenseable entity", + Summary: "Registers a licenseable entity", + }, + Key: "LicenseAssignmentManager.registerEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister licenseable entity", + Summary: "Unregisters an existing licenseable entity and releases any serial numbers assigned to it.", + }, + Key: "LicenseAssignmentManager.unregisterEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update license entity usage count", + Summary: "Updates the usage count of a license entity", + }, + Key: "LicenseAssignmentManager.updateUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upload license file", + Summary: "Uploads a license file to vCenter Server", + }, + Key: "LicenseAssignmentManager.uploadLicenseFile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryAssignedLicensesEx", + Summary: "queryAssignedLicensesEx", + }, + Key: "LicenseAssignmentManager.queryAssignedLicensesEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateEntity", + Summary: "updateEntity", + }, + Key: "LicenseAssignmentManager.updateEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateEntitiesProperties", + Summary: "updateEntitiesProperties", + }, + Key: "LicenseAssignmentManager.updateEntitiesProperties", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set backup agent custom value", + Summary: "Set backup agent custom value", + }, + Key: "vm.BackupAgent.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start virtual machine backup", + Summary: "Start a backup operation inside the virtual machine guest", + }, + Key: "vm.BackupAgent.startBackup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop virtual machine backup", + Summary: "Stop a backup operation in a virtual machine", + }, + Key: "vm.BackupAgent.abortBackup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify virtual machine snapshot completion", + Summary: "Notify the virtual machine when a snapshot operation is complete", + }, + Key: "vm.BackupAgent.notifySnapshotCompletion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Wait for guest event", + Summary: "Wait for an event delivered by the virtual machine guest", + }, + Key: "vm.BackupAgent.waitForEvent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create namespace", + Summary: "Create a virtual machine namespace", + }, + Key: "vm.NamespaceManager.createNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete namespace", + Summary: "Delete the virtual machine namespace", + }, + Key: "vm.NamespaceManager.deleteNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete all namespaces", + Summary: "Delete all namespaces associated with the virtual machine", + }, + Key: "vm.NamespaceManager.deleteAllNamespaces", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update namespace", + Summary: "Reconfigure the virtual machine namespace", + }, + Key: "vm.NamespaceManager.updateNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query namespace", + Summary: "Retrieve detailed information about the virtual machine namespace", + }, + Key: "vm.NamespaceManager.queryNamespace", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List namespaces", + Summary: "Retrieve the list of all namespaces for a virtual machine", + }, + Key: "vm.NamespaceManager.listNamespaces", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send event to the virtual machine", + Summary: "Queue event for delivery to the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.sendEventToGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch events from the virtual machine", + Summary: "Retrieve events sent by the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.fetchEventsFromGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update data", + Summary: "Update key/value pairs accessible by the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.updateData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve data", + Summary: "Retrieve key/value pairs set by the agent in the virtual machine", + }, + Key: "vm.NamespaceManager.retrieveData", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Pause", + Summary: "Pauses a virtual machine", + }, + Key: "vm.PauseManager.pause", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unpause", + Summary: "Unpauses a virtual machine", + }, + Key: "vm.PauseManager.unpause", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power on and pause", + Summary: "Powers on a virtual machine and pauses it immediately", + }, + Key: "vm.PauseManager.powerOnPaused", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure host cache performance enhancement", + Summary: "Configures host cache by allocating space on a low latency device (usually a solid state drive) for enhanced system performance", + }, + Key: "host.CacheConfigurationManager.configureCache", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query whether virtual NIC is used by iSCSI multi-pathing", + Summary: "Query whether virtual NIC is used by iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryVnicStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query whether physical NIC is used by iSCSI multi-pathing", + Summary: "Query whether physical NIC is used by iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryPnicStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query all the virtual NICs used by iSCSI multi-pathing", + Summary: "Query all the virtual NICs used by iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryBoundVnics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query candidate virtual NICs that can be used for iSCSI multi-pathing", + Summary: "Query candidate virtual NICs that can be used for iSCSI multi-pathing", + }, + Key: "host.IscsiManager.queryCandidateNics", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add virtual NIC to iSCSI Adapter", + Summary: "Add virtual NIC to iSCSI Adapter", + }, + Key: "host.IscsiManager.bindVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove virtual NIC from iSCSI Adapter", + Summary: "Remove virtual NIC from iSCSI Adapter", + }, + Key: "host.IscsiManager.unbindVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query migration dependencies for migrating the physical and virtual NICs", + Summary: "Query migration dependencies for migrating the physical and virtual NICs", + }, + Key: "host.IscsiManager.queryMigrationDependencies", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set PCI passthrough system custom value", + Summary: "Set PCI Passthrough system custom value", + }, + Key: "host.PciPassthruSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh PCI passthrough device information", + Summary: "Refresh the available PCI passthrough device information", + }, + Key: "host.PciPassthruSystem.refresh", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update PCI passthrough configuration", + Summary: "Update PCI passthrough device configuration", + }, + Key: "host.PciPassthruSystem.updatePassthruConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query network protocol profiles", + Summary: "Queries the list of network protocol profiles for a datacenter", + }, + Key: "IpPoolManager.queryIpPools", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create network protocol profile", + Summary: "Creates a new network protocol profile", + }, + Key: "IpPoolManager.createIpPool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network protocol profile", + Summary: "Updates a network protocol profile on a datacenter", + }, + Key: "IpPoolManager.updateIpPool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Destroy network protocol profile", + Summary: "Destroys a network protocol profile on the given datacenter", + }, + Key: "IpPoolManager.destroyIpPool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Allocates an IPv4 address", + Summary: "Allocates an IPv4 address from an IP pool", + }, + Key: "IpPoolManager.allocateIpv4Address", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Allocates an IPv6 address", + Summary: "Allocates an IPv6 address from an IP pool", + }, + Key: "IpPoolManager.allocateIpv6Address", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Releases an IP allocation", + Summary: "Releases an IP allocation back to an IP pool", + }, + Key: "IpPoolManager.releaseIpAllocation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query IP allocations", + Summary: "Query IP allocations by IP pool and extension key", + }, + Key: "IpPoolManager.queryIPAllocations", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh the CA certificates on the host", + Summary: "Refreshes the CA certificates on the host", + }, + Key: "CertificateManager.refreshCACertificatesAndCRLs", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh the subject certificate on the host", + Summary: "Refreshes the subject certificate on the host", + }, + Key: "CertificateManager.refreshCertificates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Revoke the subject certificate of a host", + Summary: "Revokes the subject certificate of a host", + }, + Key: "CertificateManager.revokeCertificates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query entity provider summary", + Summary: "Get information about the performance statistics that can be queried for a particular entity", + }, + Key: "PerformanceManager.queryProviderSummary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query available metrics", + Summary: "Gets available performance statistic metrics for the specified managed entity between begin and end times", + }, + Key: "PerformanceManager.queryAvailableMetric", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query counter", + Summary: "Get counter information for the list of counter IDs passed in", + }, + Key: "PerformanceManager.queryCounter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query counter by level", + Summary: "All performance data over 1 year old are deleted from the vCenter database", + }, + Key: "PerformanceManager.queryCounterByLevel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query performance statistics", + Summary: "Gets the performance statistics for the entity", + }, + Key: "PerformanceManager.queryStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get composite statistics", + Summary: "Get performance statistics for the entity and the breakdown across its child entities", + }, + Key: "PerformanceManager.queryCompositeStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Summarizes performance statistics", + Summary: "Summarizes performance statistics at the specified interval", + }, + Key: "PerformanceManager.summarizeStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create historical interval", + Summary: "Add a new historical interval configuration", + }, + Key: "PerformanceManager.createHistoricalInterval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove historical interval", + Summary: "Remove a historical interval configuration", + }, + Key: "PerformanceManager.removeHistoricalInterval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update historical interval", + Summary: "Update a historical interval configuration if it exists", + }, + Key: "PerformanceManager.updateHistoricalInterval", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update counter level mapping", + Summary: "Update counter to level mapping", + }, + Key: "PerformanceManager.updateCounterLevelMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset counter level mapping", + Summary: "Reset counter to level mapping to the default values", + }, + Key: "PerformanceManager.resetCounterLevelMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query internal performance counters", + Summary: "Queries all internal counters, supported by this performance manager", + }, + Key: "PerformanceManager.queryPerfCounterInt", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable performance counters", + Summary: "Enable a counter or a set of counters in the counters collection of this performance manager", + }, + Key: "PerformanceManager.enableStat", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable performance counters", + Summary: "Exclude a counter or a set of counters from the counters collection of this performance manager", + }, + Key: "PerformanceManager.disableStat", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "registerProvider", + Summary: "registerProvider", + }, + Key: "ExternalStatsManager.registerProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unregisterProvider", + Summary: "unregisterProvider", + }, + Key: "ExternalStatsManager.unregisterProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "isRegistered", + Summary: "isRegistered", + }, + Key: "ExternalStatsManager.isRegistered", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getRegisteredProviders", + Summary: "getRegisteredProviders", + }, + Key: "ExternalStatsManager.getRegisteredProviders", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getEnabledClusters", + Summary: "getEnabledClusters", + }, + Key: "ExternalStatsManager.getEnabledClusters", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "updateStats", + Summary: "updateStats", + }, + Key: "ExternalStatsManager.updateStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create task collector", + Summary: "Creates a task collector to retrieve all tasks that have executed on the server based on a filter", + }, + Key: "TaskManager.createCollector", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create task", + Summary: "Create a task", + }, + Key: "TaskManager.createTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "createTaskWithEntityName", + Summary: "createTaskWithEntityName", + }, + Key: "TaskManager.createTaskWithEntityName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set host custom value", + Summary: "Sets the value of a custom field of an host", + }, + Key: "HostSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload host system", + Summary: "Reloads the host system", + }, + Key: "HostSystem.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename host", + Summary: "Rename this host", + }, + Key: "HostSystem.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove host", + Summary: "Removes the host", + }, + Key: "HostSystem.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the host", + }, + Key: "HostSystem.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the host", + }, + Key: "HostSystem.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "HostSystem.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query TPM attestation information", + Summary: "Provides details of the secure boot and TPM status", + }, + Key: "HostSystem.queryTpmAttestationReport", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query connection information", + Summary: "Connection information about a host", + }, + Key: "HostSystem.queryConnectionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve internal host capabilities", + Summary: "Retrieves vCenter Server-specific internal host capabilities", + }, + Key: "HostSystem.retrieveInternalCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "", + Summary: "", + }, + Key: "HostSystem.retrieveInternalConfigManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update system resources", + Summary: "Update the configuration of the system resource hierarchy", + }, + Key: "HostSystem.updateSystemResources", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update system swap configuration", + Summary: "Update the configuration of the system swap", + }, + Key: "HostSystem.updateSystemSwapConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconnect host", + Summary: "Reconnects to a host", + }, + Key: "HostSystem.reconnect", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disconnect host", + Summary: "Disconnects from a host", + }, + Key: "HostSystem.disconnect", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter maintenance mode", + Summary: "Puts the host in maintenance mode", + }, + Key: "HostSystem.enterMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit maintenance mode", + Summary: "Disables maintenance mode", + }, + Key: "HostSystem.exitMaintenanceMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate host reboot", + Summary: "Initiates a host reboot", + }, + Key: "HostSystem.reboot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate host shutdown", + Summary: "Initiates a host shutdown", + }, + Key: "HostSystem.shutdown", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter standby mode", + Summary: "Puts this host into standby mode", + }, + Key: "HostSystem.enterStandbyMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit standby mode", + Summary: "Brings this host out of standby mode", + }, + Key: "HostSystem.exitStandbyMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query host overhead", + Summary: "Determines the amount of memory overhead necessary to power on a virtual machine with the specified characteristics", + }, + Key: "HostSystem.queryOverhead", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query memory overhead", + Summary: "Query memory overhead", + }, + Key: "HostSystem.queryOverheadEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere HA host", + Summary: "Reconfigures the host for vSphere HA", + }, + Key: "HostSystem.reconfigureDAS", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve Patch Manager", + Summary: "Retrieves a reference to Patch Manager", + }, + Key: "HostSystem.retrievePatchManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update host system flags", + Summary: "Update the flags of the host system", + }, + Key: "HostSystem.updateFlags", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send Wake-on-LAN packet", + Summary: "Send Wake-on-LAN packets to the physical NICs specified", + }, + Key: "HostSystem.sendWakeOnLanPacket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable lockdown mode", + Summary: "Enable lockdown mode on this host", + }, + Key: "HostSystem.disableAdmin", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable lockdown mode", + Summary: "Disable lockdown mode on this host", + }, + Key: "HostSystem.enableAdmin", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable lockdown mode", + Summary: "Enable lockdown mode on this host", + }, + Key: "HostSystem.enterLockdownMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable lockdown mode", + Summary: "Disable lockdown mode on this host", + }, + Key: "HostSystem.exitLockdownMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update management server IP", + Summary: "Update information about the vCenter Server managing this host", + }, + Key: "HostSystem.updateManagementServerIp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire CIM service", + Summary: "Establish a remote connection to a CIM interface", + }, + Key: "HostSystem.acquireCimServicesTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IPMI or ILO information used by DPM", + Summary: "Update IPMI or ILO information for this host used by DPM", + }, + Key: "HostSystem.updateIpmi", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update SSL thumbprint registry", + Summary: "Updates the SSL thumbprint registry on the host", + }, + Key: "HostSystem.updateSslThumbprintInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve host hardware uptime", + Summary: "Retrieves the hardware uptime for the host in seconds", + }, + Key: "HostSystem.retrieveHardwareUptime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve Dynamic Type Manager", + Summary: "Retrieves a reference to Dynamic Type Manager", + }, + Key: "HostSystem.retrieveDynamicTypeManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve Managed Method Executer", + Summary: "Retrieves a reference to Managed Method Executer", + }, + Key: "HostSystem.retrieveManagedMethodExecuter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine memory overhead", + Summary: "Query memory overhead for a virtual machine power on", + }, + Key: "HostSystem.queryOverheadEx2", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Test EVC mode", + Summary: "Test an EVC mode on a host", + }, + Key: "HostSystem.testEvcMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply EVC mode", + Summary: "Applies an EVC mode to a host", + }, + Key: "HostSystem.applyEvcMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check whether the certificate is trusted by vCenter Server", + Summary: "Checks whether the certificate matches the host certificate that vCenter Server trusts", + }, + Key: "HostSystem.checkCertificateTrusted", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Prepare host", + Summary: "Prepare host for encryption", + }, + Key: "HostSystem.prepareCrypto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable encryption", + Summary: "Enable encryption on the current host", + }, + Key: "HostSystem.enableCrypto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure the host key", + Summary: "Configure the encryption key on the current host", + }, + Key: "HostSystem.configureCryptoKey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch set custom value", + Summary: "vSphere Distributed Switch set custom value", + }, + Key: "DistributedVirtualSwitch.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch reload", + Summary: "vSphere Distributed Switch reload", + }, + Key: "DistributedVirtualSwitch.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename vSphere Distributed Switch", + Summary: "Rename vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete vSphere Distributed Switch", + Summary: "Delete vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch add tag", + Summary: "vSphere Distributed Switch add tag", + }, + Key: "DistributedVirtualSwitch.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch remove tag", + Summary: "vSphere Distributed Switch remove tag", + }, + Key: "DistributedVirtualSwitch.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "DistributedVirtualSwitch.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPort keys", + Summary: "Retrieve dvPort keys", + }, + Key: "DistributedVirtualSwitch.fetchPortKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPorts", + Summary: "Retrieve dvPorts", + }, + Key: "DistributedVirtualSwitch.fetchPorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query vSphere Distributed Switch used virtual LAN ID", + Summary: "Query vSphere Distributed Switch used virtual LAN ID", + }, + Key: "DistributedVirtualSwitch.queryUsedVlanId", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere Distributed Switch", + Summary: "Reconfigure vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch product specification operation", + Summary: "vSphere Distributed Switch product specification operation", + }, + Key: "DistributedVirtualSwitch.performProductSpecOperation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Merge vSphere Distributed Switches", + Summary: "Merge vSphere Distributed Switches", + }, + Key: "DistributedVirtualSwitch.merge", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Group", + Summary: "Add Distributed Port Group", + }, + Key: "DistributedVirtualSwitch.addPortgroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move dvPorts", + Summary: "Move dvPorts", + }, + Key: "DistributedVirtualSwitch.movePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch capability", + Summary: "Update vSphere Distributed Switch capability", + }, + Key: "DistributedVirtualSwitch.updateCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure dvPort", + Summary: "Reconfigure dvPort", + }, + Key: "DistributedVirtualSwitch.reconfigurePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh dvPort state", + Summary: "Refresh dvPort state", + }, + Key: "DistributedVirtualSwitch.refreshPortState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rectify host in vSphere Distributed Switch", + Summary: "Rectify host in vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.rectifyHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network resource pools on vSphere Distributed Switch", + Summary: "Update network resource pools on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.updateNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add network resource pools on vSphere Distributed Switch", + Summary: "Add network resource pools on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.addNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove network resource pools on vSphere Distributed Switch", + Summary: "Remove network resource pools on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.removeNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure a network resource pool on a distributed switch", + Summary: "Reconfigures the network resource pool on a distributed switch", + }, + Key: "DistributedVirtualSwitch.reconfigureVmVnicNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network I/O control on vSphere Distributed Switch", + Summary: "Update network I/O control on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.enableNetworkResourceManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get vSphere Distributed Switch configuration spec to rollback", + Summary: "Get vSphere Distributed Switch configuration spec to rollback", + }, + Key: "DistributedVirtualSwitch.rollback", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Group", + Summary: "Add Distributed Port Group", + }, + Key: "DistributedVirtualSwitch.addPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update health check configuration on vSphere Distributed Switch", + Summary: "Update health check configuration on vSphere Distributed Switch", + }, + Key: "DistributedVirtualSwitch.updateHealthCheckConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Look up portgroup based on portgroup key", + Summary: "Look up portgroup based on portgroup key", + }, + Key: "DistributedVirtualSwitch.lookupPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Annotate OVF section tree", + Summary: "Annotates the given OVF section tree with configuration choices for this OVF consumer", + }, + Key: "OvfConsumer.annotateOst", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate instantiation OVF section tree", + Summary: "Validates that this OVF consumer can accept an instantiation OVF section tree", + }, + Key: "OvfConsumer.validateInstantiationOst", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Request registration of OVF section tree nodes", + Summary: "Notifies the OVF consumer that the specified OVF section tree nodes should be registered", + }, + Key: "OvfConsumer.registerEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Request managed entities unregistration from OVF consumer", + Summary: "Notifies the OVF consumer that the specified managed entities should be unregistered", + }, + Key: "OvfConsumer.unregisterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify OVF consumer for cloned entities", + Summary: "Notifies the OVF consumer that the specified entities have been cloned", + }, + Key: "OvfConsumer.cloneEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Populate entity OVF section tree", + Summary: "Create OVF sections for the given managed entities and populate the entity OVF section tree", + }, + Key: "OvfConsumer.populateEntityOst", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve public OVF environment sections for virtual machine ", + Summary: "Retrieves the public OVF environment sections that this OVF consumer has for a given virtual machine", + }, + Key: "OvfConsumer.retrievePublicOvfEnvironmentSections", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Notify OVF consumer for virtual machine power on", + Summary: "Notifies the OVF consumer that a virtual machine is about to be powered on", + }, + Key: "OvfConsumer.notifyPowerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set snapshot custom value", + Summary: "Sets the value of a custom field of a virtual machine snapshot", + }, + Key: "vm.Snapshot.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Revert snapshot", + Summary: "Change the execution state of the virtual machine to the state of this snapshot", + }, + Key: "vm.Snapshot.revert", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove snapshot", + Summary: "Remove snapshot and delete its associated storage", + }, + Key: "vm.Snapshot.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename snapshot", + Summary: "Rename the snapshot", + }, + Key: "vm.Snapshot.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Linked Clone", + Summary: "Create a linked clone from this snapshot", + }, + Key: "vm.Snapshot.createLinkedClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Export the snapshot as an OVF template", + }, + Key: "vm.Snapshot.exportSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check compliance", + Summary: "Check compliance of host or cluster against a profile", + }, + Key: "profile.ComplianceManager.checkCompliance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compliance status", + Summary: "Query compliance status", + }, + Key: "profile.ComplianceManager.queryComplianceStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryEntitiesByComplianceStatus", + Summary: "queryEntitiesByComplianceStatus", + }, + Key: "profile.ComplianceManager.queryEntitiesByComplianceStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear compliance history", + Summary: "Clear historical compliance data", + }, + Key: "profile.ComplianceManager.clearComplianceStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query expression metadata", + Summary: "Query expression metadata", + }, + Key: "profile.ComplianceManager.queryExpressionMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create alarm", + Summary: "Create a new alarm", + }, + Key: "alarm.AlarmManager.create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve alarm", + Summary: "Get available alarms defined on the entity", + }, + Key: "alarm.AlarmManager.getAlarm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get alarm actions enabled", + Summary: "Checks if alarm actions are enabled for an entity", + }, + Key: "alarm.AlarmManager.getAlarmActionsEnabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set alarm actions enabled", + Summary: "Enables or disables firing alarm actions for an entity", + }, + Key: "alarm.AlarmManager.setAlarmActionsEnabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get alarm state", + Summary: "The state of instantiated alarms on the entity", + }, + Key: "alarm.AlarmManager.getAlarmState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acknowledge alarm", + Summary: "Stops alarm actions from firing until the alarm next triggers on an entity", + }, + Key: "alarm.AlarmManager.acknowledgeAlarm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set alarm status", + Summary: "Sets the status of an alarm for an entity", + }, + Key: "alarm.AlarmManager.setAlarmStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "clearTriggeredAlarms", + Summary: "clearTriggeredAlarms", + }, + Key: "alarm.AlarmManager.clearTriggeredAlarms", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "testSMTPSetup", + Summary: "testSMTPSetup", + }, + Key: "alarm.AlarmManager.testSMTPSetup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create private alarm on managed entity", + Summary: "Creates a Private (trigger-only) Alarm on a managed entity", + }, + Key: "alarm.AlarmManager.createPrivateAlarm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query private alarms on managed entity", + Summary: "Retrieves all of the Private (trigger-only) Alarms defined on the specified managed entity", + }, + Key: "alarm.AlarmManager.queryPrivateAlarms", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Sync triggered alarms list", + Summary: "Retrieves the full list of currently-triggered Alarms, as a list of triggers", + }, + Key: "alarm.AlarmManager.syncTriggeredAlarms", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve queued-up alarm triggers", + Summary: "Retrieves any queued-up alarm triggers representing Alarm state changes since the last time this method was called", + }, + Key: "alarm.AlarmManager.retrieveTriggers", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update the VASA provider state", + Summary: "Updates the VASA provider state for the specified datastores", + }, + Key: "VasaVvolManager.updateVasaProviderState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Virtual Volume datastore", + Summary: "Creates a new Virtual Volume datastore", + }, + Key: "VasaVvolManager.createVVolDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove Virtual Volume datastore", + Summary: "Remove Virtual Volume datastore from specified hosts", + }, + Key: "VasaVvolManager.removeVVolDatastore", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update the VASA client context", + Summary: "Updates the VASA client context on the host", + }, + Key: "VasaVvolManager.updateVasaClientContext", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "fetchRelocatedMACAddress", + Summary: "fetchRelocatedMACAddress", + }, + Key: "NetworkManager.fetchRelocatedMACAddress", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check MAC addresses in use", + Summary: "Checks the MAC addresses used by this vCenter Server instance", + }, + Key: "NetworkManager.checkIfMACAddressInUse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reclaim MAC addresses", + Summary: "Reclaims the MAC addresses that are not used by remote vCenter Server instances", + }, + Key: "NetworkManager.reclaimMAC", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create new identity binding", + Summary: "Creates a new identity binding between the host and vCenter Server", + }, + Key: "host.TpmManager.requestIdentity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Verify authenticity of credential", + Summary: "Verifies the authenticity and correctness of the supplied attestation credential", + }, + Key: "host.TpmManager.verifyCredential", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate integrity report", + Summary: "Generates an integrity report for the selected components", + }, + Key: "host.TpmManager.generateReport", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Distributed Port Group set custom value", + Summary: "Distributed Port Group set custom value", + }, + Key: "dvs.DistributedVirtualPortgroup.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload Distributed Port Group", + Summary: "Reload Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename Distributed Port Group", + Summary: "Rename Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete Distributed Port Group", + Summary: "Delete Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag to Distributed Port Group", + Summary: "Add tag to Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Distributed Port Group remove tag", + Summary: "Distributed Port Group remove tag", + }, + Key: "dvs.DistributedVirtualPortgroup.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "dvs.DistributedVirtualPortgroup.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Distributed Port Group delete network", + Summary: "Distributed Port Group delete network", + }, + Key: "dvs.DistributedVirtualPortgroup.destroyNetwork", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure Distributed Port Group", + Summary: "Reconfigure Distributed Port Group", + }, + Key: "dvs.DistributedVirtualPortgroup.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get Distributed Port Group configuration spec to rollback", + Summary: "Get Distributed Port Group configuration spec to rollback", + }, + Key: "dvs.DistributedVirtualPortgroup.rollback", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set alarm custom value", + Summary: "Sets the value of a custom field of an alarm", + }, + Key: "alarm.Alarm.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove alarm", + Summary: "Remove the alarm", + }, + Key: "alarm.Alarm.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure alarm", + Summary: "Reconfigure the alarm", + }, + Key: "alarm.Alarm.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set compute-resource custom value", + Summary: "Sets the value of a custom field for a unified compute resource", + }, + Key: "ComputeResource.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload resource", + Summary: "Reloads the resource", + }, + Key: "ComputeResource.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename compute-resource", + Summary: "Rename the compute-resource", + }, + Key: "ComputeResource.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove host", + Summary: "Removes the host resource", + }, + Key: "ComputeResource.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to this object", + }, + Key: "ComputeResource.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Removes a set of tags from this object", + }, + Key: "ComputeResource.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ComputeResource.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure compute-resource", + Summary: "Reconfigures a compute-resource", + }, + Key: "ComputeResource.reconfigureEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set latest page size", + Summary: "Set the last page viewed size and contain at most maxCount items in the page", + }, + Key: "HistoryCollector.setLatestPageSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rewind", + Summary: "Move the scroll position to the oldest item", + }, + Key: "HistoryCollector.rewind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset", + Summary: "Move the scroll position to the item just above the last page viewed", + }, + Key: "HistoryCollector.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove collector", + Summary: "Remove the collector from server", + }, + Key: "HistoryCollector.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update specific metadata", + Summary: "Update specific metadata for the given owner and list of virtual machine IDs", + }, + Key: "vm.MetadataManager.updateMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve specific metadata", + Summary: "Retrieve specific metadata for the given owner and list of virtual machine IDs", + }, + Key: "vm.MetadataManager.retrieveMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve all metadata", + Summary: "Retrieve all metadata for the given owner and datastore", + }, + Key: "vm.MetadataManager.retrieveAllMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clear metadata", + Summary: "Clear all metadata for the given owner and datastore", + }, + Key: "vm.MetadataManager.clearMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query latest statistics for a virtual machine", + Summary: "Queries the latest values of performance statistics of a virtual machine", + }, + Key: "InternalStatsCollector.queryLatestVmStats", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch set custom value", + Summary: "vSphere Distributed Switch set custom value", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload vSphere Distributed Switch", + Summary: "Reload vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename vSphere Distributed Switch", + Summary: "Rename vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove vSphere Distributed Switch", + Summary: "Remove vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch add tag", + Summary: "vSphere Distributed Switch add tag", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch remove tag", + Summary: "vSphere Distributed Switch remove tag", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPort keys", + Summary: "Retrieve dvPort keys", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.fetchPortKeys", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve dvPorts", + Summary: "Retrieve dvPorts", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.fetchPorts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query used virtual LAN ID", + Summary: "Query used virtual LAN ID", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.queryUsedVlanId", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSphere Distributed Switch", + Summary: "Reconfigure vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSphere Distributed Switch product specification operation", + Summary: "vSphere Distributed Switch product specification operation", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.performProductSpecOperation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Merge vSphere Distributed Switch", + Summary: "Merge vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.merge", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Groups", + Summary: "Add Distributed Port Groups", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addPortgroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move dvPort", + Summary: "Move dvPort", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.movePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSphere Distributed Switch capability", + Summary: "Update vSphere Distributed Switch capability", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateCapability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure dvPort", + Summary: "Reconfigure dvPort", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reconfigurePort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh dvPort state", + Summary: "Refresh dvPort state", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.refreshPortState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rectify vSphere Distributed Switch host", + Summary: "Rectify vSphere Distributed Switch host", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.rectifyHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network resource pools on vSphere Distributed Switch", + Summary: "Update network resource pools on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add network resource pools on vSphere Distributed Switch", + Summary: "Add network resource pools on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove network resource pools on vSphere Distributed Switch", + Summary: "Remove network resource pools on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.removeNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure a network resource pool on a distributed switch", + Summary: "Reconfigures a network resource pool on a distributed switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.reconfigureVmVnicNetworkResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update network I/O control on vSphere Distributed Switch", + Summary: "Update network I/O control on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.enableNetworkResourceManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get vSphere Distributed Switch configuration spec to rollback", + Summary: "Get vSphere Distributed Switch configuration spec to rollback", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.rollback", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Distributed Port Group", + Summary: "Add Distributed Port Group", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.addPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update health check configuration on vSphere Distributed Switch", + Summary: "Update health check configuration on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateHealthCheckConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Look up portgroup based on portgroup key", + Summary: "Look up portgroup based on portgroup key", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.lookupPortgroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Link Aggregation Control Protocol groups on vSphere Distributed Switch", + Summary: "Update Link Aggregation Control Protocol groups on vSphere Distributed Switch", + }, + Key: "dvs.VmwareDistributedVirtualSwitch.updateLacpGroupConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a virtual disk object", + Summary: "Create a virtual disk object", + }, + Key: "vslm.vcenter.VStorageObjectManager.createDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register a legacy disk to be a virtual disk object", + Summary: "Register a legacy disk to be a virtual disk object", + }, + Key: "vslm.vcenter.VStorageObjectManager.registerDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extend a virtual disk to the new capacity", + Summary: "Extend a virtual disk to the new capacity", + }, + Key: "vslm.vcenter.VStorageObjectManager.extendDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inflate a thin virtual disk", + Summary: "Inflate a thin virtual disk", + }, + Key: "vslm.vcenter.VStorageObjectManager.inflateDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename a virtual storage object", + Summary: "Rename a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.renameVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update storage policy on a virtual storage object", + Summary: "Update storage policy on a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.updateVStorageObjectPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete a virtual storage object", + Summary: "Delete a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.deleteVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve a virtual storage object", + Summary: "Retrieve a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.retrieveVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveVStorageObjectState", + Summary: "retrieveVStorageObjectState", + }, + Key: "vslm.vcenter.VStorageObjectManager.retrieveVStorageObjectState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "List virtual storage objects on a datastore", + Summary: "List virtual storage objects on a datastore", + }, + Key: "vslm.vcenter.VStorageObjectManager.listVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone a virtual storage object", + Summary: "Clone a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.cloneVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate a virtual storage object", + Summary: "Relocate a virtual storage object", + }, + Key: "vslm.vcenter.VStorageObjectManager.relocateVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "attachTagToVStorageObject", + Summary: "attachTagToVStorageObject", + }, + Key: "vslm.vcenter.VStorageObjectManager.attachTagToVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "detachTagFromVStorageObject", + Summary: "detachTagFromVStorageObject", + }, + Key: "vslm.vcenter.VStorageObjectManager.detachTagFromVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listVStorageObjectsAttachedToTag", + Summary: "listVStorageObjectsAttachedToTag", + }, + Key: "vslm.vcenter.VStorageObjectManager.listVStorageObjectsAttachedToTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "listTagsAttachedToVStorageObject", + Summary: "listTagsAttachedToVStorageObject", + }, + Key: "vslm.vcenter.VStorageObjectManager.listTagsAttachedToVStorageObject", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconcile datastore inventory", + Summary: "Reconcile datastore inventory", + }, + Key: "vslm.vcenter.VStorageObjectManager.reconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Schedule reconcile datastore inventory", + Summary: "Schedule reconcile datastore inventory", + }, + Key: "vslm.vcenter.VStorageObjectManager.scheduleReconcileDatastoreInventory", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check group membership", + Summary: "Check whether a user is a member of a given list of groups", + }, + Key: "UserDirectory.checkGroupMembership", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get user groups", + Summary: "Searches for users and groups", + }, + Key: "UserDirectory.retrieveUserGroups", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create profile", + Summary: "Create profile", + }, + Key: "profile.ProfileManager.createProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query policy metadata", + Summary: "Query policy metadata", + }, + Key: "profile.ProfileManager.queryPolicyMetadata", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find associated profile", + Summary: "Find associated profile", + }, + Key: "profile.ProfileManager.findAssociatedProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate host for OVF package compatibility", + Summary: "Validates if a host is compatible with the requirements in an OVF package", + }, + Key: "OvfManager.validateHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Parse OVF descriptor", + Summary: "Parses and validates an OVF descriptor", + }, + Key: "OvfManager.parseDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert OVF descriptor", + Summary: "Convert OVF descriptor to entity specification", + }, + Key: "OvfManager.createImportSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create an OVF descriptor", + Summary: "Creates an OVF descriptor from either a VM or vApp", + }, + Key: "OvfManager.createDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Parse OVF Descriptor at URL", + Summary: "Parses and validates an OVF descriptor at a given URL", + }, + Key: "OvfManager.parseDescriptorAtUrl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys an OVF template from a URL", + }, + Key: "OvfManager.importOvfAtUrl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export as OVF template", + Summary: "Uploads OVF template to a remote server", + }, + Key: "OvfManager.exportOvfToUrl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update global message", + Summary: "Updates the system global message", + }, + Key: "SessionManager.updateMessage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by token", + Summary: "Logs on to the server through token representing principal identity", + }, + Key: "SessionManager.loginByToken", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login", + Summary: "Create a login session", + }, + Key: "SessionManager.login", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by SSPI", + Summary: "Log on to the server using SSPI passthrough authentication", + }, + Key: "SessionManager.loginBySSPI", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by SSL thumbprint", + Summary: "Log on to the server using SSL thumbprint authentication", + }, + Key: "SessionManager.loginBySSLThumbprint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login by session ticket", + Summary: "Log on to the server using a session ticket", + }, + Key: "SessionManager.loginBySessionTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire session ticket", + Summary: "Acquire a ticket for authenticating to a remote service", + }, + Key: "SessionManager.acquireSessionTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Logout", + Summary: "Logout and end the current session", + }, + Key: "SessionManager.logout", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire local ticket", + Summary: "Acquire one-time ticket for authenticating server-local client", + }, + Key: "SessionManager.acquireLocalTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire generic service ticket", + Summary: "Acquire a one-time credential that may be used to make the specified request", + }, + Key: "SessionManager.acquireGenericServiceTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Terminate session", + Summary: "Logout and end the provided list of sessions", + }, + Key: "SessionManager.terminate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set locale", + Summary: "Set the session locale for determining the languages used for messages and formatting data", + }, + Key: "SessionManager.setLocale", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login extension", + Summary: "Creates a privileged login session for an extension", + }, + Key: "SessionManager.loginExtension", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login extension", + Summary: "Invalid subject name", + }, + Key: "SessionManager.loginExtensionBySubjectName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Login extension by certificate", + Summary: "Login extension by certificate", + }, + Key: "SessionManager.loginExtensionByCertificate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Impersonate user", + Summary: "Convert session to impersonate specified user", + }, + Key: "SessionManager.impersonateUser", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Session active query", + Summary: "Validates that a currently active session exists", + }, + Key: "SessionManager.sessionIsActive", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire clone ticket", + Summary: "Acquire a session-specific ticket string that can be used to clone the current session", + }, + Key: "SessionManager.acquireCloneTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone session", + Summary: "Clone the specified session and associate it with the current connection", + }, + Key: "SessionManager.cloneSession", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open remote disk for read/write", + Summary: "Opens a disk on a virtual machine for read/write access", + }, + Key: "NfcService.randomAccessOpen", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Open remote disk for read", + Summary: "Opens a disk on a virtual machine for read access", + }, + Key: "NfcService.randomAccessOpenReadonly", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "randomAccessFileOpen", + Summary: "randomAccessFileOpen", + }, + Key: "NfcService.randomAccessFileOpen", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read virtual machine files", + Summary: "Read files associated with a virtual machine", + }, + Key: "NfcService.getVmFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Write virtual machine files", + Summary: "Write files associated with a virtual machine", + }, + Key: "NfcService.putVmFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Manipulate file paths", + Summary: "Permission to manipulate file paths", + }, + Key: "NfcService.fileManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Manipulate system-related file paths", + Summary: "Permission to manipulate all system related file paths", + }, + Key: "NfcService.systemManagement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "getServerNfcLibVersion", + Summary: "getServerNfcLibVersion", + }, + Key: "NfcService.getServerNfcLibVersion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "registerProvider", + Summary: "registerProvider", + }, + Key: "HealthUpdateManager.registerProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unregisterProvider", + Summary: "unregisterProvider", + }, + Key: "HealthUpdateManager.unregisterProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryProviderList", + Summary: "queryProviderList", + }, + Key: "HealthUpdateManager.queryProviderList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "hasProvider", + Summary: "hasProvider", + }, + Key: "HealthUpdateManager.hasProvider", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryProviderName", + Summary: "queryProviderName", + }, + Key: "HealthUpdateManager.queryProviderName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryHealthUpdateInfos", + Summary: "queryHealthUpdateInfos", + }, + Key: "HealthUpdateManager.queryHealthUpdateInfos", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addMonitoredEntities", + Summary: "addMonitoredEntities", + }, + Key: "HealthUpdateManager.addMonitoredEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeMonitoredEntities", + Summary: "removeMonitoredEntities", + }, + Key: "HealthUpdateManager.removeMonitoredEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryMonitoredEntities", + Summary: "queryMonitoredEntities", + }, + Key: "HealthUpdateManager.queryMonitoredEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "hasMonitoredEntity", + Summary: "hasMonitoredEntity", + }, + Key: "HealthUpdateManager.hasMonitoredEntity", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryUnmonitoredHosts", + Summary: "queryUnmonitoredHosts", + }, + Key: "HealthUpdateManager.queryUnmonitoredHosts", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "postHealthUpdates", + Summary: "postHealthUpdates", + }, + Key: "HealthUpdateManager.postHealthUpdates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryHealthUpdates", + Summary: "queryHealthUpdates", + }, + Key: "HealthUpdateManager.queryHealthUpdates", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addFilter", + Summary: "addFilter", + }, + Key: "HealthUpdateManager.addFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterList", + Summary: "queryFilterList", + }, + Key: "HealthUpdateManager.queryFilterList", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterName", + Summary: "queryFilterName", + }, + Key: "HealthUpdateManager.queryFilterName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterInfoIds", + Summary: "queryFilterInfoIds", + }, + Key: "HealthUpdateManager.queryFilterInfoIds", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFilterEntities", + Summary: "queryFilterEntities", + }, + Key: "HealthUpdateManager.queryFilterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "addFilterEntities", + Summary: "addFilterEntities", + }, + Key: "HealthUpdateManager.addFilterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeFilterEntities", + Summary: "removeFilterEntities", + }, + Key: "HealthUpdateManager.removeFilterEntities", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "removeFilter", + Summary: "removeFilter", + }, + Key: "HealthUpdateManager.removeFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set vMotion custom value", + Summary: "Sets the value of a custom field of a host vMotion system", + }, + Key: "host.VMotionSystem.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IP configuration", + Summary: "Update the IP configuration of the vMotion virtual NIC", + }, + Key: "host.VMotionSystem.updateIpConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Select vMotion virtual NIC", + Summary: "Select the virtual NIC to be used for vMotion", + }, + Key: "host.VMotionSystem.selectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deselect vMotion virtual NIC", + Summary: "Deselect the virtual NIC to be used for vMotion", + }, + Key: "host.VMotionSystem.deselectVnic", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add custom field", + Summary: "Creates a new custom property", + }, + Key: "CustomFieldsManager.addFieldDefinition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove custom field", + Summary: "Removes a custom property", + }, + Key: "CustomFieldsManager.removeFieldDefinition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename custom property", + Summary: "Renames a custom property", + }, + Key: "CustomFieldsManager.renameFieldDefinition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set custom field", + Summary: "Assigns a value to a custom property", + }, + Key: "CustomFieldsManager.setField", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get ManagedEntities", + Summary: "Get the list of ManagedEntities that the name is a Substring of the custom field name and the value is a Substring of the field value.", + }, + Key: "CustomFieldsManager.getEntitiesWithCustomFieldAndValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomFields", + Summary: "retrieveCustomFields", + }, + Key: "CustomFieldsManager.retrieveCustomFields", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure virtual disk digest", + Summary: "Controls the configuration of the digests for the virtual disks", + }, + Key: "CbrcManager.configureDigest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Recompute virtual disk digest", + Summary: "Recomputes the digest for the given virtual disks, if necessary", + }, + Key: "CbrcManager.recomputeDigest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk digest configuration", + Summary: "Returns the current configuration of the digest for the given digest-enabled virtual disks", + }, + Key: "CbrcManager.queryDigestInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual disk digest runtime information", + Summary: "Returns the status of runtime digest usage for the given digest-enabled virtual disks", + }, + Key: "CbrcManager.queryDigestRuntimeInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get diagnostic files", + Summary: "Gets the list of diagnostic files for a given system", + }, + Key: "DiagnosticManager.queryDescriptions", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Browse diagnostic manager", + Summary: "Returns part of a log file", + }, + Key: "DiagnosticManager.browse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Generate system logs bundles", + Summary: "Instructs the server to generate system logs bundles", + }, + Key: "DiagnosticManager.generateLogBundles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query file hash", + Summary: "Queries file integrity information", + }, + Key: "DiagnosticManager.queryFileHash", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure workload model calculation parameters for datastore", + Summary: "Configures calculation parameters used for computation of workload model for a datastore", + }, + Key: "DrsStatsManager.configureWorkloadCharacterization", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query current workload model calculation parameters", + Summary: "Queries a host for the current workload model calculation parameters", + }, + Key: "DrsStatsManager.queryWorkloadCharacterization", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure datastore correlation detector", + Summary: "Configures datastore correlation detector with datastore to datastore cluster mappings", + }, + Key: "DrsStatsManager.configureCorrelationDetector", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore correlation result", + Summary: "Queries correlation detector for a list of datastores correlated to a given datastore", + }, + Key: "DrsStatsManager.queryCorrelationResult", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update agent virtual machine information", + Summary: "Updates agent virtual machine information", + }, + Key: "EsxAgentConfigManager.updateAgentVmInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query agent virtual machine information", + Summary: "Returns the state for each of the specified agent virtual machines", + }, + Key: "EsxAgentConfigManager.queryAgentVmInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update compute resource agent information", + Summary: "Updates the number of required agent virtual machines for one or more compute resources", + }, + Key: "EsxAgentConfigManager.updateComputeResourceAgentInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query compute resource agent information", + Summary: "Retrieves the agent information for one or more compute resources", + }, + Key: "EsxAgentConfigManager.queryComputeResourceAgentInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set extensible custom value", + Summary: "Sets the value of a custom field of an extensible managed object", + }, + Key: "ExtensibleManagedObject.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get lease download manifest", + Summary: "Gets the download manifest for this lease", + }, + Key: "HttpNfcLease.getManifest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Complete the lease", + Summary: "The lease completed successfully", + }, + Key: "HttpNfcLease.complete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "End the lease", + Summary: "The lease has ended", + }, + Key: "HttpNfcLease.abort", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update lease progress", + Summary: "Updates lease progress", + }, + Key: "HttpNfcLease.progress", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install IO Filter", + Summary: "Installs an IO Filter on a compute resource", + }, + Key: "IoFilterManager.installIoFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall IO Filter", + Summary: "Uninstalls an IO Filter from a compute resource", + }, + Key: "IoFilterManager.uninstallIoFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade IO Filter", + Summary: "Upgrades an IO Filter on a compute resource", + }, + Key: "IoFilterManager.upgradeIoFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query IO Filter installation issues", + Summary: "Queries IO Filter installation issues on a compute resource", + }, + Key: "IoFilterManager.queryIssue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryIoFilterInfo", + Summary: "queryIoFilterInfo", + }, + Key: "IoFilterManager.queryIoFilterInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve IO Filter installation errors on host", + Summary: "Resolves IO Filter installation errors on a host", + }, + Key: "IoFilterManager.resolveInstallationErrorsOnHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resolve IO Filter installation errors on cluster", + Summary: "Resolves IO Filter installation errors on a cluster", + }, + Key: "IoFilterManager.resolveInstallationErrorsOnCluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query information about virtual disks using IO Filter", + Summary: "Queries information about virtual disks that use an IO Filter installed on a compute resource", + }, + Key: "IoFilterManager.queryDisksUsingFilter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update IO Filter policy", + Summary: "Updates the policy to IO Filter mapping in vCenter Server", + }, + Key: "IoFilterManager.updateIoFilterPolicy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query supported features", + Summary: "Searches the current license source for licenses available from this system", + }, + Key: "LicenseManager.querySupportedFeatures", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query license source", + Summary: "Searches the current license source for licenses available for each feature known to this system", + }, + Key: "LicenseManager.querySourceAvailability", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query license usage", + Summary: "Returns the list of features and the number of licenses that have been reserved", + }, + Key: "LicenseManager.queryUsage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set product edition", + Summary: "Defines the product edition", + }, + Key: "LicenseManager.setEdition", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check feature", + Summary: "Checks if a feature is enabled", + }, + Key: "LicenseManager.checkFeature", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable license", + Summary: "Enable a feature that is marked as user-configurable", + }, + Key: "LicenseManager.enable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable license", + Summary: "Release licenses for a user-configurable feature", + }, + Key: "LicenseManager.disable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure license source", + Summary: "Allows reconfiguration of the License Manager license source", + }, + Key: "LicenseManager.configureSource", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Installing license", + Summary: "Installing license", + }, + Key: "LicenseManager.updateLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add license", + Summary: "Adds a new license to the license inventory", + }, + Key: "LicenseManager.addLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove license", + Summary: "Removes a license from the license inventory", + }, + Key: "LicenseManager.removeLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Decode license", + Summary: "Decodes the license to return the properties of that license key", + }, + Key: "LicenseManager.decodeLicense", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update license label", + Summary: "Update a license's label", + }, + Key: "LicenseManager.updateLabel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove license label", + Summary: "Removes a license's label", + }, + Key: "LicenseManager.removeLabel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get License Data Manager", + Summary: "Gets the License Data Manager", + }, + Key: "LicenseManager.queryLicenseDataManager", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Activate remote hard enforcement", + Summary: "Activates the remote hard enforcement", + }, + Key: "LicenseManager.activateRemoteHardEnforcement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add end point", + Summary: "Add a service whose connections are to be proxied", + }, + Key: "ProxyService.addEndpoint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove end point", + Summary: "End point to be detached", + }, + Key: "ProxyService.removeEndpoint", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Estimate database size", + Summary: "Estimates the database size required to store VirtualCenter data", + }, + Key: "ResourcePlanningManager.estimateDatabaseSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by UUID", + Summary: "Finds a virtual machine or host by UUID", + }, + Key: "SearchIndex.findByUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find virtual machine by datastore path", + Summary: "Finds a virtual machine by its location on a datastore", + }, + Key: "SearchIndex.findByDatastorePath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by DNS", + Summary: "Finds a virtual machine or host by its DNS name", + }, + Key: "SearchIndex.findByDnsName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by IP", + Summary: "Finds a virtual machine or host by IP address", + }, + Key: "SearchIndex.findByIp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find entity by inventory path", + Summary: "Finds a virtual machine or host based on its location in the inventory", + }, + Key: "SearchIndex.findByInventoryPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find folder child", + Summary: "Finds an immediate child of a folder", + }, + Key: "SearchIndex.findChild", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find by UUID", + Summary: "Find entities based on their UUID", + }, + Key: "SearchIndex.findAllByUuid", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find by DNS name", + Summary: "Find by DNS name", + }, + Key: "SearchIndex.findAllByDnsName", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Find by IP address", + Summary: "Find entities based on their IP address", + }, + Key: "SearchIndex.findAllByIp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "findAllInstantCloneParentInGroup", + Summary: "findAllInstantCloneParentInGroup", + }, + Key: "SearchIndex.findAllInstantCloneParentInGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "findAllInstantCloneChildrenOfGroup", + Summary: "findAllInstantCloneChildrenOfGroup", + }, + Key: "SearchIndex.findAllInstantCloneChildrenOfGroup", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute client service", + Summary: "Execute the client service", + }, + Key: "SimpleCommand.Execute", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure Storage I/O Control on datastore", + Summary: "Configure Storage I/O Control on datastore", + }, + Key: "StorageResourceManager.ConfigureDatastoreIORM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure Storage I/O Control on datastore", + Summary: "Configure Storage I/O Control on datastore", + }, + Key: "StorageResourceManager.ConfigureDatastoreIORMOnHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query Storage I/O Control configuration options", + Summary: "Query Storage I/O Control configuration options", + }, + Key: "StorageResourceManager.QueryIORMConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get storage I/O resource management device model", + Summary: "Returns the device model computed for a given datastore by storage DRS", + }, + Key: "StorageResourceManager.GetStorageIORMDeviceModel", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query datastore performance summary", + Summary: "Query datastore performance metrics in summary form", + }, + Key: "StorageResourceManager.queryDatastorePerformanceSummary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply a Storage DRS recommendation", + Summary: "Apply a Storage DRS recommendation", + }, + Key: "StorageResourceManager.applyRecommendationToPod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply Storage DRS recommendations", + Summary: "Apply Storage DRS recommendations", + }, + Key: "StorageResourceManager.applyRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel storage DRS recommendation", + Summary: "Cancels a storage DRS recommendation", + }, + Key: "StorageResourceManager.cancelRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh storage DRS recommendation", + Summary: "Refreshes the storage DRS recommendations on the specified datastore cluster", + }, + Key: "StorageResourceManager.refreshRecommendation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "refreshRecommendationsForPod", + Summary: "refreshRecommendationsForPod", + }, + Key: "StorageResourceManager.refreshRecommendationsForPod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure Storage DRS", + Summary: "Configure Storage DRS on a datastore cluster", + }, + Key: "StorageResourceManager.configureStorageDrsForPod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Invoke storage DRS for placement recommendations", + Summary: "Invokes storage DRS for placement recommendations", + }, + Key: "StorageResourceManager.recommendDatastores", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "rankForPlacement", + Summary: "rankForPlacement", + }, + Key: "StorageResourceManager.rankForPlacement", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryStorageStatisticsByProfile", + Summary: "queryStorageStatisticsByProfile", + }, + Key: "StorageResourceManager.queryStorageStatisticsByProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set latest page size", + Summary: "Set the last page viewed size and contain at most maxCount items in the page", + }, + Key: "TaskHistoryCollector.setLatestPageSize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rewind", + Summary: "Move the scroll position to the oldest item", + }, + Key: "TaskHistoryCollector.rewind", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset", + Summary: "Move the scroll position to the item just above the last page viewed", + }, + Key: "TaskHistoryCollector.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove collector", + Summary: "Remove the collector from server", + }, + Key: "TaskHistoryCollector.remove", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read next", + Summary: "The scroll position is moved to the next new page after the read", + }, + Key: "TaskHistoryCollector.readNext", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Read previous", + Summary: "The scroll position is moved to the next older page after the read", + }, + Key: "TaskHistoryCollector.readPrev", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "performUpgradePreflightCheck", + Summary: "performUpgradePreflightCheck", + }, + Key: "VsanUpgradeSystem.performUpgradePreflightCheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryUpgradeStatus", + Summary: "queryUpgradeStatus", + }, + Key: "VsanUpgradeSystem.queryUpgradeStatus", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "performUpgrade", + Summary: "performUpgrade", + }, + Key: "VsanUpgradeSystem.performUpgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set a custom property to an opaque network", + Summary: "Sets the value of a custom field of an opaque network", + }, + Key: "OpaqueNetwork.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload an opaque network", + Summary: "Reloads the information about the opaque network", + }, + Key: "OpaqueNetwork.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename an opaque network", + Summary: "Renames an opaque network", + }, + Key: "OpaqueNetwork.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete opaque network", + Summary: "Deletes an opaque network if it is not used by any host or virtual machine", + }, + Key: "OpaqueNetwork.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add a tag to an opaque network", + Summary: "Adds a set of tags to the opaque network", + }, + Key: "OpaqueNetwork.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove a tag from an opaque network", + Summary: "Removes a set of tags from the opaque network", + }, + Key: "OpaqueNetwork.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "OpaqueNetwork.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove an opaque network", + Summary: "Removes an opaque network", + }, + Key: "OpaqueNetwork.destroyNetwork", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set resource pool custom value", + Summary: "Sets the value of a custom field of a resource pool of physical resources", + }, + Key: "ResourcePool.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload resource pool", + Summary: "Reload the resource pool", + }, + Key: "ResourcePool.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename resource pool", + Summary: "Rename the resource pool", + }, + Key: "ResourcePool.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete resource pool", + Summary: "Delete the resource pool, which also deletes its contents and removes it from its parent folder (if any)", + }, + Key: "ResourcePool.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the resource pool", + }, + Key: "ResourcePool.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the resource pool", + }, + Key: "ResourcePool.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "ResourcePool.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update resource pool configuration", + Summary: "Updates the resource pool configuration", + }, + Key: "ResourcePool.updateConfig", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move into resource pool", + Summary: "Moves a set of resource pools or virtual machines into this pool", + }, + Key: "ResourcePool.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update child resource configuration", + Summary: "Change the resource configuration of a set of children of the resource pool", + }, + Key: "ResourcePool.updateChildResourceConfiguration", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create resource pool", + Summary: "Creates a new resource pool", + }, + Key: "ResourcePool.createResourcePool", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete resource pool children", + Summary: "Removes all child resource pools recursively", + }, + Key: "ResourcePool.destroyChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create vApp", + Summary: "Creates a child vApp of this resource pool", + }, + Key: "ResourcePool.createVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Creates a virtual machine in this resource pool", + }, + Key: "ResourcePool.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to this resource pool", + }, + Key: "ResourcePool.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys a virtual machine or vApp", + }, + Key: "ResourcePool.importVApp", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query resource pool resource configuration options", + Summary: "Returns configuration options for a set of resources for a resource pool", + }, + Key: "ResourcePool.queryResourceConfigOption", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh resource runtime information", + Summary: "Refreshes the resource usage runtime information", + }, + Key: "ResourcePool.refreshRuntime", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual machine custom value", + Summary: "Sets the value of a custom field of a virtual machine", + }, + Key: "VirtualMachine.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload virtual machine", + Summary: "Reloads the virtual machine", + }, + Key: "VirtualMachine.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename virtual machine", + Summary: "Rename the virtual machine", + }, + Key: "VirtualMachine.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete virtual machine", + Summary: "Delete this virtual machine. Deleting this virtual machine also deletes its contents and removes it from its parent folder (if any).", + }, + Key: "VirtualMachine.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add Tag", + Summary: "Add a set of tags to the virtual machine", + }, + Key: "VirtualMachine.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the virtual machine", + }, + Key: "VirtualMachine.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "VirtualMachine.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Refresh virtual machine storage information", + Summary: "Refresh storage information for the virtual machine", + }, + Key: "VirtualMachine.refreshStorageInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve virtual machine backup agent", + Summary: "Retrieves the backup agent for the virtual machine", + }, + Key: "VirtualMachine.retrieveBackupAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine snapshot", + Summary: "Create a new snapshot of this virtual machine", + }, + Key: "VirtualMachine.createSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine snapshot", + Summary: "Create a new snapshot of this virtual machine", + }, + Key: "VirtualMachine.createSnapshotEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Revert to current snapshot", + Summary: "Reverts the virtual machine to the current snapshot", + }, + Key: "VirtualMachine.revertToCurrentSnapshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove all snapshots", + Summary: "Remove all the snapshots associated with this virtual machine", + }, + Key: "VirtualMachine.removeAllSnapshots", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Consolidate virtual machine disk files", + Summary: "Consolidate disk files of this virtual machine", + }, + Key: "VirtualMachine.consolidateDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Estimate virtual machine disks consolidation space requirement", + Summary: "Estimate the temporary space required to consolidate disk files.", + }, + Key: "VirtualMachine.estimateStorageRequirementForConsolidate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure virtual machine", + Summary: "Reconfigure this virtual machine", + }, + Key: "VirtualMachine.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade VM compatibility", + Summary: "Upgrade virtual machine compatibility to the latest version", + }, + Key: "VirtualMachine.upgradeVirtualHardware", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Extract OVF environment", + Summary: "Returns the XML document that represents the OVF environment", + }, + Key: "VirtualMachine.extractOvfEnvironment", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power On virtual machine", + Summary: "Power On this virtual machine", + }, + Key: "VirtualMachine.powerOn", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power Off virtual machine", + Summary: "Power Off this virtual machine", + }, + Key: "VirtualMachine.powerOff", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend virtual machine", + Summary: "Suspend virtual machine", + }, + Key: "VirtualMachine.suspend", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset virtual machine", + Summary: "Reset this virtual machine", + }, + Key: "VirtualMachine.reset", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate guest OS shutdown", + Summary: "Issues a command to the guest operating system to perform a clean shutdown of all services", + }, + Key: "VirtualMachine.shutdownGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate guest OS reboot", + Summary: "Issues a command to the guest operating system asking it to perform a reboot", + }, + Key: "VirtualMachine.rebootGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiate guest OS standby", + Summary: "Issues a command to the guest operating system to prepare for a suspend operation", + }, + Key: "VirtualMachine.standbyGuest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Answer virtual machine question", + Summary: "Respond to a question that is blocking this virtual machine", + }, + Key: "VirtualMachine.answer", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Customize virtual machine guest OS", + Summary: "Customize a virtual machine's guest operating system", + }, + Key: "VirtualMachine.customize", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check customization specification", + Summary: "Check the customization specification against the virtual machine configuration", + }, + Key: "VirtualMachine.checkCustomizationSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Migrate virtual machine", + Summary: "Migrate a virtual machine's execution to a specific resource pool or host", + }, + Key: "VirtualMachine.migrate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Relocate virtual machine", + Summary: "Relocate the virtual machine to a specific location", + }, + Key: "VirtualMachine.relocate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone virtual machine", + Summary: "Creates a clone of this virtual machine", + }, + Key: "VirtualMachine.clone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "instantClone", + Summary: "instantClone", + }, + Key: "VirtualMachine.instantClone", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveInstantCloneChildren", + Summary: "retrieveInstantCloneChildren", + }, + Key: "VirtualMachine.retrieveInstantCloneChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveInstantCloneParent", + Summary: "retrieveInstantCloneParent", + }, + Key: "VirtualMachine.retrieveInstantCloneParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "markAsInstantCloneParent", + Summary: "markAsInstantCloneParent", + }, + Key: "VirtualMachine.markAsInstantCloneParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "unmarkAsInstantCloneParent", + Summary: "unmarkAsInstantCloneParent", + }, + Key: "VirtualMachine.unmarkAsInstantCloneParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "createForkChild", + Summary: "createForkChild", + }, + Key: "VirtualMachine.createForkChild", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "enableForkParent", + Summary: "enableForkParent", + }, + Key: "VirtualMachine.enableForkParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "disableForkParent", + Summary: "disableForkParent", + }, + Key: "VirtualMachine.disableForkParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveForkChildren", + Summary: "retrieveForkChildren", + }, + Key: "VirtualMachine.retrieveForkChildren", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveForkParent", + Summary: "retrieveForkParent", + }, + Key: "VirtualMachine.retrieveForkParent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the virtual machine as an OVF template", + }, + Key: "VirtualMachine.exportVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark virtual machine as template", + Summary: "Virtual machine is marked as a template", + }, + Key: "VirtualMachine.markAsTemplate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mark as virtual machine", + Summary: "Reassociate a virtual machine with a host or resource pool", + }, + Key: "VirtualMachine.markAsVirtualMachine", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister virtual machine", + Summary: "Removes this virtual machine from the inventory without removing any of the virtual machine files on disk", + }, + Key: "VirtualMachine.unregister", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reset guest OS information", + Summary: "Clears cached guest OS information", + }, + Key: "VirtualMachine.resetGuestInformation", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiated VMware Tools Installer Mount", + Summary: "Mounts the tools CD installer as a CD-ROM for the guest", + }, + Key: "VirtualMachine.mountToolsInstaller", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Connect VMware Tools CD", + Summary: "Connects the VMware Tools CD image to the guest", + }, + Key: "VirtualMachine.mountToolsInstallerImage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount tools installer", + Summary: "Unmounts the tools installer", + }, + Key: "VirtualMachine.unmountToolsInstaller", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiated VMware Tools install or upgrade", + Summary: "Issues a command to the guest operating system to install VMware Tools or upgrade to the latest revision", + }, + Key: "VirtualMachine.upgradeTools", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initiated VMware Tools upgrade", + Summary: "Upgrades VMware Tools in the virtual machine from specified CD image", + }, + Key: "VirtualMachine.upgradeToolsFromImage", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire virtual machine Mouse Keyboard Screen Ticket", + Summary: "Establishing a Mouse Keyboard Screen Ticket", + }, + Key: "VirtualMachine.acquireMksTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Acquire virtual machine service ticket", + Summary: "Establishing a specific remote virtual machine connection ticket", + }, + Key: "VirtualMachine.acquireTicket", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set console window screen resolution", + Summary: "Sets the console window's resolution as specified", + }, + Key: "VirtualMachine.setScreenResolution", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Defragment all disks", + Summary: "Defragment all virtual disks attached to this virtual machine", + }, + Key: "VirtualMachine.defragmentAllDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn On Fault Tolerance", + Summary: "Secondary VM created", + }, + Key: "VirtualMachine.createSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn On Fault Tolerance", + Summary: "Creates a secondary VM", + }, + Key: "VirtualMachine.createSecondaryEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Turn Off Fault Tolerance", + Summary: "Remove all secondaries for this virtual machine and turn off Fault Tolerance", + }, + Key: "VirtualMachine.turnOffFaultTolerance", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Test failover", + Summary: "Test Fault Tolerance failover by making a Secondary VM in a Fault Tolerance pair the Primary VM", + }, + Key: "VirtualMachine.makePrimary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Test restarting Secondary VM", + Summary: "Test restart Secondary VM by stopping a Secondary VM in the Fault Tolerance pair", + }, + Key: "VirtualMachine.terminateFaultTolerantVM", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend Fault Tolerance", + Summary: "Suspend Fault Tolerance on this virtual machine", + }, + Key: "VirtualMachine.disableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Resume Fault Tolerance", + Summary: "Resume Fault Tolerance on this virtual machine", + }, + Key: "VirtualMachine.enableSecondary", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set virtual machine display topology", + Summary: "Set the display topology for the virtual machine", + }, + Key: "VirtualMachine.setDisplayTopology", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start recording", + Summary: "Start a recording session on this virtual machine", + }, + Key: "VirtualMachine.startRecording", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop recording", + Summary: "Stop a currently active recording session on this virtual machine", + }, + Key: "VirtualMachine.stopRecording", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start replaying", + Summary: "Start a replay session on this virtual machine", + }, + Key: "VirtualMachine.startReplaying", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop replaying", + Summary: "Stop a replay session on this virtual machine", + }, + Key: "VirtualMachine.stopReplaying", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Promote virtual machine disks", + Summary: "Promote disks of the virtual machine that have delta disk backings", + }, + Key: "VirtualMachine.promoteDisks", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Take virtual machine screenshot", + Summary: "Take a screenshot of a virtual machine's guest OS console", + }, + Key: "VirtualMachine.createScreenshot", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Put USB HID scan codes", + Summary: "Injects a sequence of USB HID scan codes into the keyboard", + }, + Key: "VirtualMachine.putUsbScanCodes", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query virtual machine disk changes", + Summary: "Query for changes to the virtual machine's disks since a given point in the past", + }, + Key: "VirtualMachine.queryChangedDiskAreas", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query unowned virtual machine files", + Summary: "Query files of the virtual machine not owned by the datastore principal user", + }, + Key: "VirtualMachine.queryUnownedFiles", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload virtual machine from new configuration", + Summary: "Reloads the virtual machine from a new configuration file", + }, + Key: "VirtualMachine.reloadFromPath", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query Virtual Machine Fault Tolerance Compatibility", + Summary: "Check if virtual machine is compatible for Fault Tolerance", + }, + Key: "VirtualMachine.queryFaultToleranceCompatibility", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryFaultToleranceCompatibilityEx", + Summary: "queryFaultToleranceCompatibilityEx", + }, + Key: "VirtualMachine.queryFaultToleranceCompatibilityEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Suspend and resume the virtual machine", + Summary: "Suspend and resume the virtual machine", + }, + Key: "VirtualMachine.invokeFSR", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Hard stop virtual machine", + Summary: "Hard stop virtual machine", + }, + Key: "VirtualMachine.terminate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get native clone capability", + Summary: "Check if native clone is supported on the virtual machine", + }, + Key: "VirtualMachine.isNativeSnapshotCapable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure quorum file path prefix", + Summary: "Configures the quorum file path prefix for the virtual machine", + }, + Key: "VirtualMachine.configureQuorumFilePathPrefix", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Retrieve quorum file path prefix", + Summary: "Retrieves the quorum file path prefix for the virtual machine", + }, + Key: "VirtualMachine.retrieveQuorumFilePathPrefix", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Inject OVF Environment into virtual machine", + Summary: "Specifies the OVF Environments to be injected into and returned for a virtual machine", + }, + Key: "VirtualMachine.injectOvfEnvironment", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Wipe a Flex-SE virtual disk", + Summary: "Wipes a Flex-SE virtual disk", + }, + Key: "VirtualMachine.wipeDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Shrink a Flex-SE virtual disk", + Summary: "Shrinks a Flex-SE virtual disk", + }, + Key: "VirtualMachine.shrinkDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Send NMI", + Summary: "Sends a non-maskable interrupt (NMI) to the virtual machine", + }, + Key: "VirtualMachine.sendNMI", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload virtual machine", + Summary: "Reloads the virtual machine", + }, + Key: "VirtualMachine.reloadEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach a virtual disk", + Summary: "Attach an existing virtual disk to the virtual machine", + }, + Key: "VirtualMachine.attachDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detach a virtual disk", + Summary: "Detach a virtual disk from the virtual machine", + }, + Key: "VirtualMachine.detachDisk", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply EVC Mode", + Summary: "Apply EVC Mode to a virtual machine", + }, + Key: "VirtualMachine.applyEvcMode", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set datacenter custom value", + Summary: "Sets the value of a custom field of a datacenter", + }, + Key: "Datacenter.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload datacenter", + Summary: "Reloads the datacenter", + }, + Key: "Datacenter.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename datacenter", + Summary: "Rename the datacenter", + }, + Key: "Datacenter.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove datacenter", + Summary: "Deletes the datacenter and removes it from its parent folder (if any)", + }, + Key: "Datacenter.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the datacenter", + }, + Key: "Datacenter.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the datacenter", + }, + Key: "Datacenter.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Datacenter.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query connection information", + Summary: "Gets information of a host that can be used in the connection wizard", + }, + Key: "Datacenter.queryConnectionInfo", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "queryConnectionInfoViaSpec", + Summary: "queryConnectionInfoViaSpec", + }, + Key: "Datacenter.queryConnectionInfoViaSpec", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Initialize powering On", + Summary: "Initialize tasks for powering on virtual machines", + }, + Key: "Datacenter.powerOnVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Query configuration option descriptor", + Summary: "Retrieve the list of configuration option keys available in this datacenter", + }, + Key: "Datacenter.queryConfigOptionDescriptor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure datacenter", + Summary: "Reconfigures the datacenter", + }, + Key: "Datacenter.reconfigure", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set folder custom value", + Summary: "Sets the value of a custom field of a folder", + }, + Key: "Folder.setCustomValue", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reload folder", + Summary: "Reloads the folder", + }, + Key: "Folder.reload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rename folder", + Summary: "Rename the folder", + }, + Key: "Folder.rename", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete folder", + Summary: "Delete this object, deleting its contents and removing it from its parent folder (if any)", + }, + Key: "Folder.destroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add tag", + Summary: "Add a set of tags to the folder", + }, + Key: "Folder.addTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove tag", + Summary: "Remove a set of tags from the folder", + }, + Key: "Folder.removeTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "retrieveCustomValues", + Summary: "retrieveCustomValues", + }, + Key: "Folder.retrieveCustomValues", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create folder", + Summary: "Creates a new folder", + }, + Key: "Folder.createFolder", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Move entities", + Summary: "Moves a set of managed entities into this folder", + }, + Key: "Folder.moveInto", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create virtual machine", + Summary: "Create a new virtual machine", + }, + Key: "Folder.createVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Register virtual machine", + Summary: "Adds an existing virtual machine to the folder", + }, + Key: "Folder.registerVm", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Create a new cluster compute-resource in this folder", + }, + Key: "Folder.createCluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create cluster", + Summary: "Create a new cluster compute-resource in this folder", + }, + Key: "Folder.createClusterEx", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host", + Summary: "Create a new single-host compute-resource", + }, + Key: "Folder.addStandaloneHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add standalone host and enable lockdown", + Summary: "Create a new single-host compute-resource and enable lockdown mode on the host", + }, + Key: "Folder.addStandaloneHostWithAdminDisabled", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create datacenter", + Summary: "Create a new datacenter with the given name", + }, + Key: "Folder.createDatacenter", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unregister and Delete", + Summary: "Recursively deletes all child virtual machine folders and unregisters all virtual machines", + }, + Key: "Folder.unregisterAndDestroy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a vSphere Distributed Switch", + Summary: "Create a vSphere Distributed Switch", + }, + Key: "Folder.createDistributedVirtualSwitch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create a datastore cluster", + Summary: "Create a datastore cluster", + }, + Key: "Folder.createStoragePod", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Get boot devices", + Summary: "Get available boot devices for the host system", + }, + Key: "host.BootDeviceSystem.queryBootDevices", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update boot device", + Summary: "Update the boot device on the host system", + }, + Key: "host.BootDeviceSystem.updateBootDevice", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configuring vSphere HA", + Summary: "Configuring vSphere HA", + }, + Key: "DasConfig.ConfigureHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unconfiguring vSphere HA", + Summary: "Unconfiguring vSphere HA", + }, + Key: "DasConfig.UnconfigureHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Migrate virtual machine", + Summary: "Migrates a virtual machine from one host to another", + }, + Key: "Drm.ExecuteVMotionLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power On virtual machine", + Summary: "Power on this virtual machine", + }, + Key: "Drm.ExecuteVmPowerOnLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter standby mode", + Summary: "Puts this host into standby mode", + }, + Key: "Drm.EnterStandbyLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Exit standby mode", + Summary: "Brings this host out of standby mode", + }, + Key: "Drm.ExitStandbyLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Power On virtual machine", + Summary: "Power On this virtual machine", + }, + Key: "Datacenter.ExecuteVmPowerOnLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vCenter Agent", + Summary: "Upgrade the vCenter Agent", + }, + Key: "Upgrade.UpgradeAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vCenter Agents on cluster hosts", + Summary: "Upgrade the vCenter Agents on all cluster hosts", + }, + Key: "ClusterUpgrade.UpgradeAgent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF template", + Summary: "Deploys a virtual machine or vApp", + }, + Key: "ResourcePool.ImportVAppLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set cluster suspended state", + Summary: "Set suspended state of the cluster", + }, + Key: "ClusterComputeResource.setSuspendedState", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the virtual machine as an OVF template", + }, + Key: "VirtualMachine.ExportVmLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF template", + Summary: "Exports the vApp as an OVF template", + }, + Key: "VirtualApp.ExportVAppLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Start Fault Tolerance Secondary VM", + Summary: "Start Secondary VM as the Primary VM is powered on", + }, + Key: "FaultTolerance.PowerOnSecondaryLRO", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Execute Storage vMotion for Storage DRS", + Summary: "Execute Storage vMotion migrations for Storage DRS", + }, + Key: "Drm.ExecuteStorageVmotionLro", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply recommendations for SDRS maintenance mode", + Summary: "Apply recommendations to enter into SDRS maintenance mode", + }, + Key: "Drm.ExecuteMaintenanceRecommendationsLro", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enter SDRS maintenance mode monitor task", + Summary: "Task that monitors the SDRS maintenance mode activity", + }, + Key: "Drm.TrackEnterMaintenanceLro", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "ResetSensor", + Summary: "ResetSensor", + }, + Key: "com.vmware.hardwarehealth.ResetSensor", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "ResetSelLog", + Summary: "ResetSelLog", + }, + Key: "com.vmware.hardwarehealth.ResetSelLog", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "RefreshHost", + Summary: "RefreshHost", + }, + Key: "com.vmware.hardwarehealth.RefreshHost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "install", + Summary: "install", + }, + Key: "eam.agent.install", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "uninstall", + Summary: "uninstall", + }, + Key: "eam.agent.uninstall", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "upgrade", + Summary: "upgrade", + }, + Key: "eam.agent.upgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Bulk Remediation", + Summary: "Remediating hosts in bulk", + }, + Key: "com.vmware.rbd.bulkRemediateMapping", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Rule", + Summary: "Creating rule in Auto Deploy server", + }, + Key: "com.vmware.rbd.CreateRuleWithTransform", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Apply Image Profile", + Summary: "Applying Image profile to a host", + }, + Key: "com.vmware.rbd.ApplyImageProfile", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Edit Rule", + Summary: "Editing Auto Deploy rule", + }, + Key: "com.vmware.rbd.UpdateSpecWithTransform", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Repair Cache", + Summary: "Repairing Deploy cache in Auto Deploy server", + }, + Key: "com.vmware.rbd.RepairDeployCache", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Bulk Compliance Check", + Summary: "Compliance checking hosts in bulk", + }, + Key: "com.vmware.rbd.bulkMappingComplianceCheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Mount an ISO Library Item as a Virtual CD-ROM", + Summary: "Mount", + }, + Key: "com.vmware.vcenter.iso.Image.Mount", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Unmount a Virtual CD-ROM mounted with ISO backing", + Summary: "Unmount", + }, + Key: "com.vmware.vcenter.iso.Image.Unmount", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import OVF package", + Summary: "Create", + }, + Key: "com.vmware.ovfs.ImportSession.Create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Export OVF package", + Summary: "Create", + }, + Key: "com.vmware.ovfs.ExportSession.Create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Deploy OVF package from Content Library to Resource Pool", + Summary: "instantiate", + }, + Key: "com.vmware.ovfs.LibraryItem.instantiate", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Clone to OVF package in Content Library from Virtual Machine or Virtual Appliance", + Summary: "capture", + }, + Key: "com.vmware.ovfs.LibraryItem.capture", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Parse OVF package in Content Library", + Summary: "parse", + }, + Key: "com.vmware.ovfs.LibraryItem.parse", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scrub Database after Restore", + Summary: "Scrub", + }, + Key: "com.vmware.content.Scrub", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Library", + Summary: "Create", + }, + Key: "com.vmware.content.Library.Create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Library", + Summary: "Update", + }, + Key: "com.vmware.content.Library.Update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete Library", + Summary: "Delete", + }, + Key: "com.vmware.content.Library.Delete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete Library Content", + Summary: "DeleteContent", + }, + Key: "com.vmware.content.Library.DeleteContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Sync Library", + Summary: "Sync", + }, + Key: "com.vmware.content.Library.Sync", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Validate Library Content against the Storage Backing After Restore", + Summary: "Scrub", + }, + Key: "com.vmware.content.Library.Scrub", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Library Item", + Summary: "Create", + }, + Key: "com.vmware.content.LibraryItem.Create", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Library Item", + Summary: "Update", + }, + Key: "com.vmware.content.LibraryItem.Update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update Library Item Backing", + Summary: "UpdateBackings", + }, + Key: "com.vmware.content.LibraryItem.UpdateBackings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete Library Item", + Summary: "Delete", + }, + Key: "com.vmware.content.LibraryItem.Delete", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Delete Library Item Content", + Summary: "DeleteContent", + }, + Key: "com.vmware.content.LibraryItem.DeleteContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "DeleteFileContent", + Summary: "DeleteFileContent", + }, + Key: "com.vmware.content.LibraryItem.DeleteFileContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upload Files to a Library Item", + Summary: "UploadContent", + }, + Key: "com.vmware.content.LibraryItem.UploadContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fetch Content of a Library Item", + Summary: "FetchContent", + }, + Key: "com.vmware.content.LibraryItem.FetchContent", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Copy Library Item", + Summary: "Copy", + }, + Key: "com.vmware.content.LibraryItem.Copy", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Sync Library Item", + Summary: "Sync", + }, + Key: "com.vmware.content.LibraryItem.Sync", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Waiting For Upload", + Summary: "WaitForUpload", + }, + Key: "com.vmware.content.LibraryItem.WaitForUpload", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Setting Library Item Tag", + Summary: "SetTag", + }, + Key: "com.vmware.content.LibraryItem.SetTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Removing Library Item Tag", + Summary: "RemoveTag", + }, + Key: "com.vmware.content.LibraryItem.RemoveTag", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install vSAN iSCSI target service", + Summary: "Install vSAN iSCSI target service", + }, + Key: "com.vmware.vsan.iscsi.tasks.installVibTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create Home Object and set vSAN iSCSI target service", + Summary: "Create Home Object and set vSAN iSCSI target service", + }, + Key: "com.vmware.vsan.iscsi.tasks.settingTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable vSAN iSCSI target service in cluster", + Summary: "Enable vSAN iSCSI target service in cluster", + }, + Key: "com.vmware.vsan.iscsi.tasks.enable", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Edit vSAN iSCSI target service in cluster", + Summary: "Edit vSAN iSCSI target service in cluster", + }, + Key: "com.vmware.vsan.iscsi.tasks.edit", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add a new iSCSI target", + Summary: "Add a new iSCSI target", + }, + Key: "com.vmware.vsan.iscsi.tasks.addTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Edit the iSCSI target", + Summary: "Edit the iSCSI target", + }, + Key: "com.vmware.vsan.iscsi.tasks.editTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove the iSCSI target", + Summary: "Remove the iSCSI target", + }, + Key: "com.vmware.vsan.iscsi.tasks.removeTarget", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add a new iSCSI LUN", + Summary: "Add a new iSCSI LUN", + }, + Key: "com.vmware.vsan.iscsi.tasks.addLUN", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Edit the iSCSI LUN", + Summary: "Edit the iSCSI LUN", + }, + Key: "com.vmware.vsan.iscsi.tasks.editLUN", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove the iSCSI LUN", + Summary: "Remove the iSCSI LUN", + }, + Key: "com.vmware.vsan.iscsi.tasks.removeLUN", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "VMDK Load Test", + Summary: "VMDK Load Test", + }, + Key: "com.vmware.vsan.health.tasks.runvmdkloadtest", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install vSAN health ESX extension", + Summary: "Install vSAN health ESX extension", + }, + Key: "com.vmware.vsan.health.tasks.health.preparecluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall vSAN health ESX extension", + Summary: "Uninstall vSAN health ESX extension", + }, + Key: "com.vmware.vsan.health.tasks.health.uninstallcluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Install vSAN sizing ESX extension", + Summary: "Install vSAN sizing ESX extension", + }, + Key: "com.vmware.vsan.health.tasks.sizing.preparecluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Uninstall vSAN sizing ESX extension", + Summary: "Uninstall vSAN sizing ESX extension", + }, + Key: "com.vmware.vsan.health.tasks.sizing.uninstallcluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "preparecluster", + Summary: "preparecluster", + }, + Key: "com.vmware.vsan.health.tasks.perfsvc.preparecluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "uninstallcluster", + Summary: "uninstallcluster", + }, + Key: "com.vmware.vsan.health.tasks.perfsvc.uninstallcluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Fix vSAN Cluster Object Immediately", + Summary: "Fix vSAN Cluster Object Immediately", + }, + Key: "com.vmware.vsan.health.tasks.repairclusterobjects", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Rebalance vSAN Cluster", + Summary: "Rebalance vSAN Cluster", + }, + Key: "com.vmware.vsan.health.tasks.rebalancecluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stop Rebalance vSAN Cluster", + Summary: "Stop Rebalance vSAN Cluster", + }, + Key: "com.vmware.vsan.health.tasks.stoprebalancecluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upgrade vSAN disk format", + Summary: "Upgrade vSAN disk format", + }, + Key: "com.vmware.vsan.health.tasks.upgrade", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach vSAN support bundle to SR", + Summary: "Attach vSAN support bundle to SR", + }, + Key: "com.vmware.vsan.health.tasks.attachtosr", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Attach vSAN support bundle to PR", + Summary: "Attach vSAN support bundle to PR", + }, + Key: "com.vmware.vsan.health.tasks.attachtopr", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download file from URL", + Summary: "Download file from URL", + }, + Key: "com.vmware.vsan.health.tasks.downloadfromurl", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Online check of vSAN health", + Summary: "Online check of vSAN health", + }, + Key: "com.vmware.vsan.health.tasks.performonlinehealthcheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remediate vSAN cluster", + Summary: "Remediate vSAN cluster", + }, + Key: "com.vmware.vsan.clustermgmt.tasks.remediatevsancluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remediate vSAN configurations", + Summary: "Remediate vSAN configurations", + }, + Key: "com.vmware.vsan.clustermgmt.tasks.remediatevc", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Enable vSAN performance service", + Summary: "Enable vSAN performance service", + }, + Key: "com.vmware.vsan.perfsvc.tasks.createstatsdb", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Disable vSAN performance service", + Summary: "Disable vSAN performance service", + }, + Key: "com.vmware.vsan.perfsvc.tasks.deletestatsdb", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Gathering data for performance diagnosis", + Summary: "Gathering data for performance diagnosis", + }, + Key: "com.vmware.vsan.perfsvc.tasks.runqueryfordiagnosis", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN: Update Software/Driver/Firmware", + Summary: "vSAN: Update Software/Driver/Firmware", + }, + Key: "com.vmware.vsan.patch.tasks.patch", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN: Migrate VSS to VDS", + Summary: "vSAN: Migrate VSS to VDS", + }, + Key: "com.vmware.vsan.vds.tasks.migratevss", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Create disk group on vSAN", + Summary: "Create disk group on vSAN", + }, + Key: "com.vmware.vsan.diskmgmt.tasks.initializediskmappings", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Add witness host", + Summary: "Add witness host to a stretched cluster", + }, + Key: "com.vmware.vsan.stretchedcluster.tasks.addwitnesshost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Replace witness host", + Summary: "Replace witness host for a stretched cluster", + }, + Key: "com.vmware.vsan.stretchedcluster.tasks.replacewitnesshost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remove witness host", + Summary: "Remove witness host from a stretched cluster", + }, + Key: "com.vmware.vsan.stretchedcluster.tasks.removewitnesshost", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert to a stretched cluster", + Summary: "Convert the given configuration to a stretched cluster", + }, + Key: "com.vmware.vsan.stretchedcluster.tasks.convert2stretchedcluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Set preferred fault domain", + Summary: "Set preferred fault domain for a stretched cluster", + }, + Key: "com.vmware.vsan.stretchedcluster.tasks.setpreferredfaultdomain", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Convert disk format for vSAN", + Summary: "Convert disk format for vSAN", + }, + Key: "com.vmware.vsan.diskconvertion.tasks.conversion", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Reconfigure vSAN cluster", + Summary: "Reconfigure vSAN cluster", + }, + Key: "com.vmware.vsan.clustermgmt.tasks.reconfigurecluster", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Regenerate new keys for encrypted vSAN cluster", + Summary: "Regenerate new keys for encrypted vSAN cluster", + }, + Key: "com.vmware.vsan.clustermgmt.tasks.rekey", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "vSAN operation precheck", + Summary: "vSAN operation precheck", + }, + Key: "com.vmware.vsan.clustermgmt.tasks.precheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Update vSAN configuration", + Summary: "Updates the vSAN configuration for this host", + }, + Key: "com.vmware.vsan.vsansystem.tasks.update", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scan vSAN Objects", + Summary: "Scan vSAN Objects for issues", + }, + Key: "com.vmware.vsan.diskmgmt.tasks.objectscan", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Perform Convert disk format precheck", + Summary: "Perform Convert disk format precheck for issues that could be encountered", + }, + Key: "com.vmware.vsan.diskconvertion.tasks.precheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Perform compliance resource check task", + Summary: "Perform compliance resource check task", + }, + Key: "com.vmware.vsan.prechecker.tasks.complianceresourcecheck", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Download patch definitions", + Summary: "Download patch definitions", + }, + Key: "com.vmware.vcIntegrity.SigUpdateTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Check new notifications", + Summary: "Check new notifications", + }, + Key: "com.vmware.vcIntegrity.CheckNotificationTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Scan entity", + Summary: "Scan an entity", + }, + Key: "com.vmware.vcIntegrity.ScanTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remediate entity", + Summary: "Remediate an entity", + }, + Key: "com.vmware.vcIntegrity.RemediateTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Stage patches to entity", + Summary: "Stage patches to an entity", + }, + Key: "com.vmware.vcIntegrity.StageTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Discover virtual appliance", + Summary: "Discover virtual appliance", + }, + Key: "com.vmware.vcIntegrity.VaDiscoveryTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Detect Update Manager Guest Agent", + Summary: "Detect Update Manager Guest Agent installation on Linux VMs", + }, + Key: "com.vmware.vcIntegrity.DetectLinuxGATask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel detecting Update Manager GuestAgent", + Summary: "Cancel detecting Update Manager GuestAgent installation on Linux VMs", + }, + Key: "com.vmware.vcIntegrity.CancelDetectLinuxGATask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel download of patch definitions", + Summary: "Cancel download of patch definitions", + }, + Key: "com.vmware.vcIntegrity.CancelSigUpdateTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel scanning entity", + Summary: "Cancel scanning an entity", + }, + Key: "com.vmware.vcIntegrity.CancelScanTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel remediating entity", + Summary: "Cancel remediating an entity", + }, + Key: "com.vmware.vcIntegrity.CancelRemediateTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel discovering virtual appliance", + Summary: "Cancel discovering a virtual appliance", + }, + Key: "com.vmware.vcIntegrity.CancelVaDiscoveryTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Configure VMware Tools upgrade setting", + Summary: "Configure VMware Tools upgrade setting", + }, + Key: "com.vmware.vcIntegrity.ConfigureToolsUpgradeTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Import ESXi image", + Summary: "Import ESXi image", + }, + Key: "com.vmware.vcIntegrity.ImportRelease", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Upload offline patches", + Summary: "Upload offline patches", + }, + Key: "com.vmware.vcIntegrity.DownloadOfflinePatchTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Confirm importing offline patches", + Summary: "Confirm importing offline host patches", + }, + Key: "com.vmware.vcIntegrity.ConfirmOfflinePatchTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Cancel importing offline patches", + Summary: "Cancel importing offline host patches", + }, + Key: "com.vmware.vcIntegrity.CancelOfflinePatchTask", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Remediation pre-check", + Summary: "Remediation pre-check", + }, + Key: "com.vmware.vcIntegrity.RemediatePrecheckTask", + }, + }, + State: []types.BaseElementDescription{ + &types.ElementDescription{ + Description: types.Description{ + Label: "Queued", + Summary: "Task is queued", + }, + Key: "queued", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Running", + Summary: "Task is in progress", + }, + Key: "running", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Success", + Summary: "Task completed successfully", + }, + Key: "success", + }, + &types.ElementDescription{ + Description: types.Description{ + Label: "Error", + Summary: "Task completed with a failure", + }, + Key: "error", + }, + }, + Reason: []types.BaseTypeDescription{ + &types.TypeDescription{ + Description: types.Description{ + Label: "Scheduled task", + Summary: "Task started by a scheduled task", + }, + Key: "TaskReasonSchedule", + }, + &types.TypeDescription{ + Description: types.Description{ + Label: "User task", + Summary: "Task started by a specific user", + }, + Key: "TaskReasonUser", + }, + &types.TypeDescription{ + Description: types.Description{ + Label: "System task", + Summary: "Task started by the server", + }, + Key: "TaskReasonSystem", + }, + &types.TypeDescription{ + Description: types.Description{ + Label: "Alarm task", + Summary: "Task started by an alarm", + }, + Key: "TaskReasonAlarm", + }, + }, +} diff --git a/vendor/github.com/vmware/govmomi/simulator/vstorage_object_manager.go b/vendor/github.com/vmware/govmomi/simulator/vstorage_object_manager.go new file mode 100644 index 0000000000..451dc043fd --- /dev/null +++ b/vendor/github.com/vmware/govmomi/simulator/vstorage_object_manager.go @@ -0,0 +1,473 @@ +/* +Copyright (c) 2018-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "log" + "net/url" + "os" + "path/filepath" + "strings" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" +) + +type VStorageObject struct { + types.VStorageObject + types.VStorageObjectSnapshotInfo +} + +type VcenterVStorageObjectManager struct { + mo.VcenterVStorageObjectManager + + objects map[types.ManagedObjectReference]map[types.ID]*VStorageObject +} + +func (m *VcenterVStorageObjectManager) init(*Registry) { + m.objects = make(map[types.ManagedObjectReference]map[types.ID]*VStorageObject) +} + +func (m *VcenterVStorageObjectManager) object(ds types.ManagedObjectReference, id types.ID) *VStorageObject { + if objects, ok := m.objects[ds]; ok { + return objects[id] + } + return nil +} + +func (m *VcenterVStorageObjectManager) ListVStorageObject(req *types.ListVStorageObject) soap.HasFault { + body := &methods.ListVStorageObjectBody{ + Res: &types.ListVStorageObjectResponse{}, + } + + if objects, ok := m.objects[req.Datastore]; ok { + for id := range objects { + body.Res.Returnval = append(body.Res.Returnval, id) + } + } + + return body +} + +func (m *VcenterVStorageObjectManager) RetrieveVStorageObject(ctx *Context, req *types.RetrieveVStorageObject) soap.HasFault { + body := new(methods.RetrieveVStorageObjectBody) + + obj := m.object(req.Datastore, req.Id) + if obj == nil { + body.Fault_ = Fault("", new(types.NotFound)) + } else { + stat := m.statDatastoreBacking(ctx, req.Datastore, &req.Id) + if err := stat[req.Id]; err != nil { + body.Fault_ = Fault(err.Error(), new(types.NotFound)) + return body + } + body.Res = &types.RetrieveVStorageObjectResponse{ + Returnval: obj.VStorageObject, + } + } + + return body +} + +// statDatastoreBacking checks if object(s) backing file exists on the given datastore ref. +func (m *VcenterVStorageObjectManager) statDatastoreBacking(ctx *Context, ref types.ManagedObjectReference, id *types.ID) map[types.ID]error { + objs := m.objects[ref] // default to checking all objects + if id != nil { + // check for a specific object + objs = map[types.ID]*VStorageObject{ + *id: objs[*id], + } + } + res := make(map[types.ID]error, len(objs)) + ds := ctx.Map.Get(ref).(*Datastore) + dc := ctx.Map.getEntityDatacenter(ds) + fm := ctx.Map.FileManager() + + for _, obj := range objs { + backing := obj.Config.Backing.(*types.BaseConfigInfoDiskFileBackingInfo) + file, _ := fm.resolve(&dc.Self, backing.FilePath) + _, res[obj.Config.Id] = os.Stat(file) + } + + return res +} + +func (m *VcenterVStorageObjectManager) ReconcileDatastoreInventoryTask(ctx *Context, req *types.ReconcileDatastoreInventory_Task) soap.HasFault { + task := CreateTask(m, "reconcileDatastoreInventory", func(*Task) (types.AnyType, types.BaseMethodFault) { + objs := m.objects[req.Datastore] + stat := m.statDatastoreBacking(ctx, req.Datastore, nil) + + for id, err := range stat { + if os.IsNotExist(err) { + log.Printf("removing disk %s from inventory: %s", id.Id, err) + delete(objs, id) + } + } + + return nil, nil + }) + + return &methods.ReconcileDatastoreInventory_TaskBody{ + Res: &types.ReconcileDatastoreInventory_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VcenterVStorageObjectManager) RegisterDisk(ctx *Context, req *types.RegisterDisk) soap.HasFault { + body := new(methods.RegisterDiskBody) + + invalid := func() soap.HasFault { + body.Fault_ = Fault("", &types.InvalidArgument{InvalidProperty: "path"}) + return body + } + + u, err := url.Parse(req.Path) + if err != nil { + return invalid() + } + u.Path = strings.TrimPrefix(u.Path, folderPrefix) + + ds, err := ctx.svc.findDatastore(u.Query()) + if err != nil { + return invalid() + } + + st, err := os.Stat(filepath.Join(ds.Info.GetDatastoreInfo().Url, u.Path)) + if err != nil { + return invalid() + + } + if st.IsDir() { + return invalid() + } + + path := (&object.DatastorePath{Datastore: ds.Name, Path: u.Path}).String() + + for _, obj := range m.objects[ds.Self] { + backing := obj.Config.Backing.(*types.BaseConfigInfoDiskFileBackingInfo) + if backing.FilePath == path { + return invalid() + } + } + + creq := &types.CreateDisk_Task{ + Spec: types.VslmCreateSpec{ + Name: req.Name, + BackingSpec: &types.VslmCreateSpecDiskFileBackingSpec{ + VslmCreateSpecBackingSpec: types.VslmCreateSpecBackingSpec{ + Datastore: ds.Self, + Path: u.Path, + }, + }, + }, + } + + obj, fault := m.createObject(creq, true) + if fault != nil { + body.Fault_ = Fault("", fault) + return body + } + + body.Res = &types.RegisterDiskResponse{ + Returnval: *obj, + } + + return body +} + +func (m *VcenterVStorageObjectManager) createObject(req *types.CreateDisk_Task, register bool) (*types.VStorageObject, types.BaseMethodFault) { + dir := "fcd" + ref := req.Spec.BackingSpec.GetVslmCreateSpecBackingSpec().Datastore + ds := Map.Get(ref).(*Datastore) + dc := Map.getEntityDatacenter(ds) + + objects, ok := m.objects[ds.Self] + if !ok { + objects = make(map[types.ID]*VStorageObject) + m.objects[ds.Self] = objects + _ = os.Mkdir(filepath.Join(ds.Info.GetDatastoreInfo().Url, dir), 0750) + } + + id := uuid.New().String() + obj := types.VStorageObject{ + Config: types.VStorageObjectConfigInfo{ + BaseConfigInfo: types.BaseConfigInfo{ + Id: types.ID{ + Id: id, + }, + Name: req.Spec.Name, + CreateTime: time.Now(), + KeepAfterDeleteVm: req.Spec.KeepAfterDeleteVm, + RelocationDisabled: types.NewBool(false), + NativeSnapshotSupported: types.NewBool(false), + ChangedBlockTrackingEnabled: types.NewBool(false), + Iofilter: nil, + }, + CapacityInMB: req.Spec.CapacityInMB, + ConsumptionType: []string{"disk"}, + ConsumerId: nil, + }, + } + + backing := req.Spec.BackingSpec.(*types.VslmCreateSpecDiskFileBackingSpec) + path := object.DatastorePath{ + Datastore: ds.Name, + Path: backing.Path, + } + if path.Path == "" { + path.Path = dir + "/" + id + ".vmdk" + } + + if !register { + err := vdmCreateVirtualDisk(types.VirtualDeviceConfigSpecFileOperationCreate, &types.CreateVirtualDisk_Task{ + Datacenter: &dc.Self, + Name: path.String(), + }) + if err != nil { + return nil, err + } + } + + obj.Config.Backing = &types.BaseConfigInfoDiskFileBackingInfo{ + BaseConfigInfoFileBackingInfo: types.BaseConfigInfoFileBackingInfo{ + BaseConfigInfoBackingInfo: types.BaseConfigInfoBackingInfo{ + Datastore: ds.Self, + }, + FilePath: path.String(), + BackingObjectId: uuid.New().String(), + Parent: nil, + DeltaSizeInMB: 0, + }, + ProvisioningType: backing.ProvisioningType, + } + + objects[obj.Config.Id] = &VStorageObject{VStorageObject: obj} + + return &obj, nil + +} + +func (m *VcenterVStorageObjectManager) CreateDiskTask(ctx *Context, req *types.CreateDisk_Task) soap.HasFault { + task := CreateTask(m, "createDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + return m.createObject(req, false) + }) + + return &methods.CreateDisk_TaskBody{ + Res: &types.CreateDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VcenterVStorageObjectManager) DeleteVStorageObjectTask(ctx *Context, req *types.DeleteVStorageObject_Task) soap.HasFault { + task := CreateTask(m, "deleteDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + obj := m.object(req.Datastore, req.Id) + if obj == nil { + return nil, &types.InvalidArgument{} + } + + if len(obj.Config.ConsumerId) != 0 { + return nil, &types.InvalidState{} + } + + backing := obj.Config.Backing.(*types.BaseConfigInfoDiskFileBackingInfo) + ds := ctx.Map.Get(req.Datastore).(*Datastore) + dc := ctx.Map.getEntityDatacenter(ds) + dm := ctx.Map.VirtualDiskManager() + dm.DeleteVirtualDiskTask(ctx, &types.DeleteVirtualDisk_Task{ + Name: backing.FilePath, + Datacenter: &dc.Self, + }) + + delete(m.objects[req.Datastore], req.Id) + + return nil, nil + }) + + return &methods.DeleteVStorageObject_TaskBody{ + Res: &types.DeleteVStorageObject_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VcenterVStorageObjectManager) RetrieveSnapshotInfo(req *types.RetrieveSnapshotInfo) soap.HasFault { + body := new(methods.RetrieveSnapshotInfoBody) + + obj := m.object(req.Datastore, req.Id) + if obj == nil { + body.Fault_ = Fault("", new(types.InvalidArgument)) + } else { + body.Res = &types.RetrieveSnapshotInfoResponse{ + Returnval: obj.VStorageObjectSnapshotInfo, + } + } + + return body +} + +func (m *VcenterVStorageObjectManager) VStorageObjectCreateSnapshotTask(ctx *Context, req *types.VStorageObjectCreateSnapshot_Task) soap.HasFault { + task := CreateTask(m, "createSnapshot", func(*Task) (types.AnyType, types.BaseMethodFault) { + obj := m.object(req.Datastore, req.Id) + if obj == nil { + return nil, new(types.InvalidArgument) + } + + snapshot := types.VStorageObjectSnapshotInfoVStorageObjectSnapshot{ + Id: &types.ID{ + Id: uuid.New().String(), + }, + BackingObjectId: uuid.New().String(), + CreateTime: time.Now(), + Description: req.Description, + } + obj.Snapshots = append(obj.Snapshots, snapshot) + + return snapshot.Id, nil + }) + + return &methods.VStorageObjectCreateSnapshot_TaskBody{ + Res: &types.VStorageObjectCreateSnapshot_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VcenterVStorageObjectManager) ExtendDiskTask(ctx *Context, req *types.ExtendDisk_Task) soap.HasFault { + task := CreateTask(m, "extendDisk", func(*Task) (types.AnyType, types.BaseMethodFault) { + obj := m.object(req.Datastore, req.Id) + if obj == nil { + return nil, new(types.InvalidArgument) + } + + obj.Config.CapacityInMB = req.NewCapacityInMB + return nil, nil + }) + return &methods.ExtendDisk_TaskBody{ + Res: &types.ExtendDisk_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VcenterVStorageObjectManager) DeleteSnapshotTask(ctx *Context, req *types.DeleteSnapshot_Task) soap.HasFault { + task := CreateTask(m, "deleteSnapshot", func(*Task) (types.AnyType, types.BaseMethodFault) { + obj := m.object(req.Datastore, req.Id) + if obj != nil { + for i := range obj.Snapshots { + if *obj.Snapshots[i].Id == req.SnapshotId { + obj.Snapshots = append(obj.Snapshots[:i], obj.Snapshots[i+1:]...) + return nil, nil + } + } + } + return nil, new(types.InvalidArgument) + }) + + return &methods.DeleteSnapshot_TaskBody{ + Res: &types.DeleteSnapshot_TaskResponse{ + Returnval: task.Run(ctx), + }, + } +} + +func (m *VcenterVStorageObjectManager) tagID(id types.ID) types.ManagedObjectReference { + return types.ManagedObjectReference{ + Type: "fcd", + Value: id.Id, + } +} + +func (m *VcenterVStorageObjectManager) AttachTagToVStorageObject(ctx *Context, req *types.AttachTagToVStorageObject) soap.HasFault { + body := new(methods.AttachTagToVStorageObjectBody) + ref := m.tagID(req.Id) + + err := ctx.Map.tagManager.AttachTag(ref, types.VslmTagEntry{ + ParentCategoryName: req.Category, + TagName: req.Tag, + }) + + if err == nil { + body.Res = new(types.AttachTagToVStorageObjectResponse) + } else { + body.Fault_ = Fault("", err) + } + + return body +} + +func (m *VcenterVStorageObjectManager) DetachTagFromVStorageObject(ctx *Context, req *types.DetachTagFromVStorageObject) soap.HasFault { + body := new(methods.DetachTagFromVStorageObjectBody) + ref := m.tagID(req.Id) + + err := ctx.Map.tagManager.DetachTag(ref, types.VslmTagEntry{ + ParentCategoryName: req.Category, + TagName: req.Tag, + }) + + if err == nil { + body.Res = new(types.DetachTagFromVStorageObjectResponse) + } else { + body.Fault_ = Fault("", err) + } + + return body +} + +func (m *VcenterVStorageObjectManager) ListVStorageObjectsAttachedToTag(ctx *Context, req *types.ListVStorageObjectsAttachedToTag) soap.HasFault { + body := new(methods.ListVStorageObjectsAttachedToTagBody) + + refs, err := ctx.Map.tagManager.AttachedObjects(types.VslmTagEntry{ + ParentCategoryName: req.Category, + TagName: req.Tag, + }) + + if err == nil { + body.Res = new(types.ListVStorageObjectsAttachedToTagResponse) + for _, ref := range refs { + body.Res.Returnval = append(body.Res.Returnval, types.ID{Id: ref.Value}) + } + } else { + body.Fault_ = Fault("", err) + } + + return body +} + +func (m *VcenterVStorageObjectManager) ListTagsAttachedToVStorageObject(ctx *Context, req *types.ListTagsAttachedToVStorageObject) soap.HasFault { + body := new(methods.ListTagsAttachedToVStorageObjectBody) + ref := m.tagID(req.Id) + + tags, err := ctx.Map.tagManager.AttachedTags(ref) + + if err == nil { + body.Res = &types.ListTagsAttachedToVStorageObjectResponse{ + Returnval: tags, + } + } else { + body.Fault_ = Fault("", err) + } + + return body +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/hgfs/archive.go b/vendor/github.com/vmware/govmomi/toolbox/hgfs/archive.go new file mode 100644 index 0000000000..6360743beb --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/hgfs/archive.go @@ -0,0 +1,341 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hgfs + +import ( + "archive/tar" + "bufio" + "bytes" + "compress/gzip" + "io" + "log" + "math" + "net/url" + "os" + "path/filepath" + "strings" + "sync" + "time" + + "github.com/vmware/govmomi/toolbox/vix" +) + +// ArchiveScheme is the default scheme used to register the archive FileHandler +var ArchiveScheme = "archive" + +// ArchiveHandler implements a FileHandler for transferring directories. +type ArchiveHandler struct { + Read func(*url.URL, *tar.Reader) error + Write func(*url.URL, *tar.Writer) error +} + +// NewArchiveHandler returns a FileHandler implementation for transferring directories using gzip'd tar files. +func NewArchiveHandler() FileHandler { + return &ArchiveHandler{ + Read: archiveRead, + Write: archiveWrite, + } +} + +// Stat implements FileHandler.Stat +func (*ArchiveHandler) Stat(u *url.URL) (os.FileInfo, error) { + switch u.Query().Get("format") { + case "", "tar", "tgz": + // ok + default: + log.Printf("unknown archive format: %q", u) + return nil, vix.Error(vix.InvalidArg) + } + + return &archive{ + name: u.Path, + size: math.MaxInt64, + }, nil +} + +// Open implements FileHandler.Open +func (h *ArchiveHandler) Open(u *url.URL, mode int32) (File, error) { + switch mode { + case OpenModeReadOnly: + return h.newArchiveFromGuest(u) + case OpenModeWriteOnly: + return h.newArchiveToGuest(u) + default: + return nil, os.ErrNotExist + } +} + +// archive implements the hgfs.File and os.FileInfo interfaces. +type archive struct { + name string + size int64 + done func() error + + io.Reader + io.Writer +} + +// Name implementation of the os.FileInfo interface method. +func (a *archive) Name() string { + return a.name +} + +// Size implementation of the os.FileInfo interface method. +func (a *archive) Size() int64 { + return a.size +} + +// Mode implementation of the os.FileInfo interface method. +func (a *archive) Mode() os.FileMode { + return 0600 +} + +// ModTime implementation of the os.FileInfo interface method. +func (a *archive) ModTime() time.Time { + return time.Now() +} + +// IsDir implementation of the os.FileInfo interface method. +func (a *archive) IsDir() bool { + return false +} + +// Sys implementation of the os.FileInfo interface method. +func (a *archive) Sys() interface{} { + return nil +} + +// The trailer is required since TransferFromGuest requires a Content-Length, +// which toolbox doesn't know ahead of time as the gzip'd tarball never touches the disk. +// HTTP clients need to be aware of this and stop reading when they see the 2nd gzip header. +var gzipHeader = []byte{0x1f, 0x8b, 0x08} // rfc1952 {ID1, ID2, CM} + +var gzipTrailer = true + +// newArchiveFromGuest returns an hgfs.File implementation to read a directory as a gzip'd tar. +func (h *ArchiveHandler) newArchiveFromGuest(u *url.URL) (File, error) { + r, w := io.Pipe() + + a := &archive{ + name: u.Path, + done: r.Close, + Reader: r, + Writer: w, + } + + var z io.Writer = w + var c io.Closer = io.NopCloser(nil) + + switch u.Query().Get("format") { + case "tgz": + gz := gzip.NewWriter(w) + z = gz + c = gz + } + + tw := tar.NewWriter(z) + + go func() { + err := h.Write(u, tw) + + _ = tw.Close() + _ = c.Close() + if gzipTrailer { + _, _ = w.Write(gzipHeader) + } + _ = w.CloseWithError(err) + }() + + return a, nil +} + +// newArchiveToGuest returns an hgfs.File implementation to expand a gzip'd tar into a directory. +func (h *ArchiveHandler) newArchiveToGuest(u *url.URL) (File, error) { + r, w := io.Pipe() + + buf := bufio.NewReader(r) + + a := &archive{ + name: u.Path, + Reader: buf, + Writer: w, + } + + var cerr error + var wg sync.WaitGroup + + a.done = func() error { + _ = w.Close() + // We need to wait for unpack to finish to complete its work + // and to propagate the error if any to Close. + wg.Wait() + return cerr + } + + wg.Add(1) + go func() { + defer wg.Done() + + c := func() error { + // Drain the pipe of tar trailer data (two null blocks) + if cerr == nil { + _, _ = io.Copy(io.Discard, a.Reader) + } + return nil + } + + header, _ := buf.Peek(len(gzipHeader)) + + if bytes.Equal(header, gzipHeader) { + gz, err := gzip.NewReader(a.Reader) + if err != nil { + _ = r.CloseWithError(err) + cerr = err + return + } + + c = gz.Close + a.Reader = gz + } + + tr := tar.NewReader(a.Reader) + + cerr = h.Read(u, tr) + + _ = c() + _ = r.CloseWithError(cerr) + }() + + return a, nil +} + +func (a *archive) Close() error { + return a.done() +} + +// archiveRead writes the contents of the given tar.Reader to the given directory. +func archiveRead(u *url.URL, tr *tar.Reader) error { + for { + header, err := tr.Next() + if err != nil { + if err == io.EOF { + return nil + } + return err + } + + name := filepath.Join(u.Path, header.Name) + mode := os.FileMode(header.Mode) + + switch header.Typeflag { + case tar.TypeDir: + err = os.MkdirAll(name, mode) + case tar.TypeReg: + _ = os.MkdirAll(filepath.Dir(name), 0750) + + var f *os.File + + f, err = os.OpenFile(name, os.O_CREATE|os.O_RDWR|os.O_TRUNC, mode) + if err == nil { + _, cerr := io.Copy(f, tr) + err = f.Close() + if cerr != nil { + err = cerr + } + } + case tar.TypeSymlink: + err = os.Symlink(header.Linkname, name) + } + + // TODO: Uid/Gid may not be meaningful here without some mapping. + // The other option to consider would be making use of the guest auth user ID. + // os.Lchown(name, header.Uid, header.Gid) + + if err != nil { + return err + } + } +} + +// archiveWrite writes the contents of the given source directory to the given tar.Writer. +func archiveWrite(u *url.URL, tw *tar.Writer) error { + info, err := os.Stat(u.Path) + if err != nil { + return err + } + + // Note that the VMX will trim any trailing slash. For example: + // "/foo/bar/?prefix=bar/" will end up here as "/foo/bar/?prefix=bar" + // Escape to avoid this: "/for/bar/?prefix=bar%2F" + prefix := u.Query().Get("prefix") + + dir := u.Path + + f := func(file string, fi os.FileInfo, err error) error { + if err != nil { + return filepath.SkipDir + } + + name := strings.TrimPrefix(file, dir) + name = strings.TrimPrefix(name, "/") + + if name == "" { + return nil // this is u.Path itself (which may or may not have a trailing "/") + } + + if prefix != "" { + name = prefix + name + } + + header, _ := tar.FileInfoHeader(fi, name) + + header.Name = name + + if header.Typeflag == tar.TypeDir { + header.Name += "/" + } + + var f *os.File + + if header.Typeflag == tar.TypeReg && fi.Size() != 0 { + f, err = os.Open(filepath.Clean(file)) + if err != nil { + if os.IsPermission(err) { + return nil + } + return err + } + } + + _ = tw.WriteHeader(header) + + if f != nil { + _, err = io.Copy(tw, f) + _ = f.Close() + } + + return err + } + + if info.IsDir() { + return filepath.Walk(u.Path, f) + } + + dir = filepath.Dir(dir) + + return f(u.Path, info, nil) +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/hgfs/encoding.go b/vendor/github.com/vmware/govmomi/toolbox/hgfs/encoding.go new file mode 100644 index 0000000000..24f71f6c19 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/hgfs/encoding.go @@ -0,0 +1,73 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hgfs + +import ( + "bytes" + "encoding" + "encoding/binary" +) + +// MarshalBinary is a wrapper around binary.Write +func MarshalBinary(fields ...interface{}) ([]byte, error) { + buf := new(bytes.Buffer) + + for _, p := range fields { + switch m := p.(type) { + case encoding.BinaryMarshaler: + data, err := m.MarshalBinary() + if err != nil { + return nil, ProtocolError(err) + } + + _, _ = buf.Write(data) + case []byte: + _, _ = buf.Write(m) + case string: + _, _ = buf.WriteString(m) + default: + err := binary.Write(buf, binary.LittleEndian, p) + if err != nil { + return nil, ProtocolError(err) + } + } + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary is a wrapper around binary.Read +func UnmarshalBinary(data []byte, fields ...interface{}) error { + buf := bytes.NewBuffer(data) + + for _, p := range fields { + switch m := p.(type) { + case encoding.BinaryUnmarshaler: + return m.UnmarshalBinary(buf.Bytes()) + case *[]byte: + *m = buf.Bytes() + return nil + default: + err := binary.Read(buf, binary.LittleEndian, p) + if err != nil { + return ProtocolError(err) + } + } + } + + return nil +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_linux.go b/vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_linux.go new file mode 100644 index 0000000000..16794ae5fe --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_linux.go @@ -0,0 +1,58 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hgfs + +import ( + "os" + "syscall" +) + +const attrMask = AttrValidAllocationSize | + AttrValidAccessTime | AttrValidWriteTime | AttrValidCreateTime | AttrValidChangeTime | + AttrValidSpecialPerms | AttrValidOwnerPerms | AttrValidGroupPerms | AttrValidOtherPerms | AttrValidEffectivePerms | + AttrValidUserID | AttrValidGroupID | AttrValidFileID | AttrValidVolID + +func (a *AttrV2) sysStat(info os.FileInfo) { + sys, ok := info.Sys().(*syscall.Stat_t) + + if !ok { + return + } + + a.AllocationSize = uint64(sys.Blocks * 512) + + nt := func(t syscall.Timespec) uint64 { + return uint64(t.Nano()) // TODO: this is supposed to be Windows NT system time, not needed atm + } + + a.AccessTime = nt(sys.Atim) + a.WriteTime = nt(sys.Mtim) + a.CreationTime = a.WriteTime // see HgfsGetCreationTime + a.AttrChangeTime = nt(sys.Ctim) + + a.SpecialPerms = uint8((sys.Mode & (syscall.S_ISUID | syscall.S_ISGID | syscall.S_ISVTX)) >> 9) + a.OwnerPerms = uint8((sys.Mode & syscall.S_IRWXU) >> 6) + a.GroupPerms = uint8((sys.Mode & syscall.S_IRWXG) >> 3) + a.OtherPerms = uint8(sys.Mode & syscall.S_IRWXO) + + a.UserID = sys.Uid + a.GroupID = sys.Gid + a.HostFileID = sys.Ino + a.VolumeID = uint32(sys.Dev) + + a.Mask |= attrMask +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_other.go b/vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_other.go new file mode 100644 index 0000000000..ba5d64af4f --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/hgfs/hgfs_other.go @@ -0,0 +1,27 @@ +//go:build !linux +// +build !linux + +/* +Copyright (c) 2017-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 hgfs + +import ( + "os" +) + +func (a *AttrV2) sysStat(info os.FileInfo) { +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/hgfs/protocol.go b/vendor/github.com/vmware/govmomi/toolbox/hgfs/protocol.go new file mode 100644 index 0000000000..a91a0269e6 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/hgfs/protocol.go @@ -0,0 +1,847 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hgfs + +import ( + "bytes" + "encoding/binary" + "fmt" + "log" + "os" + "strings" +) + +// See: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/lib/include/hgfsProto.h + +// Opcodes for server operations as defined in hgfsProto.h +const ( + OpOpen = iota /* Open file */ + OpRead /* Read from file */ + OpWrite /* Write to file */ + OpClose /* Close file */ + OpSearchOpen /* Start new search */ + OpSearchRead /* Get next search response */ + OpSearchClose /* End a search */ + OpGetattr /* Get file attributes */ + OpSetattr /* Set file attributes */ + OpCreateDir /* Create new directory */ + OpDeleteFile /* Delete a file */ + OpDeleteDir /* Delete a directory */ + OpRename /* Rename a file or directory */ + OpQueryVolumeInfo /* Query volume information */ + OpOpenV2 /* Open file */ + OpGetattrV2 /* Get file attributes */ + OpSetattrV2 /* Set file attributes */ + OpSearchReadV2 /* Get next search response */ + OpCreateSymlink /* Create a symlink */ + OpServerLockChange /* Change the oplock on a file */ + OpCreateDirV2 /* Create a directory */ + OpDeleteFileV2 /* Delete a file */ + OpDeleteDirV2 /* Delete a directory */ + OpRenameV2 /* Rename a file or directory */ + OpOpenV3 /* Open file */ + OpReadV3 /* Read from file */ + OpWriteV3 /* Write to file */ + OpCloseV3 /* Close file */ + OpSearchOpenV3 /* Start new search */ + OpSearchReadV3 /* Read V3 directory entries */ + OpSearchCloseV3 /* End a search */ + OpGetattrV3 /* Get file attributes */ + OpSetattrV3 /* Set file attributes */ + OpCreateDirV3 /* Create new directory */ + OpDeleteFileV3 /* Delete a file */ + OpDeleteDirV3 /* Delete a directory */ + OpRenameV3 /* Rename a file or directory */ + OpQueryVolumeInfoV3 /* Query volume information */ + OpCreateSymlinkV3 /* Create a symlink */ + OpServerLockChangeV3 /* Change the oplock on a file */ + OpWriteWin32StreamV3 /* Write WIN32_STREAM_ID format data to file */ + OpCreateSessionV4 /* Create a session and return host capabilities. */ + OpDestroySessionV4 /* Destroy/close session. */ + OpReadFastV4 /* Read */ + OpWriteFastV4 /* Write */ + OpSetWatchV4 /* Start monitoring directory changes. */ + OpRemoveWatchV4 /* Stop monitoring directory changes. */ + OpNotifyV4 /* Notification for a directory change event. */ + OpSearchReadV4 /* Read V4 directory entries. */ + OpOpenV4 /* Open file */ + OpEnumerateStreamsV4 /* Enumerate alternative named streams for a file. */ + OpGetattrV4 /* Get file attributes */ + OpSetattrV4 /* Set file attributes */ + OpDeleteV4 /* Delete a file or a directory */ + OpLinkmoveV4 /* Rename/move/create hard link. */ + OpFsctlV4 /* Sending FS control requests. */ + OpAccessCheckV4 /* Access check. */ + OpFsyncV4 /* Flush all cached data to the disk. */ + OpQueryVolumeInfoV4 /* Query volume information. */ + OpOplockAcquireV4 /* Acquire OPLOCK. */ + OpOplockBreakV4 /* Break or downgrade OPLOCK. */ + OpLockByteRangeV4 /* Acquire byte range lock. */ + OpUnlockByteRangeV4 /* Release byte range lock. */ + OpQueryEasV4 /* Query extended attributes. */ + OpSetEasV4 /* Add or modify extended attributes. */ + OpNewHeader = 0xff /* Header op, must be unique, distinguishes packet headers. */ +) + +// Status codes +const ( + StatusSuccess = iota + StatusNoSuchFileOrDir + StatusInvalidHandle + StatusOperationNotPermitted + StatusFileExists + StatusNotDirectory + StatusDirNotEmpty + StatusProtocolError + StatusAccessDenied + StatusInvalidName + StatusGenericError + StatusSharingViolation + StatusNoSpace + StatusOperationNotSupported + StatusNameTooLong + StatusInvalidParameter + StatusNotSameDevice + StatusStaleSession + StatusTooManySessions + StatusTransportError +) + +// Flags for attr mask +const ( + AttrValidType = 1 << iota + AttrValidSize + AttrValidCreateTime + AttrValidAccessTime + AttrValidWriteTime + AttrValidChangeTime + AttrValidSpecialPerms + AttrValidOwnerPerms + AttrValidGroupPerms + AttrValidOtherPerms + AttrValidFlags + AttrValidAllocationSize + AttrValidUserID + AttrValidGroupID + AttrValidFileID + AttrValidVolID + AttrValidNonStaticFileID + AttrValidEffectivePerms + AttrValidExtendAttrSize + AttrValidReparsePoint + AttrValidShortName +) + +// HeaderVersion for HGFS protocol version 4 +const HeaderVersion = 0x1 + +// LargePacketMax is maximum size of an hgfs packet +const LargePacketMax = 0xf800 // HGFS_LARGE_PACKET_MAX + +// Packet flags +const ( + PacketFlagRequest = 1 << iota + PacketFlagReply + PacketFlagInfoExterror + PacketFlagValidFlags = 0x7 +) + +// Status is an error type that encapsulates an error status code and the cause +type Status struct { + Err error + Code uint32 +} + +func (s *Status) Error() string { + if s.Err != nil { + return s.Err.Error() + } + + return fmt.Sprintf("hgfs.Status=%d", s.Code) +} + +// errorStatus maps the given error type to a status code +func errorStatus(err error) uint32 { + if x, ok := err.(*Status); ok { + return x.Code + } + + switch { + case os.IsNotExist(err): + return StatusNoSuchFileOrDir + case os.IsExist(err): + return StatusFileExists + case os.IsPermission(err): + return StatusOperationNotPermitted + } + + return StatusGenericError +} + +// ProtocolError wraps the given error as a Status type +func ProtocolError(err error) error { + return &Status{ + Err: err, + Code: StatusProtocolError, + } +} + +// Request as defined in hgfsProto.h:HgfsRequest +type Request struct { + Handle uint32 + Op int32 +} + +// Reply as defined in hgfsProto.h:HgfsReply +type Reply struct { + Handle uint32 + Status uint32 +} + +// Header as defined in hgfsProto.h:HgfsHeader +type Header struct { + Version uint8 + Reserved1 [3]uint8 + Dummy int32 + PacketSize uint32 + HeaderSize uint32 + RequestID uint32 + Op int32 + Status uint32 + Flags uint32 + Information uint32 + SessionID uint64 + Reserved uint64 +} + +var ( + headerSize = uint32(binary.Size(new(Header))) + + packetSize = func(r *Packet) uint32 { + return headerSize + uint32(len(r.Payload)) + } +) + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (h *Header) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, h) + if err != nil { + return fmt.Errorf("reading hgfs header: %s", err) + } + + if h.Dummy != OpNewHeader { + return fmt.Errorf("expected hgfs header with OpNewHeader (%#x), got: %#x", OpNewHeader, h.Dummy) + } + + return nil +} + +// Packet encapsulates an hgfs Header and Payload +type Packet struct { + Header + + Payload []byte +} + +// Reply composes a new Packet with the given payload or error +func (r *Packet) Reply(payload interface{}, err error) ([]byte, error) { + p := new(Packet) + + status := uint32(StatusSuccess) + + if err != nil { + status = errorStatus(err) + } else { + p.Payload, err = MarshalBinary(payload) + if err != nil { + return nil, err + } + } + + p.Header = Header{ + Version: HeaderVersion, + Dummy: OpNewHeader, + PacketSize: headerSize + uint32(len(p.Payload)), + HeaderSize: headerSize, + RequestID: r.RequestID, + Op: r.Op, + Status: status, + Flags: PacketFlagReply, + Information: 0, + SessionID: r.SessionID, + } + + if Trace { + rc := "OK" + if err != nil { + rc = err.Error() + } + fmt.Fprintf(os.Stderr, "[hgfs] response %#v [%s]\n", p.Header, rc) + } else if err != nil { + log.Printf("[hgfs] op=%d error: %s", r.Op, err) + } + + return p.MarshalBinary() +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *Packet) MarshalBinary() ([]byte, error) { + r.Header.PacketSize = packetSize(r) + + buf, _ := MarshalBinary(r.Header) + + return append(buf, r.Payload...), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *Packet) UnmarshalBinary(data []byte) error { + err := r.Header.UnmarshalBinary(data) + if err != nil { + return err + } + + r.Payload = data[r.HeaderSize:r.PacketSize] + + return nil +} + +// Capability as defined in hgfsProto.h:HgfsCapability +type Capability struct { + Op int32 + Flags uint32 +} + +// RequestCreateSessionV4 as defined in hgfsProto.h:HgfsRequestCreateSessionV4 +type RequestCreateSessionV4 struct { + NumCapabilities uint32 + MaxPacketSize uint32 + Flags uint32 + Reserved uint32 + Capabilities []Capability +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RequestCreateSessionV4) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + r.NumCapabilities = uint32(len(r.Capabilities)) + + fields := []*uint32{ + &r.NumCapabilities, + &r.MaxPacketSize, + &r.Flags, + &r.Reserved, + } + + for _, p := range fields { + err := binary.Write(buf, binary.LittleEndian, p) + if err != nil { + return nil, err + } + } + + for i := uint32(0); i < r.NumCapabilities; i++ { + err := binary.Write(buf, binary.LittleEndian, &r.Capabilities[i]) + if err != nil { + return nil, err + } + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RequestCreateSessionV4) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + fields := []*uint32{ + &r.NumCapabilities, + &r.MaxPacketSize, + &r.Flags, + &r.Reserved, + } + + for _, p := range fields { + err := binary.Read(buf, binary.LittleEndian, p) + if err != nil { + return err + } + } + + for i := uint32(0); i < r.NumCapabilities; i++ { + var cap Capability + err := binary.Read(buf, binary.LittleEndian, &cap) + if err != nil { + return err + } + + r.Capabilities = append(r.Capabilities, cap) + } + + return nil +} + +// ReplyCreateSessionV4 as defined in hgfsProto.h:HgfsReplyCreateSessionV4 +type ReplyCreateSessionV4 struct { + SessionID uint64 + NumCapabilities uint32 + MaxPacketSize uint32 + IdentityOffset uint32 + Flags uint32 + Reserved uint32 + Capabilities []Capability +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *ReplyCreateSessionV4) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + fields := []interface{}{ + &r.SessionID, + &r.NumCapabilities, + &r.MaxPacketSize, + &r.IdentityOffset, + &r.Flags, + &r.Reserved, + } + + for _, p := range fields { + err := binary.Write(buf, binary.LittleEndian, p) + if err != nil { + return nil, err + } + } + + for i := uint32(0); i < r.NumCapabilities; i++ { + err := binary.Write(buf, binary.LittleEndian, &r.Capabilities[i]) + if err != nil { + return nil, err + } + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *ReplyCreateSessionV4) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + fields := []interface{}{ + &r.SessionID, + &r.NumCapabilities, + &r.MaxPacketSize, + &r.IdentityOffset, + &r.Flags, + &r.Reserved, + } + + for _, p := range fields { + err := binary.Read(buf, binary.LittleEndian, p) + if err != nil { + return err + } + } + + for i := uint32(0); i < r.NumCapabilities; i++ { + var cap Capability + err := binary.Read(buf, binary.LittleEndian, &cap) + if err != nil { + return err + } + + r.Capabilities = append(r.Capabilities, cap) + } + + return nil +} + +// RequestDestroySessionV4 as defined in hgfsProto.h:HgfsRequestDestroySessionV4 +type RequestDestroySessionV4 struct { + Reserved uint64 +} + +// ReplyDestroySessionV4 as defined in hgfsProto.h:HgfsReplyDestroySessionV4 +type ReplyDestroySessionV4 struct { + Reserved uint64 +} + +// FileName as defined in hgfsProto.h:HgfsFileName +type FileName struct { + Length uint32 + Name string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (f *FileName) MarshalBinary() ([]byte, error) { + name := f.Name + f.Length = uint32(len(f.Name)) + if f.Length == 0 { + // field is defined as 'char name[1];', this byte is required for min sizeof() validation + name = "\x00" + } + return MarshalBinary(&f.Length, name) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (f *FileName) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + _ = binary.Read(buf, binary.LittleEndian, &f.Length) + + f.Name = string(buf.Next(int(f.Length))) + + return nil +} + +const serverPolicyRootShareName = "root" + +// FromString converts name to a FileName +func (f *FileName) FromString(name string) { + name = strings.TrimPrefix(name, "/") + + cp := strings.Split(name, "/") + + cp = append([]string{serverPolicyRootShareName}, cp...) + + f.Name = strings.Join(cp, "\x00") + f.Length = uint32(len(f.Name)) +} + +// Path converts FileName to a string +func (f *FileName) Path() string { + cp := strings.Split(f.Name, "\x00") + + if len(cp) == 0 || cp[0] != serverPolicyRootShareName { + return "" // TODO: not happening until if/when we handle Windows shares + } + + cp[0] = "" + + return strings.Join(cp, "/") +} + +// FileNameV3 as defined in hgfsProto.h:HgfsFileNameV3 +type FileNameV3 struct { + Length uint32 + Flags uint32 + CaseType int32 + ID uint32 + Name string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (f *FileNameV3) MarshalBinary() ([]byte, error) { + name := f.Name + f.Length = uint32(len(f.Name)) + if f.Length == 0 { + // field is defined as 'char name[1];', this byte is required for min sizeof() validation + name = "\x00" + } + return MarshalBinary(&f.Length, &f.Flags, &f.CaseType, &f.ID, name) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (f *FileNameV3) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + fields := []interface{}{ + &f.Length, &f.Flags, &f.CaseType, &f.ID, + } + + for _, p := range fields { + if err := binary.Read(buf, binary.LittleEndian, p); err != nil { + return err + } + } + + f.Name = string(buf.Next(int(f.Length))) + + return nil +} + +// FromString converts name to a FileNameV3 +func (f *FileNameV3) FromString(name string) { + p := new(FileName) + p.FromString(name) + f.Name = p.Name + f.Length = p.Length +} + +// Path converts FileNameV3 to a string +func (f *FileNameV3) Path() string { + return (&FileName{Name: f.Name, Length: f.Length}).Path() +} + +// FileType +const ( + FileTypeRegular = iota + FileTypeDirectory + FileTypeSymlink +) + +// AttrV2 as defined in hgfsProto.h:HgfsAttrV2 +type AttrV2 struct { + Mask uint64 + Type int32 + Size uint64 + CreationTime uint64 + AccessTime uint64 + WriteTime uint64 + AttrChangeTime uint64 + SpecialPerms uint8 + OwnerPerms uint8 + GroupPerms uint8 + OtherPerms uint8 + AttrFlags uint64 + AllocationSize uint64 + UserID uint32 + GroupID uint32 + HostFileID uint64 + VolumeID uint32 + EffectivePerms uint32 + Reserved2 uint64 +} + +// RequestGetattrV2 as defined in hgfsProto.h:HgfsRequestGetattrV2 +type RequestGetattrV2 struct { + Request + AttrHint uint64 + Handle uint32 + FileName FileName +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RequestGetattrV2) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.Request, &r.AttrHint, &r.Handle, &r.FileName) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RequestGetattrV2) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.Request, &r.AttrHint, &r.Handle, &r.FileName) +} + +// ReplyGetattrV2 as defined in hgfsProto.h:HgfsReplyGetattrV2 +type ReplyGetattrV2 struct { + Reply + Attr AttrV2 + SymlinkTarget FileName +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *ReplyGetattrV2) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.Reply, &r.Attr, &r.SymlinkTarget) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *ReplyGetattrV2) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.Reply, &r.Attr, &r.SymlinkTarget) +} + +// RequestSetattrV2 as defined in hgfsProto.h:HgfsRequestSetattrV2 +type RequestSetattrV2 struct { + Request + Hints uint64 + Attr AttrV2 + Handle uint32 + FileName FileName +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RequestSetattrV2) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.Request, &r.Hints, &r.Attr, &r.Handle, &r.FileName) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RequestSetattrV2) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.Request, &r.Hints, &r.Attr, &r.Handle, &r.FileName) +} + +// ReplySetattrV2 as defined in hgfsProto.h:HgfsReplySetattrV2 +type ReplySetattrV2 struct { + Header Reply +} + +// OpenMode +const ( + OpenModeReadOnly = iota + OpenModeWriteOnly + OpenModeReadWrite + OpenModeAccmodes +) + +// OpenFlags +const ( + Open = iota + OpenEmpty + OpenCreate + OpenCreateSafe + OpenCreateEmpty +) + +// Permissions +const ( + PermRead = 4 + PermWrite = 2 + PermExec = 1 +) + +// RequestOpen as defined in hgfsProto.h:HgfsRequestOpen +type RequestOpen struct { + Request + OpenMode int32 + OpenFlags int32 + Permissions uint8 + FileName FileName +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RequestOpen) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.Request, &r.OpenMode, &r.OpenFlags, r.Permissions, &r.FileName) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RequestOpen) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.Request, &r.OpenMode, &r.OpenFlags, &r.Permissions, &r.FileName) +} + +// ReplyOpen as defined in hgfsProto.h:HgfsReplyOpen +type ReplyOpen struct { + Reply + Handle uint32 +} + +// RequestClose as defined in hgfsProto.h:HgfsRequestClose +type RequestClose struct { + Request + Handle uint32 +} + +// ReplyClose as defined in hgfsProto.h:HgfsReplyClose +type ReplyClose struct { + Reply +} + +// Lock type +const ( + LockNone = iota + LockOpportunistic + LockExclusive + LockShared + LockBatch + LockLease +) + +// RequestOpenV3 as defined in hgfsProto.h:HgfsRequestOpenV3 +type RequestOpenV3 struct { + Mask uint64 + OpenMode int32 + OpenFlags int32 + SpecialPerms uint8 + OwnerPerms uint8 + GroupPerms uint8 + OtherPerms uint8 + AttrFlags uint64 + AllocationSize uint64 + DesiredAccess uint32 + ShareAccess uint32 + DesiredLock int32 + Reserved1 uint64 + Reserved2 uint64 + FileName FileNameV3 +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RequestOpenV3) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.Mask, &r.OpenMode, &r.OpenFlags, + &r.SpecialPerms, &r.OwnerPerms, &r.GroupPerms, &r.OtherPerms, + &r.AttrFlags, &r.AllocationSize, &r.DesiredAccess, &r.ShareAccess, + &r.DesiredLock, &r.Reserved1, &r.Reserved2, &r.FileName) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RequestOpenV3) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.Mask, &r.OpenMode, &r.OpenFlags, + &r.SpecialPerms, &r.OwnerPerms, &r.GroupPerms, &r.OtherPerms, + &r.AttrFlags, &r.AllocationSize, &r.DesiredAccess, &r.ShareAccess, + &r.DesiredLock, &r.Reserved1, &r.Reserved2, &r.FileName) +} + +// ReplyOpenV3 as defined in hgfsProto.h:HgfsReplyOpenV3 +type ReplyOpenV3 struct { + Handle uint32 + AcquiredLock int32 + Flags int32 + Reserved uint32 +} + +// RequestReadV3 as defined in hgfsProto.h:HgfsRequestReadV3 +type RequestReadV3 struct { + Handle uint32 + Offset uint64 + RequiredSize uint32 + Reserved uint64 +} + +// ReplyReadV3 as defined in hgfsProto.h:HgfsReplyReadV3 +type ReplyReadV3 struct { + ActualSize uint32 + Reserved uint64 + Payload []byte +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *ReplyReadV3) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.ActualSize, &r.Reserved, r.Payload) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *ReplyReadV3) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.ActualSize, &r.Reserved, &r.Payload) +} + +// Write flags +const ( + WriteAppend = 1 +) + +// RequestWriteV3 as defined in hgfsProto.h:HgfsRequestWriteV3 +type RequestWriteV3 struct { + Handle uint32 + WriteFlags uint8 + Offset uint64 + RequiredSize uint32 + Reserved uint64 + Payload []byte +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RequestWriteV3) MarshalBinary() ([]byte, error) { + return MarshalBinary(&r.Handle, &r.WriteFlags, &r.Offset, &r.RequiredSize, &r.Reserved, r.Payload) +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RequestWriteV3) UnmarshalBinary(data []byte) error { + return UnmarshalBinary(data, &r.Handle, &r.WriteFlags, &r.Offset, &r.RequiredSize, &r.Reserved, &r.Payload) +} + +// ReplyWriteV3 as defined in hgfsProto.h:HgfsReplyWriteV3 +type ReplyWriteV3 struct { + ActualSize uint32 + Reserved uint64 +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/hgfs/server.go b/vendor/github.com/vmware/govmomi/toolbox/hgfs/server.go new file mode 100644 index 0000000000..1c887e9748 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/hgfs/server.go @@ -0,0 +1,585 @@ +/* +Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hgfs + +import ( + "errors" + "flag" + "fmt" + "io" + "log" + "math/rand" + "net/url" + "os" + "path/filepath" + "strconv" + "strings" + "sync" + "sync/atomic" +) + +// See: https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/lib/hgfsServer/hgfsServer.c + +var ( + // Trace enables hgfs packet tracing + Trace = false +) + +// Server provides an HGFS protocol implementation to support guest tools VmxiHgfsSendPacketCommand +type Server struct { + Capabilities []Capability + + handlers map[int32]func(*Packet) (interface{}, error) + schemes map[string]FileHandler + sessions map[uint64]*session + mu sync.Mutex + handle uint32 + + chmod func(string, os.FileMode) error + chown func(string, int, int) error +} + +// NewServer creates a new Server instance with the default handlers +func NewServer() *Server { + if f := flag.Lookup("toolbox.trace"); f != nil { + Trace, _ = strconv.ParseBool(f.Value.String()) + } + + s := &Server{ + sessions: make(map[uint64]*session), + schemes: make(map[string]FileHandler), + chmod: os.Chmod, + chown: os.Chown, + } + + s.handlers = map[int32]func(*Packet) (interface{}, error){ + OpCreateSessionV4: s.CreateSessionV4, + OpDestroySessionV4: s.DestroySessionV4, + OpGetattrV2: s.GetattrV2, + OpSetattrV2: s.SetattrV2, + OpOpen: s.Open, + OpClose: s.Close, + OpOpenV3: s.OpenV3, + OpReadV3: s.ReadV3, + OpWriteV3: s.WriteV3, + } + + for op := range s.handlers { + s.Capabilities = append(s.Capabilities, Capability{Op: op, Flags: 0x1}) + } + + return s +} + +// RegisterFileHandler enables dispatch to handler for the given scheme. +func (s *Server) RegisterFileHandler(scheme string, handler FileHandler) { + if handler == nil { + delete(s.schemes, scheme) + return + } + s.schemes[scheme] = handler +} + +// Dispatch unpacks the given request packet and dispatches to the appropriate handler +func (s *Server) Dispatch(packet []byte) ([]byte, error) { + req := &Packet{} + + err := req.UnmarshalBinary(packet) + if err != nil { + return nil, err + } + + if Trace { + fmt.Fprintf(os.Stderr, "[hgfs] request %#v\n", req.Header) + } + + var res interface{} + + handler, ok := s.handlers[req.Op] + if ok { + res, err = handler(req) + } else { + err = &Status{ + Code: StatusOperationNotSupported, + Err: fmt.Errorf("unsupported Op(%d)", req.Op), + } + } + + return req.Reply(res, err) +} + +// File interface abstracts standard i/o methods to support transfer +// of regular files and archives of directories. +type File interface { + io.Reader + io.Writer + io.Closer + + Name() string +} + +// FileHandler is the plugin interface for hgfs file transport. +type FileHandler interface { + Stat(*url.URL) (os.FileInfo, error) + Open(*url.URL, int32) (File, error) +} + +// urlParse attempts to convert the given name to a URL with scheme for use as FileHandler dispatch. +func urlParse(name string) *url.URL { + var info os.FileInfo + + u, err := url.Parse(name) + if err == nil && u.Scheme == "" { + info, err = os.Stat(u.Path) + if err == nil && info.IsDir() { + u.Scheme = ArchiveScheme // special case for IsDir() + return u + } + } + + u, err = url.Parse(strings.TrimPrefix(name, "/")) // must appear to be an absolute path or hgfs errors + if err != nil { + u = &url.URL{Path: name} + } + + if u.Scheme == "" { + ix := strings.Index(u.Path, "/") + if ix > 0 { + u.Scheme = u.Path[:ix] + u.Path = u.Path[ix:] + } + } + + return u +} + +// OpenFile selects the File implementation based on file type and mode. +func (s *Server) OpenFile(name string, mode int32) (File, error) { + u := urlParse(name) + + if h, ok := s.schemes[u.Scheme]; ok { + f, serr := h.Open(u, mode) + if serr != os.ErrNotExist { + return f, serr + } + } + + switch mode { + case OpenModeReadOnly: + return os.Open(filepath.Clean(name)) + case OpenModeWriteOnly: + flag := os.O_WRONLY | os.O_CREATE | os.O_TRUNC + return os.OpenFile(name, flag, 0600) + default: + return nil, &Status{ + Err: fmt.Errorf("open mode(%d) not supported for file %q", mode, name), + Code: StatusAccessDenied, + } + } +} + +// Stat wraps os.Stat such that we can report directory types as regular files to support archive streaming. +// In the case of standard vmware-tools, attempts to transfer directories result +// with a VIX_E_NOT_A_FILE (see InitiateFileTransfer{To,From}Guest). +// Note that callers on the VMX side that reach this path are only concerned with: +// - does the file exist? +// - size: +// + used for UI progress with desktop Drag-N-Drop operations, which toolbox does not support. +// + sent to as Content-Length header in response to GET of FileTransferInformation.Url, +// if the first ReadV3 size is > HGFS_LARGE_PACKET_MAX +func (s *Server) Stat(name string) (os.FileInfo, error) { + u := urlParse(name) + + if h, ok := s.schemes[u.Scheme]; ok { + sinfo, serr := h.Stat(u) + if serr != os.ErrNotExist { + return sinfo, serr + } + } + + return os.Stat(name) +} + +type session struct { + files map[uint32]File + mu sync.Mutex +} + +// TODO: we currently depend on the VMX to close files and remove sessions, +// which it does provided it can communicate with the toolbox. Let's look at +// adding session expiration when implementing OpenModeWriteOnly support. +func newSession() *session { + return &session{ + files: make(map[uint32]File), + } +} + +func (s *Server) getSession(p *Packet) (*session, error) { + s.mu.Lock() + session, ok := s.sessions[p.SessionID] + s.mu.Unlock() + + if !ok { + return nil, &Status{ + Code: StatusStaleSession, + Err: errors.New("session not found"), + } + } + + return session, nil +} + +func (s *Server) removeSession(id uint64) bool { + s.mu.Lock() + session, ok := s.sessions[id] + delete(s.sessions, id) + s.mu.Unlock() + + if !ok { + return false + } + + session.mu.Lock() + defer session.mu.Unlock() + + for _, f := range session.files { + log.Printf("[hgfs] session %X removed with open file: %s", id, f.Name()) + _ = f.Close() + } + + return true +} + +// open-vm-tools' session max is 1024, there shouldn't be more than a handful at a given time in our use cases +const maxSessions = 24 + +// CreateSessionV4 handls OpCreateSessionV4 requests +func (s *Server) CreateSessionV4(p *Packet) (interface{}, error) { + const SessionMaxPacketSizeValid = 0x1 + + req := new(RequestCreateSessionV4) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + res := &ReplyCreateSessionV4{ + SessionID: uint64(rand.Int63()), + NumCapabilities: uint32(len(s.Capabilities)), + MaxPacketSize: LargePacketMax, + Flags: SessionMaxPacketSizeValid, + Capabilities: s.Capabilities, + } + + s.mu.Lock() + defer s.mu.Unlock() + if len(s.sessions) > maxSessions { + return nil, &Status{Code: StatusTooManySessions} + } + + s.sessions[res.SessionID] = newSession() + + return res, nil +} + +// DestroySessionV4 handls OpDestroySessionV4 requests +func (s *Server) DestroySessionV4(p *Packet) (interface{}, error) { + if s.removeSession(p.SessionID) { + return &ReplyDestroySessionV4{}, nil + } + + return nil, &Status{Code: StatusStaleSession} +} + +// Stat maps os.FileInfo to AttrV2 +func (a *AttrV2) Stat(info os.FileInfo) { + switch { + case info.IsDir(): + a.Type = FileTypeDirectory + case info.Mode()&os.ModeSymlink == os.ModeSymlink: + a.Type = FileTypeSymlink + default: + a.Type = FileTypeRegular + } + + a.Size = uint64(info.Size()) + + a.Mask = AttrValidType | AttrValidSize + + a.sysStat(info) +} + +// GetattrV2 handles OpGetattrV2 requests +func (s *Server) GetattrV2(p *Packet) (interface{}, error) { + res := &ReplyGetattrV2{} + + req := new(RequestGetattrV2) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + name := req.FileName.Path() + info, err := s.Stat(name) + if err != nil { + return nil, err + } + + res.Attr.Stat(info) + + return res, nil +} + +// SetattrV2 handles OpSetattrV2 requests +func (s *Server) SetattrV2(p *Packet) (interface{}, error) { + res := &ReplySetattrV2{} + + req := new(RequestSetattrV2) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + name := req.FileName.Path() + + _, err = os.Stat(name) + if err != nil && os.IsNotExist(err) { + // assuming this is a virtual file + return res, nil + } + + uid := -1 + if req.Attr.Mask&AttrValidUserID == AttrValidUserID { + uid = int(req.Attr.UserID) + } + + gid := -1 + if req.Attr.Mask&AttrValidGroupID == AttrValidGroupID { + gid = int(req.Attr.GroupID) + } + + err = s.chown(name, uid, gid) + if err != nil { + return nil, err + } + + var perm os.FileMode + + if req.Attr.Mask&AttrValidOwnerPerms == AttrValidOwnerPerms { + perm |= os.FileMode(req.Attr.OwnerPerms) << 6 + } + + if req.Attr.Mask&AttrValidGroupPerms == AttrValidGroupPerms { + perm |= os.FileMode(req.Attr.GroupPerms) << 3 + } + + if req.Attr.Mask&AttrValidOtherPerms == AttrValidOtherPerms { + perm |= os.FileMode(req.Attr.OtherPerms) + } + + if perm != 0 { + err = s.chmod(name, perm) + if err != nil { + return nil, err + } + } + + return res, nil +} + +func (s *Server) newHandle() uint32 { + return atomic.AddUint32(&s.handle, 1) +} + +// Open handles OpOpen requests +func (s *Server) Open(p *Packet) (interface{}, error) { + req := new(RequestOpen) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + session, err := s.getSession(p) + if err != nil { + return nil, err + } + + name := req.FileName.Path() + mode := req.OpenMode + + if mode != OpenModeReadOnly { + return nil, &Status{ + Err: fmt.Errorf("open mode(%d) not supported for file %q", mode, name), + Code: StatusAccessDenied, + } + } + + file, err := s.OpenFile(name, mode) + if err != nil { + return nil, err + } + + res := &ReplyOpen{ + Handle: s.newHandle(), + } + + session.mu.Lock() + session.files[res.Handle] = file + session.mu.Unlock() + + return res, nil +} + +// Close handles OpClose requests +func (s *Server) Close(p *Packet) (interface{}, error) { + req := new(RequestClose) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + session, err := s.getSession(p) + if err != nil { + return nil, err + } + + session.mu.Lock() + file, ok := session.files[req.Handle] + if ok { + delete(session.files, req.Handle) + } + session.mu.Unlock() + + if ok { + err = file.Close() + } else { + return nil, &Status{Code: StatusInvalidHandle} + } + + return &ReplyClose{}, err +} + +// OpenV3 handles OpOpenV3 requests +func (s *Server) OpenV3(p *Packet) (interface{}, error) { + req := new(RequestOpenV3) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + session, err := s.getSession(p) + if err != nil { + return nil, err + } + + name := req.FileName.Path() + + if req.DesiredLock != LockNone { + return nil, &Status{ + Err: fmt.Errorf("open lock type=%d not supported for file %q", req.DesiredLock, name), + Code: StatusOperationNotSupported, + } + } + + file, err := s.OpenFile(name, req.OpenMode) + if err != nil { + return nil, err + } + + res := &ReplyOpenV3{ + Handle: s.newHandle(), + } + + session.mu.Lock() + session.files[res.Handle] = file + session.mu.Unlock() + + return res, nil +} + +// ReadV3 handles OpReadV3 requests +func (s *Server) ReadV3(p *Packet) (interface{}, error) { + req := new(RequestReadV3) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + session, err := s.getSession(p) + if err != nil { + return nil, err + } + + session.mu.Lock() + file, ok := session.files[req.Handle] + session.mu.Unlock() + + if !ok { + return nil, &Status{Code: StatusInvalidHandle} + } + + buf := make([]byte, req.RequiredSize) + + // Use ReadFull as Read() of an archive io.Pipe may return much smaller chunks, + // such as when we've read a tar header. + n, err := io.ReadFull(file, buf) + if err != nil && n == 0 { + if err != io.EOF { + return nil, err + } + } + + res := &ReplyReadV3{ + ActualSize: uint32(n), + Payload: buf[:n], + } + + return res, nil +} + +// WriteV3 handles OpWriteV3 requests +func (s *Server) WriteV3(p *Packet) (interface{}, error) { + req := new(RequestWriteV3) + err := UnmarshalBinary(p.Payload, req) + if err != nil { + return nil, err + } + + session, err := s.getSession(p) + if err != nil { + return nil, err + } + + session.mu.Lock() + file, ok := session.files[req.Handle] + session.mu.Unlock() + + if !ok { + return nil, &Status{Code: StatusInvalidHandle} + } + + n, err := file.Write(req.Payload) + if err != nil { + return nil, err + } + + res := &ReplyWriteV3{ + ActualSize: uint32(n), + } + + return res, nil +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/process/process.go b/vendor/github.com/vmware/govmomi/toolbox/process/process.go new file mode 100644 index 0000000000..8b9cc15d2d --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/process/process.go @@ -0,0 +1,640 @@ +/* +Copyright (c) 2017-2021 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package process + +import ( + "bytes" + "context" + "fmt" + "io" + "net" + "net/url" + "os" + "os/exec" + "path" + "path/filepath" + "strconv" + "strings" + "sync" + "sync/atomic" + "syscall" + "time" + + "github.com/vmware/govmomi/toolbox/hgfs" + "github.com/vmware/govmomi/toolbox/vix" +) + +var ( + EscapeXML *strings.Replacer + + shell = "/bin/sh" + + defaultOwner = os.Getenv("USER") +) + +func init() { + // See: VixToolsEscapeXMLString + chars := []string{ + `"`, + "%", + "&", + "'", + "<", + ">", + } + + replace := make([]string, 0, len(chars)*2) + + for _, c := range chars { + replace = append(replace, c) + replace = append(replace, url.QueryEscape(c)) + } + + EscapeXML = strings.NewReplacer(replace...) + + // See procMgrPosix.c:ProcMgrStartProcess: + // Prefer bash -c as is uses exec() to replace itself, + // whereas bourne shell does a fork & exec, so two processes are started. + if sh, err := exec.LookPath("bash"); err != nil { + shell = sh + } + + if defaultOwner == "" { + defaultOwner = "toolbox" + } +} + +// IO encapsulates IO for Go functions and OS commands such that they can interact via the OperationsManager +// without file system disk IO. +type IO struct { + In struct { + io.Writer + io.Reader + io.Closer // Closer for the write side of the pipe, can be closed via hgfs ops (FileTranfserToGuest) + } + + Out *bytes.Buffer + Err *bytes.Buffer +} + +// State is the toolbox representation of the GuestProcessInfo type +type State struct { + StartTime int64 // (keep first to ensure 64-bit alignment) + EndTime int64 // (keep first to ensure 64-bit alignment) + + Name string + Args string + Owner string + Pid int64 + ExitCode int32 + + IO *IO +} + +// WithIO enables toolbox Process IO without file system disk IO. +func (p *Process) WithIO() *Process { + p.IO = &IO{ + Out: new(bytes.Buffer), + Err: new(bytes.Buffer), + } + + return p +} + +// File implements the os.FileInfo interface to enable toolbox interaction with virtual files. +type File struct { + io.Reader + io.Writer + io.Closer + + name string + size int +} + +// Name implementation of the os.FileInfo interface method. +func (a *File) Name() string { + return a.name +} + +// Size implementation of the os.FileInfo interface method. +func (a *File) Size() int64 { + return int64(a.size) +} + +// Mode implementation of the os.FileInfo interface method. +func (a *File) Mode() os.FileMode { + if strings.HasSuffix(a.name, "stdin") { + return 0200 + } + return 0400 +} + +// ModTime implementation of the os.FileInfo interface method. +func (a *File) ModTime() time.Time { + return time.Now() +} + +// IsDir implementation of the os.FileInfo interface method. +func (a *File) IsDir() bool { + return false +} + +// Sys implementation of the os.FileInfo interface method. +func (a *File) Sys() interface{} { + return nil +} + +func (s *State) toXML() string { + const format = "" + + "%s" + + "%s" + + "%d" + + "%s" + + "%d" + + "%d" + + "%d" + + "" + + name := filepath.Base(s.Name) + + argv := []string{s.Name} + + if len(s.Args) != 0 { + argv = append(argv, EscapeXML.Replace(s.Args)) + } + + args := strings.Join(argv, " ") + + return fmt.Sprintf(format, name, args, s.Pid, s.Owner, s.StartTime, s.ExitCode, s.EndTime) +} + +// Process managed by the process Manager. +type Process struct { + State + + Start func(*Process, *vix.StartProgramRequest) (int64, error) + Wait func() error + Kill context.CancelFunc + + ctx context.Context +} + +// Error can be returned by the Process.Wait function to propagate ExitCode to process State. +type Error struct { + Err error + ExitCode int32 +} + +func (e *Error) Error() string { + return e.Err.Error() +} + +// Manager manages processes within the guest. +// See: http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.vm.guest.Manager.html +type Manager struct { + wg sync.WaitGroup + mu sync.Mutex + expire time.Duration + entries map[int64]*Process + pids sync.Pool +} + +// NewManager creates a new process Manager instance. +func NewManager() *Manager { + // We use pseudo PIDs that don't conflict with OS PIDs, so they can live in the same table. + // For the pseudo PIDs, we use a sync.Pool rather than a plain old counter to avoid the unlikely, + // but possible wrapping should such a counter exceed MaxInt64. + pid := int64(32768) // TODO: /proc/sys/kernel/pid_max + + return &Manager{ + expire: time.Minute * 5, + entries: make(map[int64]*Process), + pids: sync.Pool{ + New: func() interface{} { + return atomic.AddInt64(&pid, 1) + }, + }, + } +} + +// Start calls the Process.Start function, returning the pid on success or an error. +// A goroutine is started that calls the Process.Wait function. After Process.Wait has +// returned, the process State EndTime and ExitCode fields are set. The process state can be +// queried via ListProcessesInGuest until it is removed, 5 minutes after Wait returns. +func (m *Manager) Start(r *vix.StartProgramRequest, p *Process) (int64, error) { + p.Name = r.ProgramPath + p.Args = r.Arguments + + // Owner is cosmetic, but useful for example with: govc guest.ps -U $uid + if p.Owner == "" { + p.Owner = defaultOwner + } + + p.StartTime = time.Now().Unix() + + p.ctx, p.Kill = context.WithCancel(context.Background()) + + pid, err := p.Start(p, r) + if err != nil { + return -1, err + } + + if pid == 0 { + p.Pid = m.pids.Get().(int64) // pseudo pid for funcs + } else { + p.Pid = pid + } + + m.mu.Lock() + m.entries[p.Pid] = p + m.mu.Unlock() + + m.wg.Add(1) + go func() { + werr := p.Wait() + + m.mu.Lock() + p.EndTime = time.Now().Unix() + + if werr != nil { + rc := int32(1) + if xerr, ok := werr.(*Error); ok { + rc = xerr.ExitCode + } + + p.ExitCode = rc + } + + m.mu.Unlock() + m.wg.Done() + p.Kill() // cancel context for those waiting on p.ctx.Done() + + // See: http://pubs.vmware.com/vsphere-65/topic/com.vmware.wssdk.apiref.doc/vim.vm.guest.ProcessManager.ProcessInfo.html + // "If the process was started using StartProgramInGuest then the process completion time + // will be available if queried within 5 minutes after it completes." + <-time.After(m.expire) + + m.mu.Lock() + delete(m.entries, p.Pid) + m.mu.Unlock() + + if pid == 0 { + m.pids.Put(p.Pid) // pseudo pid can be reused now + } + }() + + return p.Pid, nil +} + +// Kill cancels the Process Context. +// Returns true if pid exists in the process table, false otherwise. +func (m *Manager) Kill(pid int64) bool { + m.mu.Lock() + entry, ok := m.entries[pid] + m.mu.Unlock() + + if ok { + entry.Kill() + return true + } + + return false +} + +// ListProcesses marshals the process State for the given pids. +// If no pids are specified, all current processes are included. +// The return value can be used for responding to a VixMsgListProcessesExRequest. +func (m *Manager) ListProcesses(pids []int64) []byte { + w := new(bytes.Buffer) + + for _, p := range m.List(pids) { + _, _ = w.WriteString(p.toXML()) + } + + return w.Bytes() +} + +// List the process State for the given pids. +func (m *Manager) List(pids []int64) []State { + var list []State + + m.mu.Lock() + + if len(pids) == 0 { + for _, p := range m.entries { + list = append(list, p.State) + } + } else { + for _, id := range pids { + p, ok := m.entries[id] + if !ok { + continue + } + + list = append(list, p.State) + } + } + + m.mu.Unlock() + + return list +} + +type procFileInfo struct { + os.FileInfo +} + +// Size returns hgfs.LargePacketMax such that InitiateFileTransferFromGuest can download a /proc/ file from the guest. +// If we were to return the size '0' here, then a 'Content-Length: 0' header is returned by VC/ESX. +func (p procFileInfo) Size() int64 { + return hgfs.LargePacketMax // Remember, Sully, when I promised to kill you last? I lied. +} + +// Stat implements hgfs.FileHandler.Stat +func (m *Manager) Stat(u *url.URL) (os.FileInfo, error) { + name := path.Join("/proc", u.Path) + + info, err := os.Stat(name) + if err == nil && info.Size() == 0 { + // This is a real /proc file + return &procFileInfo{info}, nil + } + + dir, file := path.Split(u.Path) + + pid, err := strconv.ParseInt(path.Base(dir), 10, 64) + if err != nil { + return nil, os.ErrNotExist + } + + m.mu.Lock() + p := m.entries[pid] + m.mu.Unlock() + + if p == nil || p.IO == nil { + return nil, os.ErrNotExist + } + + pf := &File{ + name: name, + Closer: io.NopCloser(nil), // via hgfs, nop for stdout and stderr + } + + var r *bytes.Buffer + + switch file { + case "stdin": + pf.Writer = p.IO.In.Writer + pf.Closer = p.IO.In.Closer + return pf, nil + case "stdout": + r = p.IO.Out + case "stderr": + r = p.IO.Err + default: + return nil, os.ErrNotExist + } + + select { + case <-p.ctx.Done(): + case <-time.After(time.Second): + // The vmx guest RPC calls are queue based, serialized on the vmx side. + // There are 5 seconds between "ping" RPC calls and after a few misses, + // the vmx considers tools as not running. In this case, the vmx would timeout + // a file transfer after 60 seconds. + // + // vix.FileAccessError is converted to a CannotAccessFile fault, + // so the client can choose to retry the transfer in this case. + // Would have preferred vix.ObjectIsBusy (EBUSY), but VC/ESX converts that + // to a general SystemErrorFault with nothing but a localized string message + // to check against: "vix error codes = (5, 0)." + // Is standard vmware-tools, EACCES is converted to a CannotAccessFile fault. + return nil, vix.Error(vix.FileAccessError) + } + + pf.Reader = r + pf.size = r.Len() + + return pf, nil +} + +// Open implements hgfs.FileHandler.Open +func (m *Manager) Open(u *url.URL, mode int32) (hgfs.File, error) { + info, err := m.Stat(u) + if err != nil { + return nil, err + } + + pinfo, ok := info.(*File) + + if !ok { + return nil, os.ErrNotExist // fall through to default os.Open + } + + switch path.Base(u.Path) { + case "stdin": + if mode != hgfs.OpenModeWriteOnly { + return nil, vix.Error(vix.InvalidArg) + } + case "stdout", "stderr": + if mode != hgfs.OpenModeReadOnly { + return nil, vix.Error(vix.InvalidArg) + } + } + + return pinfo, nil +} + +type processFunc struct { + wg sync.WaitGroup + + run func(context.Context, string) error + + err error +} + +// NewFunc creates a new Process, where the Start function calls the given run function within a goroutine. +// The Wait function waits for the goroutine to finish and returns the error returned by run. +// The run ctx param may be used to return early via the process Manager.Kill method. +// The run args command is that of the VixMsgStartProgramRequest.Arguments field. +func NewFunc(run func(ctx context.Context, args string) error) *Process { + f := &processFunc{run: run} + + return &Process{ + Start: f.start, + Wait: f.wait, + } +} + +// FuncIO is the Context key to access optional ProcessIO +var FuncIO = struct { + key int64 +}{vix.CommandMagicWord} + +func (f *processFunc) start(p *Process, r *vix.StartProgramRequest) (int64, error) { + f.wg.Add(1) + + var c io.Closer + + if p.IO != nil { + pr, pw := io.Pipe() + + p.IO.In.Reader, p.IO.In.Writer = pr, pw + c, p.IO.In.Closer = pr, pw + + p.ctx = context.WithValue(p.ctx, FuncIO, p.IO) + } + + go func() { + f.err = f.run(p.ctx, r.Arguments) + + if p.IO != nil { + _ = c.Close() + + if f.err != nil && p.IO.Err.Len() == 0 { + p.IO.Err.WriteString(f.err.Error()) + } + } + + f.wg.Done() + }() + + return 0, nil +} + +func (f *processFunc) wait() error { + f.wg.Wait() + return f.err +} + +type processCmd struct { + cmd *exec.Cmd +} + +// New creates a new Process, where the Start function use exec.CommandContext to create and start the process. +// The Wait function waits for the process to finish and returns the error returned by exec.Cmd.Wait(). +// Prior to Wait returning, the exec.Cmd.Wait() error is used to set the Process.ExitCode, if error is of type exec.ExitError. +// The ctx param may be used to kill the process via the process Manager.Kill method. +// The VixMsgStartProgramRequest param fields are mapped to the exec.Cmd counterpart fields. +// Processes are started within a sub-shell, allowing for i/o redirection, just as with the C version of vmware-tools. +func New() *Process { + c := new(processCmd) + + return &Process{ + Start: c.start, + Wait: c.wait, + } +} + +func (c *processCmd) start(p *Process, r *vix.StartProgramRequest) (int64, error) { + name, err := exec.LookPath(r.ProgramPath) + if err != nil { + return -1, err + } + // #nosec: Subprocess launching with variable + // Note that processCmd is currently used only for testing. + c.cmd = exec.CommandContext(p.ctx, shell, "-c", fmt.Sprintf("%s %s", name, r.Arguments)) + c.cmd.Dir = r.WorkingDir + c.cmd.Env = r.EnvVars + + if p.IO != nil { + in, perr := c.cmd.StdinPipe() + if perr != nil { + return -1, perr + } + + p.IO.In.Writer = in + p.IO.In.Closer = in + + // Note we currently use a Buffer in addition to the os.Pipe so that: + // - Stat() can provide a size + // - FileTransferFromGuest won't block + // - Can't use the exec.Cmd.Std{out,err}Pipe methods since Wait() closes the pipes. + // We could use os.Pipe directly, but toolbox needs to take care of closing both ends, + // but also need to prevent FileTransferFromGuest from blocking. + c.cmd.Stdout = p.IO.Out + c.cmd.Stderr = p.IO.Err + } + + err = c.cmd.Start() + if err != nil { + return -1, err + } + + return int64(c.cmd.Process.Pid), nil +} + +func (c *processCmd) wait() error { + err := c.cmd.Wait() + if err != nil { + xerr := &Error{ + Err: err, + ExitCode: 1, + } + + if x, ok := err.(*exec.ExitError); ok { + if status, ok := x.Sys().(syscall.WaitStatus); ok { + xerr.ExitCode = int32(status.ExitStatus()) + } + } + + return xerr + } + + return nil +} + +// NewRoundTrip starts a Go function to implement a toolbox backed http.RoundTripper +func NewRoundTrip() *Process { + return NewFunc(func(ctx context.Context, host string) error { + p, _ := ctx.Value(FuncIO).(*IO) + + closers := []io.Closer{p.In.Closer} + + defer func() { + for _, c := range closers { + _ = c.Close() + } + }() + + c, err := new(net.Dialer).DialContext(ctx, "tcp", host) + if err != nil { + return err + } + + closers = append(closers, c) + + go func() { + <-ctx.Done() + if ctx.Err() == context.DeadlineExceeded { + _ = c.Close() + } + }() + + _, err = io.Copy(c, p.In.Reader) + if err != nil { + return err + } + + _, err = io.Copy(p.Out, c) + if err != nil { + return err + } + + return nil + }).WithIO() +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/vix/property.go b/vendor/github.com/vmware/govmomi/toolbox/vix/property.go new file mode 100644 index 0000000000..914de0869d --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/vix/property.go @@ -0,0 +1,236 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vix + +import ( + "bytes" + "encoding/binary" + "errors" +) + +// Property type enum as defined in open-vm-tools/lib/include/vix.h +const ( + _ = iota // ANY type not supported + vixPropertyTypeInt32 + vixPropertyTypeString + vixPropertyTypeBool + _ // HANDLE type not supported + vixPropertyTypeInt64 + vixPropertyTypeBlob +) + +// Property ID enum as defined in open-vm-tools/lib/include/vixOpenSource.h +const ( + PropertyGuestToolsAPIOptions = 4501 + PropertyGuestOsFamily = 4502 + PropertyGuestOsVersion = 4503 + PropertyGuestToolsProductNam = 4511 + PropertyGuestToolsVersion = 4500 + PropertyGuestName = 4505 + PropertyGuestOsVersionShort = 4520 + + PropertyGuestStartProgramEnabled = 4540 + PropertyGuestListProcessesEnabled = 4541 + PropertyGuestTerminateProcessEnabled = 4542 + PropertyGuestReadEnvironmentVariableEnabled = 4543 + + PropertyGuestMakeDirectoryEnabled = 4547 + PropertyGuestDeleteFileEnabled = 4548 + PropertyGuestDeleteDirectoryEnabled = 4549 + PropertyGuestMoveDirectoryEnabled = 4550 + PropertyGuestMoveFileEnabled = 4551 + PropertyGuestCreateTempFileEnabled = 4552 + PropertyGuestCreateTempDirectoryEnabled = 4553 + PropertyGuestListFilesEnabled = 4554 + PropertyGuestChangeFileAttributesEnabled = 4555 + PropertyGuestInitiateFileTransferFromGuestEnabled = 4556 + PropertyGuestInitiateFileTransferToGuestEnabled = 4557 +) + +type Property struct { + header struct { + ID int32 + Kind int32 + Length int32 + } + + data struct { + Int32 int32 + String string + Bool uint8 + Int64 int64 + Blob []byte + } +} + +var int32Size int32 + +func init() { + var i int32 + int32Size = int32(binary.Size(&i)) +} + +type PropertyList []*Property + +func NewInt32Property(id int32, val int32) *Property { + p := new(Property) + p.header.ID = id + p.header.Kind = vixPropertyTypeInt32 + p.header.Length = int32Size + p.data.Int32 = val + return p +} + +func NewStringProperty(id int32, val string) *Property { + p := new(Property) + p.header.ID = id + p.header.Kind = vixPropertyTypeString + p.header.Length = int32(len(val) + 1) + p.data.String = val + return p +} + +func NewBoolProperty(id int32, val bool) *Property { + p := new(Property) + p.header.ID = id + p.header.Kind = vixPropertyTypeBool + p.header.Length = 1 + if val { + p.data.Bool = 1 + } + return p +} + +func NewInt64Property(id int32, val int64) *Property { + p := new(Property) + p.header.ID = id + p.header.Kind = vixPropertyTypeInt64 + p.header.Length = int32Size * 2 + p.data.Int64 = val + return p +} + +func NewBlobProperty(id int32, val []byte) *Property { + p := new(Property) + p.header.ID = id + p.header.Kind = vixPropertyTypeBlob + p.header.Length = int32(len(val)) + p.data.Blob = val + return p +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (p *Property) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + // #nosec: Errors unhandled + _ = binary.Write(buf, binary.LittleEndian, &p.header) + + switch p.header.Kind { + case vixPropertyTypeBool: + // #nosec: Errors unhandled + _ = binary.Write(buf, binary.LittleEndian, p.data.Bool) + case vixPropertyTypeInt32: + // #nosec: Errors unhandled + _ = binary.Write(buf, binary.LittleEndian, p.data.Int32) + case vixPropertyTypeInt64: + // #nosec: Errors unhandled + _ = binary.Write(buf, binary.LittleEndian, p.data.Int64) + case vixPropertyTypeString: + // #nosec: Errors unhandled + _, _ = buf.WriteString(p.data.String) + // #nosec: Errors unhandled + _ = buf.WriteByte(0) + case vixPropertyTypeBlob: + // #nosec: Errors unhandled + _, _ = buf.Write(p.data.Blob) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (p *Property) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &p.header) + if err != nil { + return err + } + + switch p.header.Kind { + case vixPropertyTypeBool: + return binary.Read(buf, binary.LittleEndian, &p.data.Bool) + case vixPropertyTypeInt32: + return binary.Read(buf, binary.LittleEndian, &p.data.Int32) + case vixPropertyTypeInt64: + return binary.Read(buf, binary.LittleEndian, &p.data.Int64) + case vixPropertyTypeString: + s := make([]byte, p.header.Length) + if _, err := buf.Read(s); err != nil { + return err + } + + p.data.String = string(bytes.TrimRight(s, "\x00")) + case vixPropertyTypeBlob: + p.data.Blob = make([]byte, p.header.Length) + if _, err := buf.Read(p.data.Blob); err != nil { + return err + } + default: + return errors.New("VIX_E_UNRECOGNIZED_PROPERTY") + } + + return nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (l *PropertyList) UnmarshalBinary(data []byte) error { + headerSize := int32Size * 3 + + for { + p := new(Property) + + err := p.UnmarshalBinary(data) + if err != nil { + return err + } + + *l = append(*l, p) + + offset := headerSize + p.header.Length + data = data[offset:] + + if len(data) == 0 { + return nil + } + } +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (l *PropertyList) MarshalBinary() ([]byte, error) { + var buf bytes.Buffer + + for _, p := range *l { + // #nosec: Errors unhandled + b, _ := p.MarshalBinary() + // #nosec: Errors unhandled + _, _ = buf.Write(b) + } + + return buf.Bytes(), nil +} diff --git a/vendor/github.com/vmware/govmomi/toolbox/vix/protocol.go b/vendor/github.com/vmware/govmomi/toolbox/vix/protocol.go new file mode 100644 index 0000000000..2709098f07 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/toolbox/vix/protocol.go @@ -0,0 +1,847 @@ +/* +Copyright (c) 2017 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vix + +import ( + "bytes" + "encoding/base64" + "encoding/binary" + "fmt" + "os" + "os/exec" + "syscall" +) + +const ( + CommandMagicWord = 0xd00d0001 + + CommandGetToolsState = 62 + + CommandStartProgram = 185 + CommandListProcessesEx = 186 + CommandReadEnvVariables = 187 + CommandTerminateProcess = 193 + + CommandCreateDirectoryEx = 178 + CommandMoveGuestFileEx = 179 + CommandMoveGuestDirectory = 180 + CommandCreateTemporaryFileEx = 181 + CommandCreateTemporaryDirectory = 182 + CommandSetGuestFileAttributes = 183 + CommandDeleteGuestFileEx = 194 + CommandDeleteGuestDirectoryEx = 195 + + CommandListFiles = 177 + HgfsSendPacketCommand = 84 + CommandInitiateFileTransferFromGuest = 188 + CommandInitiateFileTransferToGuest = 189 + + // VIX_USER_CREDENTIAL_NAME_PASSWORD + UserCredentialTypeNamePassword = 1 + + // VIX_E_* constants from vix.h + OK = 0 + Fail = 1 + InvalidArg = 3 + FileNotFound = 4 + FileAlreadyExists = 12 + FileAccessError = 13 + AuthenticationFail = 35 + + UnrecognizedCommandInGuest = 3025 + InvalidMessageHeader = 10000 + InvalidMessageBody = 10001 + NotAFile = 20001 + NotADirectory = 20002 + NoSuchProcess = 20003 + DirectoryNotEmpty = 20006 + + // VIX_COMMAND_* constants from Commands.h + CommandGuestReturnsBinary = 0x80 + + // VIX_FILE_ATTRIBUTES_ constants from vix.h + FileAttributesDirectory = 0x0001 + FileAttributesSymlink = 0x0002 +) + +// SetGuestFileAttributes flags as defined in vixOpenSource.h +const ( + FileAttributeSetAccessDate = 0x0001 + FileAttributeSetModifyDate = 0x0002 + FileAttributeSetReadonly = 0x0004 + FileAttributeSetHidden = 0x0008 + FileAttributeSetUnixOwnerid = 0x0010 + FileAttributeSetUnixGroupid = 0x0020 + FileAttributeSetUnixPermissions = 0x0040 +) + +type Error int + +func (err Error) Error() string { + return fmt.Sprintf("vix error=%d", err) +} + +// ErrorCode does its best to map the given error to a VIX error code. +// See also: Vix_TranslateErrno +func ErrorCode(err error) int { + switch t := err.(type) { + case Error: + return int(t) + case *os.PathError: + if errno, ok := t.Err.(syscall.Errno); ok { + switch errno { + case syscall.ENOTEMPTY: + return DirectoryNotEmpty + } + } + case *exec.Error: + if t.Err == exec.ErrNotFound { + return FileNotFound + } + } + + switch { + case os.IsNotExist(err): + return FileNotFound + case os.IsExist(err): + return FileAlreadyExists + case os.IsPermission(err): + return FileAccessError + default: + return Fail + } +} + +type Header struct { + Magic uint32 + MessageVersion uint16 + + TotalMessageLength uint32 + HeaderLength uint32 + BodyLength uint32 + CredentialLength uint32 + + CommonFlags uint8 +} + +type CommandRequestHeader struct { + Header + + OpCode uint32 + RequestFlags uint32 + + TimeOut uint32 + + Cookie uint64 + ClientHandleID uint32 + + UserCredentialType uint32 +} + +type StartProgramRequest struct { + CommandRequestHeader + + Body struct { + StartMinimized uint8 + ProgramPathLength uint32 + ArgumentsLength uint32 + WorkingDirLength uint32 + NumEnvVars uint32 + EnvVarLength uint32 + } + + ProgramPath string + Arguments string + WorkingDir string + EnvVars []string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *StartProgramRequest) MarshalBinary() ([]byte, error) { + var env bytes.Buffer + + if n := len(r.EnvVars); n != 0 { + for _, e := range r.EnvVars { + _, _ = env.Write([]byte(e)) + _ = env.WriteByte(0) + } + r.Body.NumEnvVars = uint32(n) + r.Body.EnvVarLength = uint32(env.Len()) + } + + var fields []string + + add := func(s string, l *uint32) { + if n := len(s); n != 0 { + *l = uint32(n) + 1 + fields = append(fields, s) + } + } + + add(r.ProgramPath, &r.Body.ProgramPathLength) + add(r.Arguments, &r.Body.ArgumentsLength) + add(r.WorkingDir, &r.Body.WorkingDirLength) + + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + for _, val := range fields { + _, _ = buf.Write([]byte(val)) + _ = buf.WriteByte(0) + } + + if r.Body.EnvVarLength != 0 { + _, _ = buf.Write(env.Bytes()) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *StartProgramRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + fields := []struct { + len uint32 + val *string + }{ + {r.Body.ProgramPathLength, &r.ProgramPath}, + {r.Body.ArgumentsLength, &r.Arguments}, + {r.Body.WorkingDirLength, &r.WorkingDir}, + } + + for _, field := range fields { + if field.len == 0 { + continue + } + + x := buf.Next(int(field.len)) + *field.val = string(bytes.TrimRight(x, "\x00")) + } + + for i := 0; i < int(r.Body.NumEnvVars); i++ { + env, rerr := buf.ReadString(0) + if rerr != nil { + return rerr + } + + env = env[:len(env)-1] // discard NULL terminator + r.EnvVars = append(r.EnvVars, env) + } + + return nil +} + +type KillProcessRequest struct { + CommandRequestHeader + + Body struct { + Pid int64 + Options uint32 + } +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *KillProcessRequest) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *KillProcessRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + return binary.Read(buf, binary.LittleEndian, &r.Body) +} + +type ListProcessesRequest struct { + CommandRequestHeader + + Body struct { + Key uint32 + Offset uint32 + NumPids uint32 + } + + Pids []int64 +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *ListProcessesRequest) MarshalBinary() ([]byte, error) { + r.Body.NumPids = uint32(len(r.Pids)) + + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + for _, pid := range r.Pids { + _ = binary.Write(buf, binary.LittleEndian, &pid) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *ListProcessesRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + r.Pids = make([]int64, r.Body.NumPids) + + for i := uint32(0); i < r.Body.NumPids; i++ { + err := binary.Read(buf, binary.LittleEndian, &r.Pids[i]) + if err != nil { + return err + } + } + + return nil +} + +type ReadEnvironmentVariablesRequest struct { + CommandRequestHeader + + Body struct { + NumNames uint32 + NamesLength uint32 + } + + Names []string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *ReadEnvironmentVariablesRequest) MarshalBinary() ([]byte, error) { + var env bytes.Buffer + + if n := len(r.Names); n != 0 { + for _, e := range r.Names { + _, _ = env.Write([]byte(e)) + _ = env.WriteByte(0) + } + r.Body.NumNames = uint32(n) + r.Body.NamesLength = uint32(env.Len()) + } + + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + if r.Body.NamesLength != 0 { + _, _ = buf.Write(env.Bytes()) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *ReadEnvironmentVariablesRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + for i := 0; i < int(r.Body.NumNames); i++ { + env, rerr := buf.ReadString(0) + if rerr != nil { + return rerr + } + + env = env[:len(env)-1] // discard NULL terminator + r.Names = append(r.Names, env) + } + + return nil +} + +type CreateTempFileRequest struct { + CommandRequestHeader + + Body struct { + Options int32 + FilePrefixLength uint32 + FileSuffixLength uint32 + DirectoryPathLength uint32 + PropertyListLength uint32 + } + + FilePrefix string + FileSuffix string + DirectoryPath string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *CreateTempFileRequest) MarshalBinary() ([]byte, error) { + var fields []string + + add := func(s string, l *uint32) { + *l = uint32(len(s)) // NOTE: NULL byte is not included in the length fields on the wire + fields = append(fields, s) + } + + add(r.FilePrefix, &r.Body.FilePrefixLength) + add(r.FileSuffix, &r.Body.FileSuffixLength) + add(r.DirectoryPath, &r.Body.DirectoryPathLength) + + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + for _, val := range fields { + _, _ = buf.Write([]byte(val)) + _ = buf.WriteByte(0) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *CreateTempFileRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + fields := []struct { + len uint32 + val *string + }{ + {r.Body.FilePrefixLength, &r.FilePrefix}, + {r.Body.FileSuffixLength, &r.FileSuffix}, + {r.Body.DirectoryPathLength, &r.DirectoryPath}, + } + + for _, field := range fields { + field.len++ // NOTE: NULL byte is not included in the length fields on the wire + + x := buf.Next(int(field.len)) + *field.val = string(bytes.TrimRight(x, "\x00")) + } + + return nil +} + +type FileRequest struct { + CommandRequestHeader + + Body struct { + FileOptions int32 + GuestPathNameLength uint32 + } + + GuestPathName string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *FileRequest) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + r.Body.GuestPathNameLength = uint32(len(r.GuestPathName)) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + _, _ = buf.WriteString(r.GuestPathName) + _ = buf.WriteByte(0) + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *FileRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + name := buf.Next(int(r.Body.GuestPathNameLength)) + r.GuestPathName = string(bytes.TrimRight(name, "\x00")) + + return nil +} + +type DirRequest struct { + CommandRequestHeader + + Body struct { + FileOptions int32 + GuestPathNameLength uint32 + FilePropertiesLength uint32 + Recursive bool + } + + GuestPathName string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *DirRequest) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + r.Body.GuestPathNameLength = uint32(len(r.GuestPathName)) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + _, _ = buf.WriteString(r.GuestPathName) + _ = buf.WriteByte(0) + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *DirRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + name := buf.Next(int(r.Body.GuestPathNameLength)) + r.GuestPathName = string(bytes.TrimRight(name, "\x00")) + + return nil +} + +type RenameFileRequest struct { + CommandRequestHeader + + Body struct { + CopyFileOptions int32 + OldPathNameLength uint32 + NewPathNameLength uint32 + FilePropertiesLength uint32 + Overwrite bool + } + + OldPathName string + NewPathName string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *RenameFileRequest) MarshalBinary() ([]byte, error) { + var fields []string + + add := func(s string, l *uint32) { + *l = uint32(len(s)) // NOTE: NULL byte is not included in the length fields on the wire + fields = append(fields, s) + } + + add(r.OldPathName, &r.Body.OldPathNameLength) + add(r.NewPathName, &r.Body.NewPathNameLength) + + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + for _, val := range fields { + _, _ = buf.Write([]byte(val)) + _ = buf.WriteByte(0) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *RenameFileRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + fields := []struct { + len uint32 + val *string + }{ + {r.Body.OldPathNameLength, &r.OldPathName}, + {r.Body.NewPathNameLength, &r.NewPathName}, + } + + for _, field := range fields { + field.len++ // NOTE: NULL byte is not included in the length fields on the wire + + x := buf.Next(int(field.len)) + *field.val = string(bytes.TrimRight(x, "\x00")) + } + + return nil +} + +type ListFilesRequest struct { + CommandRequestHeader + + Body struct { + FileOptions int32 + GuestPathNameLength uint32 + PatternLength uint32 + Index int32 + MaxResults int32 + Offset uint64 + } + + GuestPathName string + Pattern string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *ListFilesRequest) MarshalBinary() ([]byte, error) { + var fields []string + + add := func(s string, l *uint32) { + if n := len(s); n != 0 { + *l = uint32(n) + 1 + fields = append(fields, s) + } + } + + add(r.GuestPathName, &r.Body.GuestPathNameLength) + add(r.Pattern, &r.Body.PatternLength) + + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + for _, val := range fields { + _, _ = buf.Write([]byte(val)) + _ = buf.WriteByte(0) + } + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *ListFilesRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + fields := []struct { + len uint32 + val *string + }{ + {r.Body.GuestPathNameLength, &r.GuestPathName}, + {r.Body.PatternLength, &r.Pattern}, + } + + for _, field := range fields { + if field.len == 0 { + continue + } + + x := buf.Next(int(field.len)) + *field.val = string(bytes.TrimRight(x, "\x00")) + } + + return nil +} + +type SetGuestFileAttributesRequest struct { + CommandRequestHeader + + Body struct { + FileOptions int32 + AccessTime int64 + ModificationTime int64 + OwnerID int32 + GroupID int32 + Permissions int32 + Hidden bool + ReadOnly bool + GuestPathNameLength uint32 + } + + GuestPathName string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *SetGuestFileAttributesRequest) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + r.Body.GuestPathNameLength = uint32(len(r.GuestPathName)) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + _, _ = buf.WriteString(r.GuestPathName) + _ = buf.WriteByte(0) + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *SetGuestFileAttributesRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + name := buf.Next(int(r.Body.GuestPathNameLength)) + r.GuestPathName = string(bytes.TrimRight(name, "\x00")) + + return nil +} + +func (r *SetGuestFileAttributesRequest) IsSet(opt int32) bool { + return r.Body.FileOptions&opt == opt +} + +type CommandHgfsSendPacket struct { + CommandRequestHeader + + Body struct { + PacketSize uint32 + Timeout int32 + } + + Packet []byte +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *CommandHgfsSendPacket) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + _, _ = buf.Write(r.Packet) + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *CommandHgfsSendPacket) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + r.Packet = buf.Next(int(r.Body.PacketSize)) + + return nil +} + +type InitiateFileTransferToGuestRequest struct { + CommandRequestHeader + + Body struct { + Options int32 + GuestPathNameLength uint32 + Overwrite bool + } + + GuestPathName string +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface +func (r *InitiateFileTransferToGuestRequest) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + r.Body.GuestPathNameLength = uint32(len(r.GuestPathName)) + + _ = binary.Write(buf, binary.LittleEndian, &r.Body) + + _, _ = buf.WriteString(r.GuestPathName) + _ = buf.WriteByte(0) + + return buf.Bytes(), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface +func (r *InitiateFileTransferToGuestRequest) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(data) + + err := binary.Read(buf, binary.LittleEndian, &r.Body) + if err != nil { + return err + } + + name := buf.Next(int(r.Body.GuestPathNameLength)) + r.GuestPathName = string(bytes.TrimRight(name, "\x00")) + + return nil +} + +type UserCredentialNamePassword struct { + Body struct { + NameLength uint32 + PasswordLength uint32 + } + + Name string + Password string +} + +func (c *UserCredentialNamePassword) UnmarshalBinary(data []byte) error { + buf := bytes.NewBuffer(bytes.TrimRight(data, "\x00")) + + err := binary.Read(buf, binary.LittleEndian, &c.Body) + if err != nil { + return err + } + + str, err := base64.StdEncoding.DecodeString(buf.String()) + if err != nil { + return err + } + + c.Name = string(str[0:c.Body.NameLength]) + c.Password = string(str[c.Body.NameLength+1 : len(str)-1]) + + return nil +} + +func (c *UserCredentialNamePassword) MarshalBinary() ([]byte, error) { + buf := new(bytes.Buffer) + + c.Body.NameLength = uint32(len(c.Name)) + c.Body.PasswordLength = uint32(len(c.Password)) + + _ = binary.Write(buf, binary.LittleEndian, &c.Body) + + src := append([]byte(c.Name+"\x00"), []byte(c.Password+"\x00")...) + + enc := base64.StdEncoding + pwd := make([]byte, enc.EncodedLen(len(src))) + enc.Encode(pwd, src) + _, _ = buf.Write(pwd) + _ = buf.WriteByte(0) + + return buf.Bytes(), nil +} diff --git a/vendor/github.com/vmware/govmomi/units/size.go b/vendor/github.com/vmware/govmomi/units/size.go new file mode 100644 index 0000000000..f4ee3fcfc8 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/units/size.go @@ -0,0 +1,109 @@ +/* +Copyright (c) 2015 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package units + +import ( + "errors" + "fmt" + "regexp" + "strconv" +) + +type ByteSize int64 + +const ( + _ = iota + KB = 1 << (10 * iota) + MB + GB + TB + PB + EB +) + +func (b ByteSize) String() string { + switch { + case b >= EB: + return fmt.Sprintf("%.1fEB", float32(b)/EB) + case b >= PB: + return fmt.Sprintf("%.1fPB", float32(b)/PB) + case b >= TB: + return fmt.Sprintf("%.1fTB", float32(b)/TB) + case b >= GB: + return fmt.Sprintf("%.1fGB", float32(b)/GB) + case b >= MB: + return fmt.Sprintf("%.1fMB", float32(b)/MB) + case b >= KB: + return fmt.Sprintf("%.1fKB", float32(b)/KB) + } + return fmt.Sprintf("%dB", b) +} + +type FileSize int64 + +func (b FileSize) String() string { + switch { + case b >= EB: + return fmt.Sprintf("%.1fE", float32(b)/EB) + case b >= PB: + return fmt.Sprintf("%.1fP", float32(b)/PB) + case b >= TB: + return fmt.Sprintf("%.1fT", float32(b)/TB) + case b >= GB: + return fmt.Sprintf("%.1fG", float32(b)/GB) + case b >= MB: + return fmt.Sprintf("%.1fM", float32(b)/MB) + case b >= KB: + return fmt.Sprintf("%.1fK", float32(b)/KB) + } + return fmt.Sprintf("%d", b) +} + +var bytesRegexp = regexp.MustCompile(`^(?i)(\d+)([BKMGTPE]?)(ib|b)?$`) + +func (b *ByteSize) Set(s string) error { + m := bytesRegexp.FindStringSubmatch(s) + if len(m) == 0 { + return errors.New("invalid byte value") + } + + i, err := strconv.ParseInt(m[1], 10, 64) + if err != nil { + return err + } + *b = ByteSize(i) + + switch m[2] { + case "B", "b", "": + case "K", "k": + *b *= ByteSize(KB) + case "M", "m": + *b *= ByteSize(MB) + case "G", "g": + *b *= ByteSize(GB) + case "T", "t": + *b *= ByteSize(TB) + case "P", "p": + *b *= ByteSize(PB) + case "E", "e": + *b *= ByteSize(EB) + default: + return errors.New("invalid byte suffix") + } + + return nil +} diff --git a/vendor/github.com/vmware/govmomi/vapi/doc.go b/vendor/github.com/vmware/govmomi/vapi/doc.go new file mode 100644 index 0000000000..3ec8093522 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/doc.go @@ -0,0 +1,21 @@ +/* +Copyright (c) 2018 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package vapi provides access to vSphere Automation APIs that are not available in the SOAP API, +such as tagging and the content library. +*/ +package vapi diff --git a/vendor/github.com/vmware/govmomi/vapi/resource.go b/vendor/github.com/vmware/govmomi/vapi/resource.go new file mode 100644 index 0000000000..807b9b40b2 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/resource.go @@ -0,0 +1,35 @@ +/* +Copyright (c) 2022-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vapi + +import ( + "strings" + + "github.com/vmware/govmomi/vim25/types" +) + +const ( + // Path is the new-style endpoint for API resources. It supersedes /rest. + Path = "/api" +) + +func Task(id string) types.ManagedObjectReference { + return types.ManagedObjectReference{ + Type: "Task", + Value: strings.SplitN(id, ":", 2)[0], + } +} diff --git a/vendor/github.com/vmware/govmomi/vapi/simulator/simulator.go b/vendor/github.com/vmware/govmomi/vapi/simulator/simulator.go new file mode 100644 index 0000000000..70ad660afe --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/simulator/simulator.go @@ -0,0 +1,2653 @@ +/* +Copyright (c) 2018-2024 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package simulator + +import ( + "archive/tar" + "bytes" + "context" + "crypto/md5" + "crypto/sha1" + "crypto/sha256" + "crypto/sha512" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "encoding/pem" + "errors" + "fmt" + "hash" + "io" + "log" + "net/http" + "net/url" + "os" + "path" + "path/filepath" + "reflect" + "strings" + "sync" + "time" + + "github.com/google/uuid" + + "github.com/vmware/govmomi" + "github.com/vmware/govmomi/nfc" + "github.com/vmware/govmomi/object" + "github.com/vmware/govmomi/ovf" + "github.com/vmware/govmomi/simulator" + "github.com/vmware/govmomi/vapi" + "github.com/vmware/govmomi/vapi/internal" + "github.com/vmware/govmomi/vapi/library" + "github.com/vmware/govmomi/vapi/rest" + "github.com/vmware/govmomi/vapi/tags" + "github.com/vmware/govmomi/vapi/vcenter" + "github.com/vmware/govmomi/view" + "github.com/vmware/govmomi/vim25" + "github.com/vmware/govmomi/vim25/methods" + "github.com/vmware/govmomi/vim25/soap" + "github.com/vmware/govmomi/vim25/types" + vim "github.com/vmware/govmomi/vim25/types" + "github.com/vmware/govmomi/vim25/xml" +) + +type item struct { + *library.Item + File []library.File + Template *types.ManagedObjectReference +} + +type content struct { + *library.Library + Item map[string]*item + Subs map[string]*library.Subscriber + VMTX map[string]*types.ManagedObjectReference +} + +type update struct { + *sync.WaitGroup + *library.Session + Library *library.Library + File map[string]*library.UpdateFile +} + +type download struct { + *library.Session + Library *library.Library + File map[string]*library.DownloadFile +} + +type handler struct { + sync.Mutex + sm *simulator.SessionManager + ServeMux *http.ServeMux + URL url.URL + Category map[string]*tags.Category + Tag map[string]*tags.Tag + Association map[string]map[internal.AssociatedObject]bool + Session map[string]*rest.Session + Library map[string]*content + Update map[string]update + Download map[string]download + Policies []library.ContentSecurityPoliciesInfo + Trust map[string]library.TrustedCertificate +} + +func init() { + simulator.RegisterEndpoint(func(s *simulator.Service, r *simulator.Registry) { + if r.IsVPX() { + patterns, h := New(s.Listen, r) + for _, p := range patterns { + s.Handle(p, h) + } + } + }) +} + +// New creates a vAPI simulator. +func New(u *url.URL, r *simulator.Registry) ([]string, http.Handler) { + s := &handler{ + sm: r.SessionManager(), + ServeMux: http.NewServeMux(), + URL: *u, + Category: make(map[string]*tags.Category), + Tag: make(map[string]*tags.Tag), + Association: make(map[string]map[internal.AssociatedObject]bool), + Session: make(map[string]*rest.Session), + Library: make(map[string]*content), + Update: make(map[string]update), + Download: make(map[string]download), + Policies: defaultSecurityPolicies(), + Trust: make(map[string]library.TrustedCertificate), + } + + handlers := []struct { + p string + m http.HandlerFunc + }{ + // /rest/ patterns. + {internal.SessionPath, s.session}, + {internal.CategoryPath, s.category}, + {internal.CategoryPath + "/", s.categoryID}, + {internal.TagPath, s.tag}, + {internal.TagPath + "/", s.tagID}, + {internal.AssociationPath, s.association}, + {internal.AssociationPath + "/", s.associationID}, + {internal.LibraryPath, s.library}, + {internal.LocalLibraryPath, s.library}, + {internal.SubscribedLibraryPath, s.library}, + {internal.LibraryPath + "/", s.libraryID}, + {internal.LocalLibraryPath + "/", s.libraryID}, + {internal.SubscribedLibraryPath + "/", s.libraryID}, + {internal.Subscriptions, s.subscriptions}, + {internal.Subscriptions + "/", s.subscriptionsID}, + {internal.LibraryItemPath, s.libraryItem}, + {internal.LibraryItemPath + "/", s.libraryItemID}, + {internal.LibraryItemStoragePath, s.libraryItemStorage}, + {internal.LibraryItemStoragePath + "/", s.libraryItemStorageID}, + {internal.SubscribedLibraryItem + "/", s.libraryItemID}, + {internal.LibraryItemUpdateSession, s.libraryItemUpdateSession}, + {internal.LibraryItemUpdateSession + "/", s.libraryItemUpdateSessionID}, + {internal.LibraryItemUpdateSessionFile, s.libraryItemUpdateSessionFile}, + {internal.LibraryItemUpdateSessionFile + "/", s.libraryItemUpdateSessionFileID}, + {internal.LibraryItemDownloadSession, s.libraryItemDownloadSession}, + {internal.LibraryItemDownloadSession + "/", s.libraryItemDownloadSessionID}, + {internal.LibraryItemDownloadSessionFile, s.libraryItemDownloadSessionFile}, + {internal.LibraryItemDownloadSessionFile + "/", s.libraryItemDownloadSessionFileID}, + {internal.LibraryItemFileData + "/", s.libraryItemFileData}, + {internal.LibraryItemFilePath, s.libraryItemFile}, + {internal.LibraryItemFilePath + "/", s.libraryItemFileID}, + {internal.VCenterOVFLibraryItem, s.libraryItemOVF}, + {internal.VCenterOVFLibraryItem + "/", s.libraryItemOVFID}, + {internal.VCenterVMTXLibraryItem, s.libraryItemCreateTemplate}, + {internal.VCenterVMTXLibraryItem + "/", s.libraryItemTemplateID}, + {internal.DebugEcho, s.debugEcho}, + // /api/ patterns. + {internal.SecurityPoliciesPath, s.librarySecurityPolicies}, + {internal.TrustedCertificatesPath, s.libraryTrustedCertificates}, + {internal.TrustedCertificatesPath + "/", s.libraryTrustedCertificatesID}, + } + + for i := range handlers { + h := handlers[i] + s.HandleFunc(h.p, h.m) + } + + return []string{rest.Path + "/", vapi.Path + "/"}, s +} + +func (s *handler) withClient(f func(context.Context, *vim25.Client) error) error { + return WithClient(s.URL, f) +} + +// WithClient creates invokes f with an authenticated vim25.Client. +func WithClient(u url.URL, f func(context.Context, *vim25.Client) error) error { + ctx := context.Background() + c, err := govmomi.NewClient(ctx, &u, true) + if err != nil { + return err + } + defer func() { + _ = c.Logout(ctx) + }() + return f(ctx, c.Client) +} + +// RunTask creates a Task with the given spec and sets the task state based on error returned by f. +func RunTask(u url.URL, spec types.CreateTask, f func(context.Context, *vim25.Client) error) string { + var id string + + err := WithClient(u, func(ctx context.Context, c *vim25.Client) error { + spec.This = *c.ServiceContent.TaskManager + if spec.TaskTypeId == "" { + spec.TaskTypeId = "com.vmware.govmomi.simulator.test" + } + res, err := methods.CreateTask(ctx, c, &spec) + if err != nil { + return err + } + + ref := res.Returnval.Task + task := object.NewTask(c, ref) + id = ref.Value + ":" + uuid.NewString() + + if err = task.SetState(ctx, types.TaskInfoStateRunning, nil, nil); err != nil { + return err + } + + var fault *types.LocalizedMethodFault + state := types.TaskInfoStateSuccess + if f != nil { + err = f(ctx, c) + } + + if err != nil { + fault = &types.LocalizedMethodFault{ + Fault: &types.SystemError{Reason: err.Error()}, + LocalizedMessage: err.Error(), + } + state = types.TaskInfoStateError + } + + return task.SetState(ctx, state, nil, fault) + }) + + if err != nil { + panic(err) // should not happen + } + + return id +} + +// HandleFunc wraps the given handler with authorization checks and passes to http.ServeMux.HandleFunc +func (s *handler) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) { + // Rest paths have been moved from /rest/* to /api/*. Account for both the legacy and new cases here. + if !strings.HasPrefix(pattern, rest.Path) && !strings.HasPrefix(pattern, vapi.Path) { + pattern = rest.Path + pattern + } + + s.ServeMux.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) { + s.Lock() + defer s.Unlock() + + if !s.isAuthorized(r) { + w.WriteHeader(http.StatusUnauthorized) + return + } + + handler(w, r) + }) +} + +func (s *handler) isAuthorized(r *http.Request) bool { + if r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, internal.SessionPath) && s.action(r) == "" { + return true + } + id := r.Header.Get(internal.SessionCookieName) + if id == "" { + if cookie, err := r.Cookie(internal.SessionCookieName); err == nil { + id = cookie.Value + r.Header.Set(internal.SessionCookieName, id) + } + } + info, ok := s.Session[id] + if ok { + info.LastAccessed = time.Now() + } else { + _, ok = s.Update[id] + } + return ok +} + +func (s *handler) hasAuthorization(r *http.Request) (string, bool) { + u, p, ok := r.BasicAuth() + if ok { // user+pass auth + return u, s.sm.Authenticate(s.URL, &vim.Login{UserName: u, Password: p}) + } + auth := r.Header.Get("Authorization") + return "TODO", strings.HasPrefix(auth, "SIGN ") // token auth +} + +func (s *handler) findTag(e vim.VslmTagEntry) *tags.Tag { + for _, c := range s.Category { + if c.Name == e.ParentCategoryName { + for _, t := range s.Tag { + if t.Name == e.TagName && t.CategoryID == c.ID { + return t + } + } + } + } + return nil +} + +// AttachedObjects is meant for internal use via simulator.Registry.tagManager +func (s *handler) AttachedObjects(tag vim.VslmTagEntry) ([]vim.ManagedObjectReference, vim.BaseMethodFault) { + t := s.findTag(tag) + if t == nil { + return nil, new(vim.NotFound) + } + var ids []vim.ManagedObjectReference + for id := range s.Association[t.ID] { + ids = append( + ids, + vim.ManagedObjectReference{ + Type: id.Type, + Value: id.Value, + }) + } + return ids, nil +} + +// AttachedTags is meant for internal use via simulator.Registry.tagManager +func (s *handler) AttachedTags(ref vim.ManagedObjectReference) ([]vim.VslmTagEntry, vim.BaseMethodFault) { + oid := internal.AssociatedObject{ + Type: ref.Type, + Value: ref.Value, + } + var tags []vim.VslmTagEntry + for id, objs := range s.Association { + if objs[oid] { + tag := s.Tag[id] + cat := s.Category[tag.CategoryID] + tags = append(tags, vim.VslmTagEntry{ + TagName: tag.Name, + ParentCategoryName: cat.Name, + }) + } + } + return tags, nil +} + +// AttachTag is meant for internal use via simulator.Registry.tagManager +func (s *handler) AttachTag(ref vim.ManagedObjectReference, tag vim.VslmTagEntry) vim.BaseMethodFault { + t := s.findTag(tag) + if t == nil { + return new(vim.NotFound) + } + s.Association[t.ID][internal.AssociatedObject{ + Type: ref.Type, + Value: ref.Value, + }] = true + return nil +} + +// DetachTag is meant for internal use via simulator.Registry.tagManager +func (s *handler) DetachTag(id vim.ManagedObjectReference, tag vim.VslmTagEntry) vim.BaseMethodFault { + t := s.findTag(tag) + if t == nil { + return new(vim.NotFound) + } + delete(s.Association[t.ID], internal.AssociatedObject{ + Type: id.Type, + Value: id.Value, + }) + return nil +} + +// StatusOK responds with http.StatusOK and encodes val, if specified, to JSON +// For use with "/api" endpoints. +func StatusOK(w http.ResponseWriter, val ...interface{}) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + if len(val) == 0 { + return + } + + err := json.NewEncoder(w).Encode(val[0]) + + if err != nil { + log.Panic(err) + } +} + +// OK responds with http.StatusOK and encodes val, if specified, to JSON +// For use with "/rest" endpoints where the response is a "value" wrapped structure. +func OK(w http.ResponseWriter, val ...interface{}) { + if len(val) == 0 { + w.WriteHeader(http.StatusOK) + return + } + + s := struct { + Value interface{} `json:"value,omitempty"` + }{ + val[0], + } + + StatusOK(w, s) +} + +// BadRequest responds with http.StatusBadRequest and json encoded vAPI error of type kind. +// For use with "/rest" endpoints where the response is a "value" wrapped structure. +func BadRequest(w http.ResponseWriter, kind string) { + w.WriteHeader(http.StatusBadRequest) + + err := json.NewEncoder(w).Encode(struct { + Type string `json:"type"` + Value struct { + Messages []string `json:"messages,omitempty"` + } `json:"value,omitempty"` + }{ + Type: kind, + }) + + if err != nil { + log.Panic(err) + } +} + +// ApiErrorAlreadyExists responds with a REST error of type "ALREADY_EXISTS". +// For use with "/api" endpoints. +func ApiErrorAlreadyExists(w http.ResponseWriter) { + apiError(w, http.StatusBadRequest, "ALREADY_EXISTS") +} + +// ApiErrorGeneral responds with a REST error of type "ERROR". +// For use with "/api" endpoints. +func ApiErrorGeneral(w http.ResponseWriter) { + apiError(w, http.StatusInternalServerError, "ERROR") +} + +// ApiErrorInvalidArgument responds with a REST error of type "INVALID_ARGUMENT". +// For use with "/api" endpoints. +func ApiErrorInvalidArgument(w http.ResponseWriter) { + apiError(w, http.StatusBadRequest, "INVALID_ARGUMENT") +} + +// ApiErrorNotAllowedInCurrentState responds with a REST error of type "NOT_ALLOWED_IN_CURRENT_STATE". +// For use with "/api" endpoints. +func ApiErrorNotAllowedInCurrentState(w http.ResponseWriter) { + apiError(w, http.StatusBadRequest, "NOT_ALLOWED_IN_CURRENT_STATE") +} + +// ApiErrorNotFound responds with a REST error of type "NOT_FOUND". +// For use with "/api" endpoints. +func ApiErrorNotFound(w http.ResponseWriter) { + apiError(w, http.StatusNotFound, "NOT_FOUND") +} + +// ApiErrorResourceInUse responds with a REST error of type "RESOURCE_IN_USE". +// For use with "/api" endpoints. +func ApiErrorResourceInUse(w http.ResponseWriter) { + apiError(w, http.StatusBadRequest, "RESOURCE_IN_USE") +} + +// ApiErrorUnauthorized responds with a REST error of type "UNAUTHORIZED". +// For use with "/api" endpoints. +func ApiErrorUnauthorized(w http.ResponseWriter) { + apiError(w, http.StatusBadRequest, "UNAUTHORIZED") +} + +// ApiErrorUnsupported responds with a REST error of type "UNSUPPORTED". +// For use with "/api" endpoints. +func ApiErrorUnsupported(w http.ResponseWriter) { + apiError(w, http.StatusBadRequest, "UNSUPPORTED") +} + +func apiError(w http.ResponseWriter, statusCode int, errorType string) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(statusCode) + w.Write([]byte(fmt.Sprintf(`{"error_type":"%s", "messages":[]}`, errorType))) +} + +func (*handler) error(w http.ResponseWriter, err error) { + http.Error(w, err.Error(), http.StatusInternalServerError) + log.Print(err) +} + +// ServeHTTP handles vAPI requests. +func (s *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodPost, http.MethodDelete, http.MethodGet, http.MethodPatch, http.MethodPut: + default: + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + h, _ := s.ServeMux.Handler(r) + h.ServeHTTP(w, r) +} + +func (s *handler) decode(r *http.Request, w http.ResponseWriter, val interface{}) bool { + return Decode(r, w, val) +} + +// Decode the request Body into val. +// Returns true on success, otherwise false and sends the http.StatusBadRequest response. +func Decode(r *http.Request, w http.ResponseWriter, val interface{}) bool { + defer r.Body.Close() + err := json.NewDecoder(r.Body).Decode(val) + if err != nil { + log.Printf("%s %s: %s", r.Method, r.RequestURI, err) + w.WriteHeader(http.StatusBadRequest) + return false + } + return true +} + +func (s *handler) expiredSession(id string, now time.Time) bool { + expired := true + s.Lock() + session, ok := s.Session[id] + if ok { + expired = now.Sub(session.LastAccessed) > simulator.SessionIdleTimeout + if expired { + delete(s.Session, id) + } + } + s.Unlock() + return expired +} + +func (s *handler) session(w http.ResponseWriter, r *http.Request) { + id := r.Header.Get(internal.SessionCookieName) + useHeaderAuthn := strings.ToLower(r.Header.Get(internal.UseHeaderAuthn)) + + switch r.Method { + case http.MethodPost: + if s.action(r) != "" { + if session, ok := s.Session[id]; ok { + OK(w, session) + } else { + w.WriteHeader(http.StatusUnauthorized) + } + return + } + user, ok := s.hasAuthorization(r) + if !ok { + w.WriteHeader(http.StatusUnauthorized) + return + } + id = uuid.New().String() + now := time.Now() + s.Session[id] = &rest.Session{User: user, Created: now, LastAccessed: now} + simulator.SessionIdleWatch(context.Background(), id, s.expiredSession) + if useHeaderAuthn != "true" { + http.SetCookie(w, &http.Cookie{ + Name: internal.SessionCookieName, + Value: id, + Path: rest.Path, + }) + } + OK(w, id) + case http.MethodDelete: + delete(s.Session, id) + OK(w) + case http.MethodGet: + OK(w, s.Session[id]) + } +} + +func (s *handler) action(r *http.Request) string { + return r.URL.Query().Get("~action") +} + +func (s *handler) id(r *http.Request) string { + base := path.Base(r.URL.Path) + id := strings.TrimPrefix(base, "id:") + if id == base { + return "" // trigger 404 Not Found w/o id: prefix + } + return id +} + +func newID(kind string) string { + return fmt.Sprintf("urn:vmomi:InventoryService%s:%s:GLOBAL", kind, uuid.New().String()) +} + +func (s *handler) category(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodPost: + var spec struct { + Category tags.Category `json:"create_spec"` + } + if s.decode(r, w, &spec) { + for _, category := range s.Category { + if category.Name == spec.Category.Name { + BadRequest(w, "com.vmware.vapi.std.errors.already_exists") + return + } + } + id := newID("Category") + spec.Category.ID = id + s.Category[id] = &spec.Category + OK(w, id) + } + case http.MethodGet: + var ids []string + for id := range s.Category { + ids = append(ids, id) + } + + OK(w, ids) + } +} + +func (s *handler) categoryID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + + o, ok := s.Category[id] + if !ok { + http.NotFound(w, r) + return + } + + switch r.Method { + case http.MethodDelete: + delete(s.Category, id) + for ix, tag := range s.Tag { + if tag.CategoryID == id { + delete(s.Tag, ix) + delete(s.Association, ix) + } + } + OK(w) + case http.MethodPatch: + var spec struct { + Category tags.Category `json:"update_spec"` + } + if s.decode(r, w, &spec) { + ntypes := len(spec.Category.AssociableTypes) + if ntypes != 0 { + // Validate that AssociableTypes is only appended to. + etypes := len(o.AssociableTypes) + fail := ntypes < etypes + if !fail { + fail = !reflect.DeepEqual(o.AssociableTypes, spec.Category.AssociableTypes[:etypes]) + } + if fail { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + return + } + } + o.Patch(&spec.Category) + OK(w) + } + case http.MethodGet: + OK(w, o) + } +} + +func (s *handler) tag(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodPost: + var spec struct { + Tag tags.Tag `json:"create_spec"` + } + if s.decode(r, w, &spec) { + for _, tag := range s.Tag { + if tag.Name == spec.Tag.Name && tag.CategoryID == spec.Tag.CategoryID { + BadRequest(w, "com.vmware.vapi.std.errors.already_exists") + return + } + } + id := newID("Tag") + spec.Tag.ID = id + s.Tag[id] = &spec.Tag + s.Association[id] = make(map[internal.AssociatedObject]bool) + OK(w, id) + } + case http.MethodGet: + var ids []string + for id := range s.Tag { + ids = append(ids, id) + } + OK(w, ids) + } +} + +func (s *handler) tagID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + + switch s.action(r) { + case "list-tags-for-category": + var ids []string + for _, tag := range s.Tag { + if tag.CategoryID == id { + ids = append(ids, tag.ID) + } + } + OK(w, ids) + return + } + + o, ok := s.Tag[id] + if !ok { + log.Printf("tag not found: %s", id) + http.NotFound(w, r) + return + } + + switch r.Method { + case http.MethodDelete: + delete(s.Tag, id) + delete(s.Association, id) + OK(w) + case http.MethodPatch: + var spec struct { + Tag tags.Tag `json:"update_spec"` + } + if s.decode(r, w, &spec) { + o.Patch(&spec.Tag) + OK(w) + } + case http.MethodGet: + OK(w, o) + } +} + +// TODO: support cardinality checks +func (s *handler) association(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + var spec struct { + internal.Association + TagIDs []string `json:"tag_ids,omitempty"` + ObjectIDs []internal.AssociatedObject `json:"object_ids,omitempty"` + } + if !s.decode(r, w, &spec) { + return + } + + switch s.action(r) { + case "list-attached-tags": + var ids []string + for id, objs := range s.Association { + if objs[*spec.ObjectID] { + ids = append(ids, id) + } + } + OK(w, ids) + + case "list-attached-objects-on-tags": + var res []tags.AttachedObjects + for _, id := range spec.TagIDs { + o := tags.AttachedObjects{TagID: id} + for i := range s.Association[id] { + o.ObjectIDs = append(o.ObjectIDs, i) + } + res = append(res, o) + } + OK(w, res) + + case "list-attached-tags-on-objects": + var res []tags.AttachedTags + for _, ref := range spec.ObjectIDs { + o := tags.AttachedTags{ObjectID: ref} + for id, objs := range s.Association { + if objs[ref] { + o.TagIDs = append(o.TagIDs, id) + } + } + res = append(res, o) + } + OK(w, res) + + case "attach-multiple-tags-to-object": + // TODO: add check if target (moref) exist or return 403 as per API behavior + + res := struct { + Success bool `json:"success"` + Errors tags.BatchErrors `json:"error_messages,omitempty"` + }{} + + for _, id := range spec.TagIDs { + if _, exists := s.Association[id]; !exists { + log.Printf("association tag not found: %s", id) + res.Errors = append(res.Errors, tags.BatchError{ + Type: "cis.tagging.objectNotFound.error", + Message: fmt.Sprintf("Tagging object %s not found", id), + }) + } else { + s.Association[id][*spec.ObjectID] = true + } + } + + if len(res.Errors) == 0 { + res.Success = true + } + OK(w, res) + + case "detach-multiple-tags-from-object": + // TODO: add check if target (moref) exist or return 403 as per API behavior + + res := struct { + Success bool `json:"success"` + Errors tags.BatchErrors `json:"error_messages,omitempty"` + }{} + + for _, id := range spec.TagIDs { + if _, exists := s.Association[id]; !exists { + log.Printf("association tag not found: %s", id) + res.Errors = append(res.Errors, tags.BatchError{ + Type: "cis.tagging.objectNotFound.error", + Message: fmt.Sprintf("Tagging object %s not found", id), + }) + } else { + s.Association[id][*spec.ObjectID] = false + } + } + + if len(res.Errors) == 0 { + res.Success = true + } + OK(w, res) + } +} + +func (s *handler) associationID(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := s.id(r) + if _, exists := s.Association[id]; !exists { + log.Printf("association tag not found: %s", id) + http.NotFound(w, r) + return + } + + var spec internal.Association + var specs struct { + ObjectIDs []internal.AssociatedObject `json:"object_ids"` + } + switch s.action(r) { + case "attach", "detach", "list-attached-objects": + if !s.decode(r, w, &spec) { + return + } + case "attach-tag-to-multiple-objects": + if !s.decode(r, w, &specs) { + return + } + } + + switch s.action(r) { + case "attach": + s.Association[id][*spec.ObjectID] = true + OK(w) + case "detach": + delete(s.Association[id], *spec.ObjectID) + OK(w) + case "list-attached-objects": + var ids []internal.AssociatedObject + for id := range s.Association[id] { + ids = append(ids, id) + } + OK(w, ids) + case "attach-tag-to-multiple-objects": + for _, obj := range specs.ObjectIDs { + s.Association[id][obj] = true + } + OK(w) + } +} + +func (s *handler) library(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodPost: + var spec struct { + Library library.Library `json:"create_spec"` + Find library.Find `json:"spec"` + } + if !s.decode(r, w, &spec) { + return + } + + switch s.action(r) { + case "find": + var ids []string + for _, l := range s.Library { + if spec.Find.Type != "" { + if spec.Find.Type != l.Library.Type { + continue + } + } + if spec.Find.Name != "" { + if !strings.EqualFold(l.Library.Name, spec.Find.Name) { + continue + } + } + ids = append(ids, l.ID) + } + OK(w, ids) + case "": + if !s.isValidSecurityPolicy(spec.Library.SecurityPolicyID) { + http.NotFound(w, r) + return + } + + id := uuid.New().String() + spec.Library.ID = id + spec.Library.ServerGUID = uuid.New().String() + spec.Library.CreationTime = types.NewTime(time.Now()) + spec.Library.LastModifiedTime = types.NewTime(time.Now()) + spec.Library.UnsetSecurityPolicyID = spec.Library.SecurityPolicyID == "" + dir := libraryPath(&spec.Library, "") + if err := os.Mkdir(dir, 0750); err != nil { + s.error(w, err) + return + } + s.Library[id] = &content{ + Library: &spec.Library, + Item: make(map[string]*item), + Subs: make(map[string]*library.Subscriber), + VMTX: make(map[string]*types.ManagedObjectReference), + } + + pub := spec.Library.Publication + if pub != nil && pub.Published != nil && *pub.Published { + // Generate PublishURL as real vCenter does + pub.PublishURL = (&url.URL{ + Scheme: s.URL.Scheme, + Host: s.URL.Host, + Path: "/cls/vcsp/lib/" + id, + }).String() + } + + sub := spec.Library.Subscription + if sub != nil { + // Share the published Item map + pid := path.Base(sub.SubscriptionURL) + if p, ok := s.Library[pid]; ok { + s.Library[id].Item = p.Item + } + } + + spec.Library.StateInfo = &library.StateInfo{State: "ACTIVE"} + + OK(w, id) + } + case http.MethodGet: + var ids []string + for id := range s.Library { + ids = append(ids, id) + } + OK(w, ids) + } +} + +func (content *content) cached(val bool) { + for _, item := range content.Item { + item.cached(val) + } +} + +func (item *item) cached(val bool) { + item.Cached = val + for _, file := range item.File { + file.Cached = types.NewBool(val) + } +} + +func (s *handler) publish(w http.ResponseWriter, r *http.Request, sids []internal.SubscriptionDestination, l *content, vmtx *item) bool { + var ids []string + if len(sids) == 0 { + for sid := range l.Subs { + ids = append(ids, sid) + } + } else { + for _, dst := range sids { + ids = append(ids, dst.ID) + } + } + + for _, sid := range ids { + sub, ok := l.Subs[sid] + if !ok { + log.Printf("library subscription not found: %s", sid) + http.NotFound(w, r) + return false + } + + slib := s.Library[sub.LibraryID] + if slib.VMTX[vmtx.ID] != nil { + return true // already cloned + } + + ds := &vcenter.DiskStorage{Datastore: l.Library.Storage[0].DatastoreID} + ref, err := s.cloneVM(vmtx.Template.Value, vmtx.Name, sub.Placement, ds) + if err != nil { + s.error(w, err) + return false + } + + slib.VMTX[vmtx.ID] = ref + } + + return true +} + +func (s *handler) libraryID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + l, ok := s.Library[id] + if !ok { + log.Printf("library not found: %s", id) + http.NotFound(w, r) + return + } + + switch r.Method { + case http.MethodDelete: + p := libraryPath(l.Library, "") + if err := os.RemoveAll(p); err != nil { + s.error(w, err) + return + } + for _, item := range l.Item { + s.deleteVM(item.Template) + } + delete(s.Library, id) + OK(w) + case http.MethodPatch: + var spec struct { + Library library.Library `json:"update_spec"` + } + if s.decode(r, w, &spec) { + l.Patch(&spec.Library) + OK(w) + } + case http.MethodPost: + switch s.action(r) { + case "publish": + var spec internal.SubscriptionDestinationSpec + if !s.decode(r, w, &spec) { + return + } + for _, item := range l.Item { + if item.Type != library.ItemTypeVMTX { + continue + } + if !s.publish(w, r, spec.Subscriptions, l, item) { + return + } + } + OK(w) + case "sync": + if l.Type == "SUBSCRIBED" { + l.LastSyncTime = types.NewTime(time.Now()) + l.cached(true) + OK(w) + } else { + http.NotFound(w, r) + } + case "evict": + l.cached(false) + OK(w) + } + case http.MethodGet: + OK(w, l) + } +} + +func (s *handler) subscriptions(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodGet { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := r.URL.Query().Get("library") + l, ok := s.Library[id] + if !ok { + log.Printf("library not found: %s", id) + http.NotFound(w, r) + return + } + + var res []library.SubscriberSummary + for sid, slib := range l.Subs { + res = append(res, library.SubscriberSummary{ + LibraryID: slib.LibraryID, + LibraryName: slib.LibraryName, + SubscriptionID: sid, + LibraryVcenterHostname: "", + }) + } + OK(w, res) +} + +func (s *handler) subscriptionsID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + l, ok := s.Library[id] + if !ok { + log.Printf("library not found: %s", id) + http.NotFound(w, r) + return + } + + switch s.action(r) { + case "get": + var dst internal.SubscriptionDestination + if !s.decode(r, w, &dst) { + return + } + + sub, ok := l.Subs[dst.ID] + if !ok { + log.Printf("library subscription not found: %s", dst.ID) + http.NotFound(w, r) + return + } + + OK(w, sub) + case "delete": + var dst internal.SubscriptionDestination + if !s.decode(r, w, &dst) { + return + } + + delete(l.Subs, dst.ID) + + OK(w) + case "create", "": + var spec struct { + Sub struct { + SubscriberLibrary library.SubscriberLibrary `json:"subscribed_library"` + } `json:"spec"` + } + if !s.decode(r, w, &spec) { + return + } + + sub := spec.Sub.SubscriberLibrary + slib, ok := s.Library[sub.LibraryID] + if !ok { + log.Printf("library not found: %s", sub.LibraryID) + http.NotFound(w, r) + return + } + + id := uuid.New().String() + l.Subs[id] = &library.Subscriber{ + LibraryID: slib.ID, + LibraryName: slib.Name, + LibraryLocation: sub.Target, + Placement: sub.Placement, + Vcenter: sub.Vcenter, + } + + OK(w, id) + } +} + +func (s *handler) libraryItem(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodPost: + var spec struct { + Item library.Item `json:"create_spec"` + Find library.FindItem `json:"spec"` + } + if !s.decode(r, w, &spec) { + return + } + + switch s.action(r) { + case "find": + var ids []string + for _, l := range s.Library { + if spec.Find.LibraryID != "" { + if spec.Find.LibraryID != l.ID { + continue + } + } + for _, i := range l.Item { + if spec.Find.Name != "" { + if spec.Find.Name != i.Name { + continue + } + } + if spec.Find.Type != "" { + if spec.Find.Type != i.Type { + continue + } + } + ids = append(ids, i.ID) + } + } + OK(w, ids) + case "create", "": + id := spec.Item.LibraryID + l, ok := s.Library[id] + if !ok { + log.Printf("library not found: %s", id) + http.NotFound(w, r) + return + } + if l.Type == "SUBSCRIBED" { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_element_type") + return + } + for _, item := range l.Item { + if item.Name == spec.Item.Name { + BadRequest(w, "com.vmware.vapi.std.errors.already_exists") + return + } + } + id = uuid.New().String() + spec.Item.ID = id + spec.Item.CreationTime = types.NewTime(time.Now()) + spec.Item.LastModifiedTime = types.NewTime(time.Now()) + if l.SecurityPolicyID != "" { + // TODO: verify signed items + spec.Item.SecurityCompliance = types.NewBool(false) + spec.Item.CertificateVerification = &library.ItemCertificateVerification{ + Status: "NOT_AVAILABLE", + } + } + l.Item[id] = &item{Item: &spec.Item} + OK(w, id) + } + case http.MethodGet: + id := r.URL.Query().Get("library_id") + l, ok := s.Library[id] + if !ok { + log.Printf("library not found: %s", id) + http.NotFound(w, r) + return + } + + var ids []string + for id := range l.Item { + ids = append(ids, id) + } + OK(w, ids) + } +} + +func (s *handler) libraryItemID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + lid := r.URL.Query().Get("library_id") + if lid == "" { + if l := s.itemLibrary(id); l != nil { + lid = l.ID + } + } + l, ok := s.Library[lid] + if !ok { + log.Printf("library not found: %q", lid) + http.NotFound(w, r) + return + } + item, ok := l.Item[id] + if !ok { + log.Printf("library item not found: %q", id) + http.NotFound(w, r) + return + } + + switch r.Method { + case http.MethodDelete: + p := libraryPath(l.Library, id) + if err := os.RemoveAll(p); err != nil { + s.error(w, err) + return + } + s.deleteVM(l.Item[item.ID].Template) + delete(l.Item, item.ID) + OK(w) + case http.MethodPatch: + var spec struct { + library.Item `json:"update_spec"` + } + if s.decode(r, w, &spec) { + item.Patch(&spec.Item) + OK(w) + } + case http.MethodPost: + switch s.action(r) { + case "copy": + var spec struct { + library.Item `json:"destination_create_spec"` + } + if !s.decode(r, w, &spec) { + return + } + + l, ok = s.Library[spec.LibraryID] + if !ok { + log.Printf("library not found: %q", spec.LibraryID) + http.NotFound(w, r) + return + } + if spec.Name == "" { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + } + + id := uuid.New().String() + nitem := item.cp() + nitem.ID = id + nitem.LibraryID = spec.LibraryID + l.Item[id] = nitem + + OK(w, id) + case "sync": + if l.Type == "SUBSCRIBED" || l.Publication != nil { + item.LastSyncTime = types.NewTime(time.Now()) + item.cached(true) + OK(w) + } else { + http.NotFound(w, r) + } + case "publish": + var spec internal.SubscriptionDestinationSpec + if s.decode(r, w, &spec) { + if s.publish(w, r, spec.Subscriptions, l, item) { + OK(w) + } + } + case "evict": + item.cached(false) + OK(w, id) + } + case http.MethodGet: + OK(w, item) + } +} + +func (s *handler) libraryItemByID(id string) (*content, *item) { + for _, l := range s.Library { + if item, ok := l.Item[id]; ok { + return l, item + } + } + + log.Printf("library for item %q not found", id) + + return nil, nil +} + +func (s *handler) libraryItemStorageByID(id string) ([]library.Storage, bool) { + lib, item := s.libraryItemByID(id) + if item == nil { + return nil, false + } + + storage := make([]library.Storage, len(item.File)) + + for i, file := range item.File { + storage[i] = library.Storage{ + StorageBacking: lib.Storage[0], + StorageURIs: []string{ + path.Join(libraryPath(lib.Library, id), file.Name), + }, + Name: file.Name, + Version: file.Version, + } + if file.Checksum != nil { + storage[i].Checksum = *file.Checksum + } + if file.Size != nil { + storage[i].Size = *file.Size + } + if file.Cached != nil { + storage[i].Cached = *file.Cached + } + } + + return storage, true +} + +func (s *handler) libraryItemStorage(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodGet { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := r.URL.Query().Get("library_item_id") + storage, ok := s.libraryItemStorageByID(id) + if !ok { + http.NotFound(w, r) + return + } + + OK(w, storage) +} + +func (s *handler) libraryItemStorageID(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := s.id(r) + storage, ok := s.libraryItemStorageByID(id) + if !ok { + http.NotFound(w, r) + return + } + + var spec struct { + Name string `json:"file_name"` + } + + if s.decode(r, w, &spec) { + for _, file := range storage { + if file.Name == spec.Name { + OK(w, []library.Storage{file}) + return + } + } + http.NotFound(w, r) + } +} + +func (s *handler) libraryItemUpdateSession(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodGet: + var ids []string + for id := range s.Update { + ids = append(ids, id) + } + OK(w, ids) + case http.MethodPost: + var spec struct { + Session library.Session `json:"create_spec"` + } + if !s.decode(r, w, &spec) { + return + } + + switch s.action(r) { + case "create", "": + lib := s.itemLibrary(spec.Session.LibraryItemID) + if lib == nil { + log.Printf("library for item %q not found", spec.Session.LibraryItemID) + http.NotFound(w, r) + return + } + session := &library.Session{ + ID: uuid.New().String(), + LibraryItemID: spec.Session.LibraryItemID, + LibraryItemContentVersion: "1", + ClientProgress: 0, + State: "ACTIVE", + ExpirationTime: types.NewTime(time.Now().Add(time.Hour)), + } + s.Update[session.ID] = update{ + WaitGroup: new(sync.WaitGroup), + Session: session, + Library: lib, + File: make(map[string]*library.UpdateFile), + } + OK(w, session.ID) + } + } +} + +func (s *handler) libraryItemUpdateSessionID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + up, ok := s.Update[id] + if !ok { + log.Printf("update session not found: %s", id) + http.NotFound(w, r) + return + } + + session := up.Session + done := func(state string) { + if up.State != "ERROR" { + up.State = state + } + go time.AfterFunc(session.ExpirationTime.Sub(time.Now()), func() { + s.Lock() + delete(s.Update, id) + s.Unlock() + }) + } + + switch r.Method { + case http.MethodGet: + OK(w, session) + case http.MethodPost: + switch s.action(r) { + case "cancel": + done("CANCELED") + case "complete": + go func() { + up.Wait() // wait for any PULL sources to complete + done("DONE") + }() + case "fail": + done("ERROR") + case "keep-alive": + session.ExpirationTime = types.NewTime(time.Now().Add(time.Hour)) + } + OK(w) + case http.MethodDelete: + delete(s.Update, id) + OK(w) + } +} + +func (s *handler) libraryItemProbe(endpoint library.TransferEndpoint) *library.ProbeResult { + p := &library.ProbeResult{ + Status: "SUCCESS", + } + + result := func() *library.ProbeResult { + for i, m := range p.ErrorMessages { + p.ErrorMessages[i].DefaultMessage = fmt.Sprintf(m.DefaultMessage, m.Args[0]) + } + return p + } + + u, err := url.Parse(endpoint.URI) + if err != nil { + p.Status = "INVALID_URL" + p.ErrorMessages = []rest.LocalizableMessage{{ + Args: []string{endpoint.URI}, + ID: "com.vmware.vdcs.cls-main.invalid_url_format", + DefaultMessage: "Invalid URL format for %s", + }} + return result() + } + + if u.Scheme != "http" && u.Scheme != "https" { + p.Status = "INVALID_URL" + p.ErrorMessages = []rest.LocalizableMessage{{ + Args: []string{endpoint.URI}, + ID: "com.vmware.vdcs.cls-main.file_probe_unsupported_uri_scheme", + DefaultMessage: "The specified URI %s is not supported", + }} + return result() + } + + res, err := http.Head(endpoint.URI) + if err != nil { + id := "com.vmware.vdcs.cls-main.http_request_error" + p.Status = "INVALID_URL" + + if soap.IsCertificateUntrusted(err) { + var info object.HostCertificateInfo + _ = info.FromURL(u, nil) + + id = "com.vmware.vdcs.cls-main.http_request_error_peer_not_authenticated" + p.Status = "CERTIFICATE_ERROR" + p.SSLThumbprint = info.ThumbprintSHA1 + } + + p.ErrorMessages = []rest.LocalizableMessage{{ + Args: []string{err.Error()}, + ID: id, + DefaultMessage: "HTTP request error: %s", + }} + + return result() + } + _ = res.Body.Close() + + if res.TLS != nil { + p.SSLThumbprint = soap.ThumbprintSHA1(res.TLS.PeerCertificates[0]) + } + + return result() +} + +func (s *handler) libraryItemUpdateSessionFile(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodPost: + switch s.action(r) { + case "probe": + var spec struct { + SourceEndpoint library.TransferEndpoint `json:"source_endpoint"` + } + if s.decode(r, w, &spec) { + res := s.libraryItemProbe(spec.SourceEndpoint) + OK(w, res) + } + default: + http.NotFound(w, r) + } + return + case http.MethodGet: + default: + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := r.URL.Query().Get("update_session_id") + up, ok := s.Update[id] + if !ok { + log.Printf("update session not found: %s", id) + http.NotFound(w, r) + return + } + + var files []*library.UpdateFile + for _, f := range up.File { + files = append(files, f) + } + OK(w, files) +} + +func (s *handler) pullSource(up update, info *library.UpdateFile) { + defer up.Done() + done := func(err error) { + s.Lock() + info.Status = "READY" + if err != nil { + log.Printf("PULL %s: %s", info.SourceEndpoint.URI, err) + info.Status = "ERROR" + info.ErrorMessage = &rest.LocalizableMessage{DefaultMessage: err.Error()} + up.State = info.Status + up.ErrorMessage = info.ErrorMessage + } + s.Unlock() + } + + c := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + }, + } + + res, err := c.Get(info.SourceEndpoint.URI) + if err != nil { + done(err) + return + } + + err = s.libraryItemFileCreate(&up, info.Name, res.Body, info.Checksum) + done(err) +} + +func hasChecksum(c *library.Checksum) bool { + return c != nil && c.Checksum != "" +} + +var checksum = map[string]func() hash.Hash{ + "MD5": md5.New, + "SHA1": sha1.New, + "SHA256": sha256.New, + "SHA512": sha512.New, +} + +func (s *handler) libraryItemUpdateSessionFileID(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := s.id(r) + up, ok := s.Update[id] + if !ok { + log.Printf("update session not found: %s", id) + http.NotFound(w, r) + return + } + + switch s.action(r) { + case "add": + var spec struct { + File library.UpdateFile `json:"file_spec"` + } + if s.decode(r, w, &spec) { + id = uuid.New().String() + info := &library.UpdateFile{ + Name: spec.File.Name, + Checksum: spec.File.Checksum, + SourceType: spec.File.SourceType, + Status: "WAITING_FOR_TRANSFER", + BytesTransferred: 0, + } + switch info.SourceType { + case "PUSH": + u := url.URL{ + Scheme: s.URL.Scheme, + Host: s.URL.Host, + Path: path.Join(rest.Path, internal.LibraryItemFileData, id, info.Name), + } + info.UploadEndpoint = &library.TransferEndpoint{URI: u.String()} + case "PULL": + if hasChecksum(info.Checksum) && checksum[info.Checksum.Algorithm] == nil { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + return + } + info.SourceEndpoint = spec.File.SourceEndpoint + info.Status = "TRANSFERRING" + up.Add(1) + go s.pullSource(up, info) + } + up.File[id] = info + OK(w, info) + } + case "get": + var spec struct { + File string `json:"file_name"` + } + if s.decode(r, w, &spec) { + for _, f := range up.File { + if f.Name == spec.File { + OK(w, f) + return + } + } + } + case "remove": + if up.State != "ACTIVE" { + s.error(w, fmt.Errorf("removeFile not allowed in state %s", up.State)) + return + } + delete(s.Update, id) + OK(w) + case "validate": + if up.State != "ACTIVE" { + BadRequest(w, "com.vmware.vapi.std.errors.not_allowed_in_current_state") + return + } + var res library.UpdateFileValidation + // TODO check missing_files, validate .ovf + OK(w, res) + } +} + +func (s *handler) libraryItemDownloadSession(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodGet: + var ids []string + for id := range s.Download { + ids = append(ids, id) + } + OK(w, ids) + case http.MethodPost: + var spec struct { + Session library.Session `json:"create_spec"` + } + if !s.decode(r, w, &spec) { + return + } + + switch s.action(r) { + case "create", "": + lib, item := s.libraryItemByID(spec.Session.LibraryItemID) + if item == nil { + http.NotFound(w, r) + return + } + + session := &library.Session{ + ID: uuid.New().String(), + LibraryItemID: spec.Session.LibraryItemID, + LibraryItemContentVersion: "1", + ClientProgress: 0, + State: "ACTIVE", + ExpirationTime: types.NewTime(time.Now().Add(time.Hour)), + } + s.Download[session.ID] = download{ + Session: session, + Library: lib.Library, + File: make(map[string]*library.DownloadFile), + } + for _, file := range item.File { + s.Download[session.ID].File[file.Name] = &library.DownloadFile{ + Name: file.Name, + Status: "UNPREPARED", + } + } + OK(w, session.ID) + } + } +} + +func (s *handler) libraryItemDownloadSessionID(w http.ResponseWriter, r *http.Request) { + id := s.id(r) + up, ok := s.Download[id] + if !ok { + log.Printf("download session not found: %s", id) + http.NotFound(w, r) + return + } + + session := up.Session + switch r.Method { + case http.MethodGet: + OK(w, session) + case http.MethodPost: + switch s.action(r) { + case "cancel", "complete", "fail": + delete(s.Download, id) // TODO: fully mock VC's behavior + case "keep-alive": + session.ExpirationTime = types.NewTime(time.Now().Add(time.Hour)) + } + OK(w) + case http.MethodDelete: + delete(s.Download, id) + OK(w) + } +} + +func (s *handler) libraryItemDownloadSessionFile(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodGet { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := r.URL.Query().Get("download_session_id") + dl, ok := s.Download[id] + if !ok { + log.Printf("download session not found: %s", id) + http.NotFound(w, r) + return + } + + var files []*library.DownloadFile + for _, f := range dl.File { + files = append(files, f) + } + OK(w, files) +} + +func (s *handler) libraryItemDownloadSessionFileID(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := s.id(r) + dl, ok := s.Download[id] + if !ok { + log.Printf("download session not found: %s", id) + http.NotFound(w, r) + return + } + + var spec struct { + File string `json:"file_name"` + } + + switch s.action(r) { + case "prepare": + if s.decode(r, w, &spec) { + u := url.URL{ + Scheme: s.URL.Scheme, + Host: s.URL.Host, + Path: path.Join(rest.Path, internal.LibraryItemFileData, id, spec.File), + } + info := &library.DownloadFile{ + Name: spec.File, + Status: "PREPARED", + BytesTransferred: 0, + DownloadEndpoint: &library.TransferEndpoint{ + URI: u.String(), + }, + } + dl.File[spec.File] = info + OK(w, info) + } + case "get": + if s.decode(r, w, &spec) { + OK(w, dl.File[spec.File]) + } + } +} + +func (s *handler) itemLibrary(id string) *library.Library { + for _, l := range s.Library { + if _, ok := l.Item[id]; ok { + return l.Library + } + } + return nil +} + +func (s *handler) updateFileInfo(id string) *update { + for _, up := range s.Update { + for i := range up.File { + if i == id { + return &up + } + } + } + return nil +} + +// libraryPath returns the local Datastore fs path for a Library or Item if id is specified. +func libraryPath(l *library.Library, id string) string { + dsref := types.ManagedObjectReference{ + Type: "Datastore", + Value: l.Storage[0].DatastoreID, + } + ds := simulator.Map.Get(dsref).(*simulator.Datastore) + + return path.Join(append([]string{ds.Info.GetDatastoreInfo().Url, "contentlib-" + l.ID}, id)...) +} + +func (s *handler) libraryItemFileCreate(up *update, name string, body io.ReadCloser, cs *library.Checksum) error { + var in io.Reader = body + dir := libraryPath(up.Library, up.Session.LibraryItemID) + if err := os.MkdirAll(dir, 0750); err != nil { + return err + } + + if path.Ext(name) == ".ova" { + // All we need is the .ovf, vcsim has no use for .vmdk or .mf + r := tar.NewReader(body) + for { + h, err := r.Next() + if err != nil { + return err + } + + if path.Ext(h.Name) == ".ovf" { + name = h.Name + in = io.LimitReader(body, h.Size) + break + } + } + } + + file, err := os.Create(path.Join(dir, name)) + if err != nil { + return err + } + + var h hash.Hash + if hasChecksum(cs) { + h = checksum[cs.Algorithm]() + in = io.TeeReader(in, h) + } + + n, err := io.Copy(file, in) + _ = body.Close() + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + if h != nil { + sum := fmt.Sprintf("%x", h.Sum(nil)) + if sum != cs.Checksum { + return fmt.Errorf("checksum mismatch: actual=%s, expected=%s", sum, cs.Checksum) + } + } + + i := s.Library[up.Library.ID].Item[up.Session.LibraryItemID] + i.File = append(i.File, library.File{ + Cached: types.NewBool(true), + Name: name, + Size: types.NewInt64(n), + Version: "1", + }) + + return nil +} + +func (s *handler) libraryItemFileData(w http.ResponseWriter, r *http.Request) { + p := strings.Split(r.URL.Path, "/") + id, name := p[len(p)-2], p[len(p)-1] + + if r.Method == http.MethodGet { + dl, ok := s.Download[id] + if !ok { + log.Printf("library download not found: %s", id) + http.NotFound(w, r) + return + } + p := path.Join(libraryPath(dl.Library, dl.Session.LibraryItemID), name) + f, err := os.Open(p) + if err != nil { + s.error(w, err) + return + } + _, err = io.Copy(w, f) + if err != nil { + log.Printf("copy %s: %s", p, err) + } + _ = f.Close() + return + } + + if r.Method != http.MethodPut { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + up := s.updateFileInfo(id) + if up == nil { + log.Printf("library update not found: %s", id) + http.NotFound(w, r) + return + } + + err := s.libraryItemFileCreate(up, name, r.Body, nil) + if err != nil { + s.error(w, err) + } +} + +func (s *handler) libraryItemFile(w http.ResponseWriter, r *http.Request) { + id := r.URL.Query().Get("library_item_id") + for _, l := range s.Library { + if i, ok := l.Item[id]; ok { + OK(w, i.File) + return + } + } + http.NotFound(w, r) +} + +func (s *handler) libraryItemFileID(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + id := s.id(r) + var spec struct { + Name string `json:"name"` + } + if !s.decode(r, w, &spec) { + return + } + for _, l := range s.Library { + if i, ok := l.Item[id]; ok { + for _, f := range i.File { + if f.Name == spec.Name { + OK(w, f) + return + } + } + } + } + http.NotFound(w, r) +} + +func (i *item) cp() *item { + nitem := *i.Item + return &item{&nitem, i.File, i.Template} +} + +func (i *item) ovf() string { + for _, f := range i.File { + if strings.HasSuffix(f.Name, ".ovf") { + return f.Name + } + } + return "" +} + +func vmConfigSpec(ctx context.Context, c *vim25.Client, deploy vcenter.Deploy) (*types.VirtualMachineConfigSpec, error) { + if deploy.VmConfigSpec == nil { + return nil, nil + } + + b, err := base64.StdEncoding.DecodeString(deploy.VmConfigSpec.XML) + if err != nil { + return nil, err + } + + var spec *types.VirtualMachineConfigSpec + + dec := xml.NewDecoder(bytes.NewReader(b)) + dec.TypeFunc = c.Types + err = dec.Decode(&spec) + if err != nil { + return nil, err + } + + return spec, nil +} + +func (s *handler) libraryDeploy(ctx context.Context, c *vim25.Client, lib *library.Library, item *item, deploy vcenter.Deploy) (*nfc.LeaseInfo, error) { + config, err := vmConfigSpec(ctx, c, deploy) + if err != nil { + return nil, err + } + + name := item.ovf() + desc, err := os.ReadFile(filepath.Join(libraryPath(lib, item.ID), name)) + if err != nil { + return nil, err + } + ds := types.ManagedObjectReference{Type: "Datastore", Value: deploy.DeploymentSpec.DefaultDatastoreID} + pool := types.ManagedObjectReference{Type: "ResourcePool", Value: deploy.Target.ResourcePoolID} + var folder, host *types.ManagedObjectReference + if deploy.Target.FolderID != "" { + folder = &types.ManagedObjectReference{Type: "Folder", Value: deploy.Target.FolderID} + } + if deploy.Target.HostID != "" { + host = &types.ManagedObjectReference{Type: "HostSystem", Value: deploy.Target.HostID} + } + + v, err := view.NewManager(c).CreateContainerView(ctx, c.ServiceContent.RootFolder, nil, true) + if err != nil { + return nil, err + } + defer func() { + _ = v.Destroy(ctx) + }() + refs, err := v.Find(ctx, []string{"Network"}, nil) + if err != nil { + return nil, err + } + + var network []types.OvfNetworkMapping + for _, net := range deploy.NetworkMappings { + for i := range refs { + if refs[i].Value == net.Value { + network = append(network, types.OvfNetworkMapping{Name: net.Key, Network: refs[i]}) + break + } + } + } + + if ds.Value == "" { + // Datastore is optional in the deploy spec, but not in OvfManager.CreateImportSpec + refs, err = v.Find(ctx, []string{"Datastore"}, nil) + if err != nil { + return nil, err + } + // TODO: consider StorageProfileID + ds = refs[0] + } + + cisp := types.OvfCreateImportSpecParams{ + DiskProvisioning: deploy.DeploymentSpec.StorageProvisioning, + EntityName: deploy.DeploymentSpec.Name, + NetworkMapping: network, + } + + for _, p := range deploy.AdditionalParams { + switch p.Type { + case vcenter.TypePropertyParams: + for _, prop := range p.Properties { + cisp.PropertyMapping = append(cisp.PropertyMapping, types.KeyValue{ + Key: prop.ID, + Value: prop.Value, + }) + } + case vcenter.TypeDeploymentOptionParams: + cisp.OvfManagerCommonParams.DeploymentOption = p.SelectedKey + } + } + + m := ovf.NewManager(c) + spec, err := m.CreateImportSpec(ctx, string(desc), pool, ds, cisp) + if err != nil { + return nil, err + } + if spec.Error != nil { + return nil, errors.New(spec.Error[0].LocalizedMessage) + } + + if config != nil { + if vmImportSpec, ok := spec.ImportSpec.(*types.VirtualMachineImportSpec); ok { + var configSpecs []types.BaseVirtualDeviceConfigSpec + + // Remove devices that we don't want to carry over from the import spec. Otherwise, since we + // just reconfigure the VM with the provided ConfigSpec later these devices won't be removed. + for _, d := range vmImportSpec.ConfigSpec.DeviceChange { + switch d.GetVirtualDeviceConfigSpec().Device.(type) { + case types.BaseVirtualEthernetCard: + default: + configSpecs = append(configSpecs, d) + } + } + vmImportSpec.ConfigSpec.DeviceChange = configSpecs + } + } + + req := types.ImportVApp{ + This: pool, + Spec: spec.ImportSpec, + Folder: folder, + Host: host, + } + res, err := methods.ImportVApp(ctx, c, &req) + if err != nil { + return nil, err + } + + lease := nfc.NewLease(c, res.Returnval) + info, err := lease.Wait(ctx, spec.FileItem) + if err != nil { + return nil, err + } + + if err = lease.Complete(ctx); err != nil { + return nil, err + } + + if config != nil { + if err = s.reconfigVM(info.Entity, *config); err != nil { + return nil, err + } + } + + return info, nil +} + +func (s *handler) libraryItemOVF(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + var req vcenter.OVF + if !s.decode(r, w, &req) { + return + } + + switch { + case req.Target.LibraryItemID != "": + case req.Target.LibraryID != "": + l, ok := s.Library[req.Target.LibraryID] + if !ok { + http.NotFound(w, r) + } + + id := uuid.New().String() + l.Item[id] = &item{ + Item: &library.Item{ + ID: id, + LibraryID: l.Library.ID, + Name: req.Spec.Name, + Description: &req.Spec.Description, + Type: library.ItemTypeOVF, + CreationTime: types.NewTime(time.Now()), + LastModifiedTime: types.NewTime(time.Now()), + }, + } + + res := vcenter.CreateResult{ + Succeeded: true, + ID: id, + } + OK(w, res) + default: + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + return + } +} + +func (s *handler) libraryItemOVFID(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + id := s.id(r) + ok := false + var lib *library.Library + var item *item + for _, l := range s.Library { + if l.Library.Type == "SUBSCRIBED" { + // Subscribers share the same Item map, we need the LOCAL library to find the .ovf on disk + continue + } + item, ok = l.Item[id] + if ok { + lib = l.Library + break + } + } + if !ok { + log.Printf("library item not found: %q", id) + http.NotFound(w, r) + return + } + + var spec struct { + vcenter.Deploy + } + if !s.decode(r, w, &spec) { + return + } + + switch s.action(r) { + case "deploy": + var d vcenter.Deployment + err := s.withClient(func(ctx context.Context, c *vim25.Client) error { + info, err := s.libraryDeploy(ctx, c, lib, item, spec.Deploy) + if err != nil { + return err + } + id := vcenter.ResourceID{ + Type: info.Entity.Type, + Value: info.Entity.Value, + } + d.Succeeded = true + d.ResourceID = &id + return nil + }) + if err != nil { + d.Error = &vcenter.DeploymentError{ + Errors: []vcenter.OVFError{{ + Category: "SERVER", + Error: &vcenter.Error{ + Class: "com.vmware.vapi.std.errors.error", + Messages: []rest.LocalizableMessage{ + { + DefaultMessage: err.Error(), + }, + }, + }, + }}, + } + } + OK(w, d) + case "filter": + res := vcenter.FilterResponse{ + Name: item.Name, + } + OK(w, res) + default: + http.NotFound(w, r) + } +} + +func (s *handler) deleteVM(ref *types.ManagedObjectReference) { + if ref == nil { + return + } + _ = s.withClient(func(ctx context.Context, c *vim25.Client) error { + _, _ = object.NewVirtualMachine(c, *ref).Destroy(ctx) + return nil + }) +} + +func (s *handler) reconfigVM(ref types.ManagedObjectReference, config types.VirtualMachineConfigSpec) error { + return s.withClient(func(ctx context.Context, c *vim25.Client) error { + vm := object.NewVirtualMachine(c, ref) + task, err := vm.Reconfigure(ctx, config) + if err != nil { + return err + } + return task.Wait(ctx) + }) +} + +func (s *handler) cloneVM(source string, name string, p *library.Placement, storage *vcenter.DiskStorage) (*types.ManagedObjectReference, error) { + var folder, pool, host, ds *types.ManagedObjectReference + if p.Folder != "" { + folder = &types.ManagedObjectReference{Type: "Folder", Value: p.Folder} + } + if p.ResourcePool != "" { + pool = &types.ManagedObjectReference{Type: "ResourcePool", Value: p.ResourcePool} + } + if p.Host != "" { + host = &types.ManagedObjectReference{Type: "HostSystem", Value: p.Host} + } + if storage != nil { + if storage.Datastore != "" { + ds = &types.ManagedObjectReference{Type: "Datastore", Value: storage.Datastore} + } + } + + spec := types.VirtualMachineCloneSpec{ + Template: true, + Location: types.VirtualMachineRelocateSpec{ + Folder: folder, + Pool: pool, + Host: host, + Datastore: ds, + }, + } + + var ref *types.ManagedObjectReference + + return ref, s.withClient(func(ctx context.Context, c *vim25.Client) error { + vm := object.NewVirtualMachine(c, types.ManagedObjectReference{Type: "VirtualMachine", Value: source}) + + task, err := vm.Clone(ctx, object.NewFolder(c, *folder), name, spec) + if err != nil { + return err + } + res, err := task.WaitForResult(ctx, nil) + if err != nil { + return err + } + ref = types.NewReference(res.Result.(types.ManagedObjectReference)) + return nil + }) +} + +func (s *handler) libraryItemCreateTemplate(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + var spec struct { + vcenter.Template `json:"spec"` + } + if !s.decode(r, w, &spec) { + return + } + + l, ok := s.Library[spec.Library] + if !ok { + http.NotFound(w, r) + return + } + + ds := &vcenter.DiskStorage{Datastore: l.Library.Storage[0].DatastoreID} + ref, err := s.cloneVM(spec.SourceVM, spec.Name, spec.Placement, ds) + if err != nil { + BadRequest(w, err.Error()) + return + } + + id := uuid.New().String() + l.Item[id] = &item{ + Item: &library.Item{ + ID: id, + LibraryID: l.Library.ID, + Name: spec.Name, + Type: library.ItemTypeVMTX, + CreationTime: types.NewTime(time.Now()), + LastModifiedTime: types.NewTime(time.Now()), + }, + Template: ref, + } + + OK(w, id) +} + +func (s *handler) libraryItemTemplateID(w http.ResponseWriter, r *http.Request) { + // Go's ServeMux doesn't support wildcard matching, hacking around that for now to support + // CheckOuts, e.g. "/vcenter/vm-template/library-items/{item}/check-outs/{vm}?action=check-in" + p := strings.TrimPrefix(r.URL.Path, rest.Path+internal.VCenterVMTXLibraryItem+"/") + route := strings.Split(p, "/") + if len(route) == 0 { + http.NotFound(w, r) + return + } + + id := route[0] + ok := false + + var item *item + for _, l := range s.Library { + item, ok = l.Item[id] + if ok { + break + } + } + if !ok { + log.Printf("library item not found: %q", id) + http.NotFound(w, r) + return + } + + if item.Type != library.ItemTypeVMTX { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + return + } + + if len(route) > 1 { + switch route[1] { + case "check-outs": + s.libraryItemCheckOuts(item, w, r) + return + default: + http.NotFound(w, r) + return + } + } + + if r.Method == http.MethodGet { + // TODO: add mock data + t := &vcenter.TemplateInfo{} + OK(w, t) + return + } + + var spec struct { + vcenter.DeployTemplate `json:"spec"` + } + if !s.decode(r, w, &spec) { + return + } + + switch r.URL.Query().Get("action") { + case "deploy": + p := spec.Placement + if p == nil { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + return + } + if p.Cluster == "" && p.Host == "" && p.ResourcePool == "" { + BadRequest(w, "com.vmware.vapi.std.errors.invalid_argument") + return + } + + item.cached(true) + ref, err := s.cloneVM(item.Template.Value, spec.Name, p, spec.DiskStorage) + if err != nil { + BadRequest(w, err.Error()) + return + } + OK(w, ref.Value) + default: + http.NotFound(w, r) + } +} + +func (s *handler) libraryItemCheckOuts(item *item, w http.ResponseWriter, r *http.Request) { + switch r.URL.Query().Get("action") { + case "check-out": + var spec struct { + *vcenter.CheckOut `json:"spec"` + } + if !s.decode(r, w, &spec) { + return + } + + ref, err := s.cloneVM(item.Template.Value, spec.Name, spec.Placement, nil) + if err != nil { + BadRequest(w, err.Error()) + return + } + OK(w, ref.Value) + case "check-in": + // TODO: increment ContentVersion + OK(w, "0") + default: + http.NotFound(w, r) + } +} + +// defaultSecurityPolicies generates the initial set of security policies always present on vCenter. +func defaultSecurityPolicies() []library.ContentSecurityPoliciesInfo { + policyID, _ := uuid.NewUUID() + return []library.ContentSecurityPoliciesInfo{ + { + ItemTypeRules: map[string]string{ + "ovf": "OVF_STRICT_VERIFICATION", + }, + Name: "OVF default policy", + Policy: policyID.String(), + }, + } +} + +func (s *handler) librarySecurityPolicies(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodGet: + StatusOK(w, s.Policies) + default: + w.WriteHeader(http.StatusMethodNotAllowed) + } +} + +func (s *handler) isValidSecurityPolicy(policy string) bool { + if policy == "" { + return true + } + + for _, p := range s.Policies { + if p.Policy == policy { + return true + } + } + return false +} + +func (s *handler) libraryTrustedCertificates(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case http.MethodGet: + var res struct { + Certificates []library.TrustedCertificateSummary `json:"certificates"` + } + for id, cert := range s.Trust { + res.Certificates = append(res.Certificates, library.TrustedCertificateSummary{ + TrustedCertificate: cert, + ID: id, + }) + } + + StatusOK(w, &res) + case http.MethodPost: + var info library.TrustedCertificate + if s.decode(r, w, &info) { + block, _ := pem.Decode([]byte(info.Text)) + if block == nil { + s.error(w, errors.New("invalid certificate")) + return + } + _, err := x509.ParseCertificate(block.Bytes) + if err != nil { + s.error(w, err) + return + } + + id := uuid.New().String() + for x, cert := range s.Trust { + if info.Text == cert.Text { + id = x // existing certificate + break + } + } + s.Trust[id] = info + + w.WriteHeader(http.StatusCreated) + } + default: + w.WriteHeader(http.StatusMethodNotAllowed) + } +} + +func (s *handler) libraryTrustedCertificatesID(w http.ResponseWriter, r *http.Request) { + id := path.Base(r.URL.Path) + cert, ok := s.Trust[id] + if !ok { + http.NotFound(w, r) + return + } + + switch r.Method { + case http.MethodGet: + StatusOK(w, &cert) + case http.MethodDelete: + delete(s.Trust, id) + default: + w.WriteHeader(http.StatusMethodNotAllowed) + } +} + +func (s *handler) debugEcho(w http.ResponseWriter, r *http.Request) { + r.Write(w) +} diff --git a/vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_ovf.go b/vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_ovf.go new file mode 100644 index 0000000000..71efc23abe --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_ovf.go @@ -0,0 +1,313 @@ +/* +Copyright (c) 2018 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vcenter + +import ( + "context" + "fmt" + "net/http" + + "github.com/vmware/govmomi/vapi/internal" + "github.com/vmware/govmomi/vapi/rest" + "github.com/vmware/govmomi/vim25/types" +) + +// AdditionalParams are additional OVF parameters which can be specified for a deployment target. +// This structure is a union where based on Type, only one of each commented section will be set. +type AdditionalParams struct { + Class string `json:"@class"` + Type string `json:"type"` + + // DeploymentOptionParams + SelectedKey string `json:"selected_key,omitempty"` + DeploymentOptions []DeploymentOption `json:"deployment_options,omitempty"` + + // ExtraConfigs + ExtraConfig []ExtraConfig `json:"extra_configs,omitempty"` + + // PropertyParams + Properties []Property `json:"properties,omitempty"` + + // SizeParams + ApproximateSparseDeploymentSize int64 `json:"approximate_sparse_deployment_size,omitempty"` + VariableDiskSize bool `json:"variable_disk_size,omitempty"` + ApproximateDownloadSize int64 `json:"approximate_download_size,omitempty"` + ApproximateFlatDeploymentSize int64 `json:"approximate_flat_deployment_size,omitempty"` + + // IpAllocationParams + SupportedAllocationScheme []string `json:"supported_allocation_scheme,omitempty"` + SupportedIPProtocol []string `json:"supported_ip_protocol,omitempty"` + SupportedIPAllocationPolicy []string `json:"supported_ip_allocation_policy,omitempty"` + IPAllocationPolicy string `json:"ip_allocation_policy,omitempty"` + IPProtocol string `json:"ip_protocol,omitempty"` + + // UnknownSections + UnknownSections []UnknownSection `json:"unknown_sections,omitempty"` +} + +const ( + ClassDeploymentOptionParams = "com.vmware.vcenter.ovf.deployment_option_params" + ClassPropertyParams = "com.vmware.vcenter.ovf.property_params" + TypeDeploymentOptionParams = "DeploymentOptionParams" + TypeExtraConfigParams = "ExtraConfigParams" + TypeIPAllocationParams = "IpAllocationParams" + TypePropertyParams = "PropertyParams" + TypeSizeParams = "SizeParams" +) + +// DeploymentOption contains the information about a deployment option as defined in the OVF specification +type DeploymentOption struct { + Key string `json:"key,omitempty"` + Label string `json:"label,omitempty"` + Description string `json:"description,omitempty"` + DefaultChoice bool `json:"default_choice,omitempty"` +} + +// ExtraConfig contains information about a vmw:ExtraConfig OVF element +type ExtraConfig struct { + Key string `json:"key,omitempty"` + Value string `json:"value,omitempty"` + VirtualSystemID string `json:"virtual_system_id,omitempty"` +} + +// Property contains information about a property in an OVF package +type Property struct { + Category string `json:"category,omitempty"` + ClassID string `json:"class_id,omitempty"` + Description string `json:"description,omitempty"` + ID string `json:"id,omitempty"` + InstanceID string `json:"instance_id,omitempty"` + Label string `json:"label,omitempty"` + Type string `json:"type,omitempty"` + UIOptional bool `json:"ui_optional,omitempty"` + Value string `json:"value,omitempty"` +} + +// UnknownSection contains information about an unknown section in an OVF package +type UnknownSection struct { + Tag string `json:"tag,omitempty"` + Info string `json:"info,omitempty"` +} + +// NetworkMapping specifies the target network to use for sections of type ovf:NetworkSection in the OVF descriptor +type NetworkMapping struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// StorageGroupMapping defines the storage deployment target and storage provisioning type for a section of type vmw:StorageGroupSection in the OVF descriptor +type StorageGroupMapping struct { + Type string `json:"type"` + StorageProfileID string `json:"storage_profile_id,omitempty"` + DatastoreID string `json:"datastore_id,omitempty"` + Provisioning string `json:"provisioning,omitempty"` +} + +// StorageMapping specifies the target storage to use for sections of type vmw:StorageGroupSection in the OVF descriptor +type StorageMapping struct { + Key string `json:"key"` + Value StorageGroupMapping `json:"value"` +} + +// VmConfigSpec defines the optional virtual machine configuration settings used when deploying an OVF template +type VmConfigSpec struct { + Provider string `json:"provider"` + XML string `json:"xml"` +} + +// DeploymentSpec is the deployment specification for the deployment +type DeploymentSpec struct { + Name string `json:"name,omitempty"` + Annotation string `json:"annotation,omitempty"` + AcceptAllEULA bool `json:"accept_all_EULA,omitempty"` + NetworkMappings []NetworkMapping `json:"network_mappings,omitempty"` + StorageMappings []StorageMapping `json:"storage_mappings,omitempty"` + StorageProvisioning string `json:"storage_provisioning,omitempty"` + StorageProfileID string `json:"storage_profile_id,omitempty"` + Locale string `json:"locale,omitempty"` + Flags []string `json:"flags,omitempty"` + AdditionalParams []AdditionalParams `json:"additional_parameters,omitempty"` + DefaultDatastoreID string `json:"default_datastore_id,omitempty"` + VmConfigSpec *VmConfigSpec `json:"vm_config_spec,omitempty"` +} + +// Target is the target for the deployment +type Target struct { + ResourcePoolID string `json:"resource_pool_id,omitempty"` + HostID string `json:"host_id,omitempty"` + FolderID string `json:"folder_id,omitempty"` +} + +// Deploy contains the information to start the deployment of a library OVF +type Deploy struct { + DeploymentSpec `json:"deployment_spec,omitempty"` + Target `json:"target,omitempty"` +} + +// Error is a SERVER error +type Error struct { + Class string `json:"@class,omitempty"` + Messages []rest.LocalizableMessage `json:"messages,omitempty"` +} + +// ParseIssue is a parse issue struct +type ParseIssue struct { + Category string `json:"@classcategory,omitempty"` + File string `json:"file,omitempty"` + LineNumber int64 `json:"line_number,omitempty"` + ColumnNumber int64 `json:"column_number,omitempty"` + Message rest.LocalizableMessage `json:"message,omitempty"` +} + +// OVFError is a list of errors from create or deploy +type OVFError struct { + Category string `json:"category,omitempty"` + Error *Error `json:"error,omitempty"` + Issues []ParseIssue `json:"issues,omitempty"` + Message *rest.LocalizableMessage `json:"message,omitempty"` +} + +// ResourceID is a managed object reference for a deployed resource. +type ResourceID struct { + Type string `json:"type,omitempty"` + Value string `json:"id,omitempty"` +} + +// DeploymentError is an error that occurs when deploying and OVF from +// a library item. +type DeploymentError struct { + Errors []OVFError `json:"errors,omitempty"` +} + +// Error implements the error interface +func (e *DeploymentError) Error() string { + msg := "" + if len(e.Errors) != 0 { + err := e.Errors[0] + if err.Message != nil { + msg = err.Message.DefaultMessage + } else if err.Error != nil && len(err.Error.Messages) != 0 { + msg = err.Error.Messages[0].DefaultMessage + } + } + if msg == "" { + msg = fmt.Sprintf("%#v", e) + } + return "deploy error: " + msg +} + +// LibraryTarget specifies a Library or Library item +type LibraryTarget struct { + LibraryID string `json:"library_id,omitempty"` + LibraryItemID string `json:"library_item_id,omitempty"` +} + +// CreateSpec info used to create an OVF package from a VM +type CreateSpec struct { + Description string `json:"description,omitempty"` + Name string `json:"name,omitempty"` + Flags []string `json:"flags,omitempty"` +} + +// OVF data used by CreateOVF +type OVF struct { + Spec CreateSpec `json:"create_spec"` + Source ResourceID `json:"source"` + Target LibraryTarget `json:"target"` +} + +// CreateResult used for decoded a CreateOVF response +type CreateResult struct { + Succeeded bool `json:"succeeded,omitempty"` + ID string `json:"ovf_library_item_id,omitempty"` + Error *DeploymentError `json:"error,omitempty"` +} + +// Deployment is the results from issuing a library OVF deployment +type Deployment struct { + Succeeded bool `json:"succeeded,omitempty"` + ResourceID *ResourceID `json:"resource_id,omitempty"` + Error *DeploymentError `json:"error,omitempty"` +} + +// FilterRequest contains the information to start a vcenter filter call +type FilterRequest struct { + Target `json:"target,omitempty"` +} + +// FilterResponse returns information from the vcenter filter call +type FilterResponse struct { + EULAs []string `json:"EULAs,omitempty"` + AdditionalParams []AdditionalParams `json:"additional_params,omitempty"` + Annotation string `json:"Annotation,omitempty"` + Name string `json:"name,omitempty"` + Networks []string `json:"Networks,omitempty"` + StorageGroups []string `json:"storage_groups,omitempty"` +} + +// Manager extends rest.Client, adding content library related methods. +type Manager struct { + *rest.Client +} + +// NewManager creates a new Manager instance with the given client. +func NewManager(client *rest.Client) *Manager { + return &Manager{ + Client: client, + } +} + +// CreateOVF creates a library OVF item in content library from an existing VM +func (c *Manager) CreateOVF(ctx context.Context, ovf OVF) (string, error) { + if ovf.Source.Type == "" { + ovf.Source.Type = "VirtualMachine" + } + url := c.Resource(internal.VCenterOVFLibraryItem) + var res CreateResult + err := c.Do(ctx, url.Request(http.MethodPost, ovf), &res) + if err != nil { + return "", err + } + if res.Succeeded { + return res.ID, nil + } + return "", res.Error +} + +// DeployLibraryItem deploys a library OVF +func (c *Manager) DeployLibraryItem(ctx context.Context, libraryItemID string, deploy Deploy) (*types.ManagedObjectReference, error) { + url := c.Resource(internal.VCenterOVFLibraryItem).WithID(libraryItemID).WithAction("deploy") + var res Deployment + err := c.Do(ctx, url.Request(http.MethodPost, deploy), &res) + if err != nil { + return nil, err + } + if res.Succeeded { + return &types.ManagedObjectReference{ + Type: res.ResourceID.Type, + Value: res.ResourceID.Value, + }, nil + } + return nil, res.Error +} + +// FilterLibraryItem deploys a library OVF +func (c *Manager) FilterLibraryItem(ctx context.Context, libraryItemID string, filter FilterRequest) (FilterResponse, error) { + url := c.Resource(internal.VCenterOVFLibraryItem).WithID(libraryItemID).WithAction("filter") + var res FilterResponse + return res, c.Do(ctx, url.Request(http.MethodPost, filter), &res) +} diff --git a/vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_vmtx.go b/vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_vmtx.go new file mode 100644 index 0000000000..fdb9b629c2 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/vcenter/vcenter_vmtx.go @@ -0,0 +1,337 @@ +/* +Copyright (c) 2019 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vcenter + +import ( + "context" + "crypto/sha1" + "fmt" + "log" + "net/http" + "path" + + "github.com/vmware/govmomi/vapi/internal" + "github.com/vmware/govmomi/vapi/library" + "github.com/vmware/govmomi/vim25/mo" + "github.com/vmware/govmomi/vim25/types" +) + +// vcenter vm template +// The vcenter.vm_template API provides structures and services that will let its client manage VMTX template in Content Library. +// http://vmware.github.io/vsphere-automation-sdk-rest/6.7.1/index.html#SVC_com.vmware.vcenter.vm_template.library_items + +// Template create spec +type Template struct { + Description string `json:"description,omitempty"` + DiskStorage *DiskStorage `json:"disk_storage,omitempty"` + DiskStorageOverrides []DiskStorageOverride `json:"disk_storage_overrides,omitempty"` + Library string `json:"library,omitempty"` + Name string `json:"name,omitempty"` + Placement *Placement `json:"placement,omitempty"` + SourceVM string `json:"source_vm,omitempty"` + VMHomeStorage *DiskStorage `json:"vm_home_storage,omitempty"` +} + +// CPU defines Cores and CPU count +type CPU struct { + CoresPerSocket int `json:"cores_per_socket,omitempty"` + Count int `json:"count,omitempty"` +} + +// DiskInfo defines disk capacity and storage info +type DiskInfo struct { + Capacity int `json:"capacity,omitempty"` + DiskStorage DiskStorage `json:"disk_storage,omitempty"` +} + +// Disks defines the disk information +type Disks struct { + Key string `json:"key"` + Value *DiskInfo `json:"value"` +} + +// Memory defines the memory size in MB +type Memory struct { + SizeMB int `json:"size_mib,omitempty"` +} + +// NicDetails defines the network adapter details +type NicDetails struct { + Network string `json:"network,omitempty"` + BackingType string `json:"backing_type,omitempty"` + MacType string `json:"mac_type,omitempty"` +} + +// Nics defines the network identifier +type Nics struct { + Key string `json:"key,omitempty"` + Value *NicDetails `json:"value,omitempty"` +} + +// TemplateInfo for a VM template contained in an existing library item +type TemplateInfo struct { + CPU CPU `json:"cpu,omitempty"` + Disks []Disks `json:"disks,omitempty"` + GuestOS string `json:"guest_OS,omitempty"` + Memory Memory `json:"memory,omitempty"` + Nics []Nics `json:"nics,omitempty"` + VMHomeStorage DiskStorage `json:"vm_home_storage,omitempty"` + VmTemplate string `json:"vm_template,omitempty"` +} + +// Placement information used to place the virtual machine template +type Placement = library.Placement + +// StoragePolicy for DiskStorage +type StoragePolicy struct { + Policy string `json:"policy,omitempty"` + Type string `json:"type"` +} + +// DiskStorage defines the storage specification for VM files +type DiskStorage struct { + Datastore string `json:"datastore,omitempty"` + StoragePolicy *StoragePolicy `json:"storage_policy,omitempty"` +} + +// DiskStorageOverride storage specification for individual disks in the virtual machine template +type DiskStorageOverride struct { + Key string `json:"key"` + Value DiskStorage `json:"value"` +} + +// GuestCustomization spec to apply to the deployed VM +type GuestCustomization struct { + Name string `json:"name,omitempty"` +} + +// HardwareCustomization spec which specifies updates to the deployed VM +type HardwareCustomization struct { + // TODO +} + +// DeployTemplate specification of how a library VM template clone should be deployed. +type DeployTemplate struct { + Description string `json:"description,omitempty"` + DiskStorage *DiskStorage `json:"disk_storage,omitempty"` + DiskStorageOverrides []DiskStorageOverride `json:"disk_storage_overrides,omitempty"` + GuestCustomization *GuestCustomization `json:"guest_customization,omitempty"` + HardwareCustomization *HardwareCustomization `json:"hardware_customization,omitempty"` + Name string `json:"name,omitempty"` + Placement *Placement `json:"placement,omitempty"` + PoweredOn bool `json:"powered_on"` + VMHomeStorage *DiskStorage `json:"vm_home_storage,omitempty"` +} + +// CheckOut specification +type CheckOut struct { + Name string `json:"name,omitempty"` + Placement *Placement `json:"placement,omitempty"` + PoweredOn bool `json:"powered_on,omitempty"` +} + +// CheckIn specification +type CheckIn struct { + Message string `json:"message"` +} + +// CreateTemplate creates a library VMTX item in content library from an existing VM +func (c *Manager) CreateTemplate(ctx context.Context, vmtx Template) (string, error) { + url := c.Resource(internal.VCenterVMTXLibraryItem) + var res string + spec := struct { + Template `json:"spec"` + }{vmtx} + return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) +} + +// GetLibraryTemplateInfo fetches the library template info using template library id +func (c *Manager) GetLibraryTemplateInfo(ctx context.Context, libraryItemID string) (*TemplateInfo, error) { + url := c.Resource(path.Join(internal.VCenterVMTXLibraryItem, libraryItemID)) + var res TemplateInfo + err := c.Do(ctx, url.Request(http.MethodGet), &res) + if err != nil { + return nil, err + } + return &res, nil +} + +// DeployTemplateLibraryItem deploys a VM as a copy of the source VM template contained in the given library item +func (c *Manager) DeployTemplateLibraryItem(ctx context.Context, libraryItemID string, deploy DeployTemplate) (*types.ManagedObjectReference, error) { + url := c.Resource(path.Join(internal.VCenterVMTXLibraryItem, libraryItemID)).WithParam("action", "deploy") + var res string + spec := struct { + DeployTemplate `json:"spec"` + }{deploy} + err := c.Do(ctx, url.Request(http.MethodPost, spec), &res) + if err != nil { + return nil, err + } + return &types.ManagedObjectReference{Type: "VirtualMachine", Value: res}, nil +} + +// CheckOut a library item containing a VM template. +func (c *Manager) CheckOut(ctx context.Context, libraryItemID string, checkout *CheckOut) (*types.ManagedObjectReference, error) { + url := c.Resource(path.Join(internal.VCenterVMTXLibraryItem, libraryItemID, "check-outs")).WithParam("action", "check-out") + var res string + spec := struct { + *CheckOut `json:"spec"` + }{checkout} + err := c.Do(ctx, url.Request(http.MethodPost, spec), &res) + if err != nil { + return nil, err + } + return &types.ManagedObjectReference{Type: "VirtualMachine", Value: res}, nil +} + +// CheckIn a VM into the library item. +func (c *Manager) CheckIn(ctx context.Context, libraryItemID string, vm mo.Reference, checkin *CheckIn) (string, error) { + p := path.Join(internal.VCenterVMTXLibraryItem, libraryItemID, "check-outs", vm.Reference().Value) + url := c.Resource(p).WithParam("action", "check-in") + var res string + spec := struct { + *CheckIn `json:"spec"` + }{checkin} + return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res) +} + +// TemplateLibrary params for synchronizing subscription library OVF items to VM Template items +type TemplateLibrary struct { + Source library.Library + Destination library.Library + Placement Target + Include func(library.Item, *library.Item) bool + SyncItem func(context.Context, library.Item, *Deploy, *Template) error +} + +func (c *Manager) includeTemplateLibraryItem(src library.Item, dst *library.Item) bool { + return dst == nil +} + +// SyncTemplateLibraryItem deploys an Library OVF item from which a VM template (vmtx) Library item is created. +// The deployed VM is deleted after being converted to a Library vmtx item. +func (c *Manager) SyncTemplateLibraryItem(ctx context.Context, item library.Item, deploy *Deploy, spec *Template) error { + destroy := false + if spec.SourceVM == "" { + ref, err := c.DeployLibraryItem(ctx, item.ID, *deploy) + if err != nil { + return err + } + + destroy = true + spec.SourceVM = ref.Value + } + + _, err := c.CreateTemplate(ctx, *spec) + + if destroy { + // Delete source VM regardless of CreateTemplate result + url := c.Resource("/vcenter/vm/" + spec.SourceVM) + derr := c.Do(ctx, url.Request(http.MethodDelete), nil) + if derr != nil { + if err == nil { + // Return Delete error if CreateTemplate was successful + return derr + } + // Return CreateTemplate error and just log Delete error + log.Printf("destroy %s: %s", spec.SourceVM, derr) + } + } + + return err +} + +func vmtxSourceName(l library.Library, item library.Item) string { + sum := sha1.Sum([]byte(path.Join(l.Name, item.Name))) + return fmt.Sprintf("vmtx-src-%x", sum) +} + +// SyncTemplateLibrary converts TemplateLibrary.Source OVF items to VM Template items within TemplateLibrary.Destination +// The optional TemplateLibrary.Include func can be used to filter which items are synced. +// By default all items that don't exist in the Destination library are synced. +// The optional TemplateLibrary.SyncItem func can be used to change how the item is synced, by default SyncTemplateLibraryItem is used. +func (c *Manager) SyncTemplateLibrary(ctx context.Context, l TemplateLibrary, items ...library.Item) error { + m := library.NewManager(c.Client) + var err error + if len(items) == 0 { + items, err = m.GetLibraryItems(ctx, l.Source.ID) + if err != nil { + return err + } + } + + templates, err := m.GetLibraryItems(ctx, l.Destination.ID) + if err != nil { + return err + } + + existing := make(map[string]*library.Item) + for i := range templates { + existing[templates[i].Name] = &templates[i] + } + + include := l.Include + if include == nil { + include = c.includeTemplateLibraryItem + } + + sync := l.SyncItem + if sync == nil { + sync = c.SyncTemplateLibraryItem + } + + for _, item := range items { + if item.Type != library.ItemTypeOVF { + continue + } + + // Deploy source VM from library ovf item + deploy := Deploy{ + DeploymentSpec: DeploymentSpec{ + Name: vmtxSourceName(l.Destination, item), + DefaultDatastoreID: l.Destination.Storage[0].DatastoreID, + AcceptAllEULA: true, + }, + Target: l.Placement, + } + + // Create library vmtx item from source VM + storage := &DiskStorage{ + Datastore: deploy.DeploymentSpec.DefaultDatastoreID, + } + spec := Template{ + Name: item.Name, + Library: l.Destination.ID, + DiskStorage: storage, + VMHomeStorage: storage, + Placement: &Placement{ + Folder: deploy.Target.FolderID, + ResourcePool: deploy.Target.ResourcePoolID, + }, + } + + if !l.Include(item, existing[item.Name]) { + continue + } + + if err = sync(ctx, item, &deploy, &spec); err != nil { + return err + } + } + + return nil +} diff --git a/vendor/github.com/vmware/govmomi/vapi/vm/dataset/dataset.go b/vendor/github.com/vmware/govmomi/vapi/vm/dataset/dataset.go new file mode 100644 index 0000000000..cb178d6fbf --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/vm/dataset/dataset.go @@ -0,0 +1,200 @@ +/* +Copyright (c) 2023-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dataset + +import ( + "context" + "net/http" + "net/url" + "path" + "strconv" + + "github.com/vmware/govmomi/vapi/rest" + "github.com/vmware/govmomi/vapi/vm/internal" +) + +// Manager extends rest.Client, adding data set related methods. +// +// Data sets functionality was introduced in vSphere 8.0, +// and requires the VM to have virtual hardware version 20 or newer. +// +// See the VMware Guest SDK Programming Guide for details on using data sets +// from within the guest OS of a VM. +// +// See https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/vm/data_sets/ +type Manager struct { + *rest.Client +} + +// NewManager creates a new Manager instance with the given client. +func NewManager(client *rest.Client) *Manager { + return &Manager{ + Client: client, + } +} + +// Access permission to the entries of a data set. +type Access string + +const ( + AccessNone = Access("NONE") + AccessReadOnly = Access("READ_ONLY") + AccessReadWrite = Access("READ_WRITE") +) + +// Describes a data set to be created. +type CreateSpec struct { + // Name should take the form "com.company.project" to avoid conflict with other uses. + // Must not be empty. + Name string `json:"name"` + + // Description of the data set. + Description string `json:"description"` + + // Host controls access to the data set entries by the ESXi host and the vCenter. + // For example, if the host access is set to NONE, the entries of this data set + // will not be accessible through the vCenter API. + // Must not be empty. + Host Access `json:"host"` + + // Guest controls access to the data set entries by the guest OS of the VM (i.e. in-guest APIs). + // For example, if the guest access is set to READ_ONLY, it will be forbidden + // to create, delete, and update entries in this data set via the VMware Guest SDK. + // Must not be empty. + Guest Access `json:"guest"` + + // OmitFromSnapshotAndClone controls whether the data set is included in snapshots and clones of the VM. + // When a VM is reverted to a snapshot, any data set with OmitFromSnapshotAndClone=true will be destroyed. + // Default is false. + OmitFromSnapshotAndClone *bool `json:"omit_from_snapshot_and_clone,omitempty"` +} + +// Describes modifications to a data set. +type UpdateSpec struct { + Description *string `json:"description,omitempty"` + Host *Access `json:"host,omitempty"` + Guest *Access `json:"guest,omitempty"` + OmitFromSnapshotAndClone *bool `json:"omit_from_snapshot_and_clone,omitempty"` +} + +// Data set information. +type Info struct { + Name string `json:"name"` + Description string `json:"description"` + Host Access `json:"host"` + Guest Access `json:"guest"` + Used int `json:"used"` + OmitFromSnapshotAndClone bool `json:"omit_from_snapshot_and_clone"` +} + +// Brief data set information. +type Summary struct { + DataSet string `json:"data_set"` + Name string `json:"name"` + Description string `json:"description"` +} + +const dataSetsPathField = "data-sets" + +func dataSetPath(vm string, dataSet string) string { + return path.Join(internal.VCenterVMPath, url.PathEscape(vm), dataSetsPathField, url.PathEscape(dataSet)) +} + +func dataSetsPath(vm string) string { + return path.Join(internal.VCenterVMPath, url.PathEscape(vm), dataSetsPathField) +} + +const entriesPathField = "entries" + +func entryPath(vm string, dataSet string, key string) string { + return path.Join(internal.VCenterVMPath, url.PathEscape(vm), dataSetsPathField, url.PathEscape(dataSet), entriesPathField, url.PathEscape(key)) +} + +func entriesPath(vm string, dataSet string) string { + return path.Join(internal.VCenterVMPath, url.PathEscape(vm), dataSetsPathField, url.PathEscape(dataSet), entriesPathField) +} + +// CreateDataSet creates a data set associated with the given virtual machine. +func (c *Manager) CreateDataSet(ctx context.Context, vm string, spec *CreateSpec) (string, error) { + url := c.Resource(dataSetsPath(vm)) + var res string + err := c.Do(ctx, url.Request(http.MethodPost, spec), &res) + return res, err +} + +// DeleteDataSet deletes an existing data set from the given virtual machine. +// The operation will fail if the data set is not empty. +// Set the force flag to delete a non-empty data set. +func (c *Manager) DeleteDataSet(ctx context.Context, vm string, dataSet string, force bool) error { + url := c.Resource(dataSetPath(vm, dataSet)) + if force { + url.WithParam("force", strconv.FormatBool(force)) + } + return c.Do(ctx, url.Request(http.MethodDelete), nil) +} + +// GetDataSet retrieves information about the given data set. +func (c *Manager) GetDataSet(ctx context.Context, vm string, dataSet string) (*Info, error) { + url := c.Resource(dataSetPath(vm, dataSet)) + var res Info + err := c.Do(ctx, url.Request(http.MethodGet), &res) + return &res, err +} + +// UpdateDataSet modifies the given data set. +func (c *Manager) UpdateDataSet(ctx context.Context, vm string, dataSet string, spec *UpdateSpec) error { + url := c.Resource(dataSetPath(vm, dataSet)) + return c.Do(ctx, url.Request(http.MethodPatch, spec), nil) +} + +// ListDataSets returns a list of brief descriptions of the data sets on with the given virtual machine. +func (c *Manager) ListDataSets(ctx context.Context, vm string) ([]Summary, error) { + url := c.Resource(dataSetsPath(vm)) + var res []Summary + err := c.Do(ctx, url.Request(http.MethodGet), &res) + return res, err +} + +// SetEntry creates or updates an entry in the given data set. +// If an entry with the given key already exists, it will be overwritten. +// The key can be at most 4096 bytes. The value can be at most 1MB. +func (c *Manager) SetEntry(ctx context.Context, vm string, dataSet string, key string, value string) error { + url := c.Resource(entryPath(vm, dataSet, key)) + return c.Do(ctx, url.Request(http.MethodPut, value), nil) +} + +// GetEntry returns the value of the data set entry with the given key. +func (c *Manager) GetEntry(ctx context.Context, vm string, dataSet string, key string) (string, error) { + url := c.Resource(entryPath(vm, dataSet, key)) + var res string + err := c.Do(ctx, url.Request(http.MethodGet), &res) + return res, err +} + +// DeleteEntry removes an existing entry from the given data set. +func (c *Manager) DeleteEntry(ctx context.Context, vm string, dataSet string, key string) error { + url := c.Resource(entryPath(vm, dataSet, key)) + return c.Do(ctx, url.Request(http.MethodDelete), nil) +} + +// ListEntries returns a list of all entry keys in the given data set. +func (c *Manager) ListEntries(ctx context.Context, vm string, dataSet string) ([]string, error) { + url := c.Resource(entriesPath(vm, dataSet)) + var res []string + err := c.Do(ctx, url.Request(http.MethodGet), &res) + return res, err +} diff --git a/vendor/github.com/vmware/govmomi/vapi/vm/internal/internal.go b/vendor/github.com/vmware/govmomi/vapi/vm/internal/internal.go new file mode 100644 index 0000000000..b016caa1a7 --- /dev/null +++ b/vendor/github.com/vmware/govmomi/vapi/vm/internal/internal.go @@ -0,0 +1,24 @@ +/* +Copyright (c) 2023-2023 VMware, Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internal + +const ( + // VCenterVMPath is the REST endpoint for the virtual machine API + VCenterVMPath = "/api/vcenter/vm" + // LegacyVCenterVMPath is the legacy REST endpoint for the virtual machine API, relative to the "/rest" base path + LegacyVCenterVMPath = "/vcenter/vm" +) diff --git a/vendor/modules.txt b/vendor/modules.txt index 4037eb4e4e..c987109068 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1927,11 +1927,24 @@ github.com/vmware/govmomi/ovf/importer github.com/vmware/govmomi/property github.com/vmware/govmomi/session github.com/vmware/govmomi/session/keepalive +github.com/vmware/govmomi/simulator +github.com/vmware/govmomi/simulator/esx +github.com/vmware/govmomi/simulator/internal +github.com/vmware/govmomi/simulator/vpx github.com/vmware/govmomi/task +github.com/vmware/govmomi/toolbox/hgfs +github.com/vmware/govmomi/toolbox/process +github.com/vmware/govmomi/toolbox/vix +github.com/vmware/govmomi/units +github.com/vmware/govmomi/vapi github.com/vmware/govmomi/vapi/internal github.com/vmware/govmomi/vapi/library github.com/vmware/govmomi/vapi/rest +github.com/vmware/govmomi/vapi/simulator github.com/vmware/govmomi/vapi/tags +github.com/vmware/govmomi/vapi/vcenter +github.com/vmware/govmomi/vapi/vm/dataset +github.com/vmware/govmomi/vapi/vm/internal github.com/vmware/govmomi/view github.com/vmware/govmomi/vim25 github.com/vmware/govmomi/vim25/debug