vslm

package
v0.37.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 27

Documentation

Overview

Package vslm provides access to the vSphere Storage Lifecycle Management service.

Index

Constants

View Source
const (
	Namespace = "vslm"
	Path      = "/vslm/sdk"
)

Variables

View Source
var (
	ServiceInstance = vim.ManagedObjectReference{
		Type:  "VslmServiceInstance",
		Value: "ServiceInstance",
	}
)

Functions

This section is empty.

Types

type Client added in v0.21.0

type Client struct {
	*soap.Client

	ServiceContent types.VslmServiceInstanceContent
}

func NewClient added in v0.21.0

func NewClient(ctx context.Context, c *vim25.Client) (*Client, error)

type GlobalObjectManager added in v0.21.0

type GlobalObjectManager struct {
	vim.ManagedObjectReference
	// contains filtered or unexported fields
}

func NewGlobalObjectManager added in v0.21.0

func NewGlobalObjectManager(client *Client) *GlobalObjectManager

NewGlobalObjectManager returns an ObjectManager referecing the vslm VcenterVStorageObjectManager endpoint. This endpoint is always connected to vpxd and utilizes the global catalog to locate objects and does not require a datastore. To connect to the VStorageObjectManager on the host or in vpxd use the vslm.ObjectManager type.

func (*GlobalObjectManager) AttachDisk added in v0.21.0

func (this *GlobalObjectManager) AttachDisk(ct context.Context, id vim.ID, vm mo.Reference, controllerKey int32,
	unitNumber int32) (*Task, error)

func (*GlobalObjectManager) AttachTag added in v0.21.0

func (this *GlobalObjectManager) AttachTag(ctx context.Context, id vim.ID, category string, tag string) error

func (*GlobalObjectManager) ClearControlFlags added in v0.21.0

func (this *GlobalObjectManager) ClearControlFlags(ct context.Context, id vim.ID) error

func (*GlobalObjectManager) Clone added in v0.21.0

func (this *GlobalObjectManager) Clone(ctx context.Context, id vim.ID, spec vim.VslmCloneSpec) (*Task, error)

func (*GlobalObjectManager) CreateDisk added in v0.21.0

func (this *GlobalObjectManager) CreateDisk(ctx context.Context, spec vim.VslmCreateSpec) (*Task, error)

func (*GlobalObjectManager) CreateDiskFromSnapshot added in v0.21.0

func (this *GlobalObjectManager) CreateDiskFromSnapshot(ctx context.Context, id vim.ID, snapshotId vim.ID, name string,
	profile []vim.VirtualMachineProfileSpec, crypto *vim.CryptoSpec,
	path string) (*Task, error)

func (*GlobalObjectManager) CreateSnapshot added in v0.21.0

func (this *GlobalObjectManager) CreateSnapshot(ctx context.Context, id vim.ID, description string) (*Task, error)

func (*GlobalObjectManager) Delete added in v0.21.0

func (this *GlobalObjectManager) Delete(ctx context.Context, id vim.ID) (*Task, error)

func (*GlobalObjectManager) DeleteSnapshot added in v0.21.0

func (this *GlobalObjectManager) DeleteSnapshot(ctx context.Context, id vim.ID, snapshotID vim.ID) (*Task, error)

func (*GlobalObjectManager) DetachTag added in v0.21.0

func (this *GlobalObjectManager) DetachTag(ctx context.Context, id vim.ID, category string, tag string) error

func (*GlobalObjectManager) ExtendDisk added in v0.21.0

func (this *GlobalObjectManager) ExtendDisk(ctx context.Context, id vim.ID, newCapacityInMB int64) (*Task, error)

func (*GlobalObjectManager) InflateDisk added in v0.21.0

func (this *GlobalObjectManager) InflateDisk(ctx context.Context, id vim.ID) (*Task, error)

func (*GlobalObjectManager) ListAttachedTags added in v0.21.0

func (this *GlobalObjectManager) ListAttachedTags(ctx context.Context, id vim.ID) ([]vim.VslmTagEntry, error)

func (*GlobalObjectManager) ListObjectsAttachedToTag added in v0.21.0

func (this *GlobalObjectManager) ListObjectsAttachedToTag(ctx context.Context, id vim.ID, category string, tag string) (
	[]vim.ID, error)

func (*GlobalObjectManager) ListObjectsForSpec added in v0.21.0

func (*GlobalObjectManager) QueryChangedDiskAreas added in v0.21.0

func (this *GlobalObjectManager) QueryChangedDiskAreas(ctx context.Context, id vim.ID, snapshotId vim.ID, startOffset int64,
	changeId string) (*vim.DiskChangeInfo, error)

func (*GlobalObjectManager) QueryGlobalCatalogSyncStatus added in v0.21.0

func (this *GlobalObjectManager) QueryGlobalCatalogSyncStatus(ct context.Context) ([]types.VslmDatastoreSyncStatus, error)

func (*GlobalObjectManager) QueryGlobalCatalogSyncStatusForDatastore added in v0.21.0

func (this *GlobalObjectManager) QueryGlobalCatalogSyncStatusForDatastore(ct context.Context, datastoreURL string) (
	*types.VslmDatastoreSyncStatus, error)

func (*GlobalObjectManager) ReconcileDatastoreInventory added in v0.21.0

func (this *GlobalObjectManager) ReconcileDatastoreInventory(ctx context.Context, datastore mo.Reference) (*Task, error)

func (*GlobalObjectManager) RegisterDisk added in v0.21.0

func (this *GlobalObjectManager) RegisterDisk(ctx context.Context, path string, name string) (*vim.VStorageObject, error)

func (*GlobalObjectManager) Relocate added in v0.21.0

func (this *GlobalObjectManager) Relocate(ct context.Context, id vim.ID, spec vim.VslmRelocateSpec) (*Task, error)

func (*GlobalObjectManager) Rename added in v0.21.0

func (this *GlobalObjectManager) Rename(ctx context.Context, id vim.ID, name string) error

func (*GlobalObjectManager) Retrieve added in v0.21.0

func (this *GlobalObjectManager) Retrieve(ctx context.Context, id vim.ID) (*vim.VStorageObject, error)

func (*GlobalObjectManager) RetrieveAssociations added in v0.21.0

func (this *GlobalObjectManager) RetrieveAssociations(ct context.Context, ids []vim.ID) (
	[]types.VslmVsoVStorageObjectAssociations, error)

func (*GlobalObjectManager) RetrieveInfrastructurePolicy added in v0.21.0

func (this *GlobalObjectManager) RetrieveInfrastructurePolicy(ct context.Context, datastore mo.Reference) (
	[]vim.VslmInfrastructureObjectPolicy, error)

func (*GlobalObjectManager) RetrieveMetadata added in v0.21.0

func (this *GlobalObjectManager) RetrieveMetadata(ct context.Context, id vim.ID, snapshotID *vim.ID, prefix string) (
	[]vim.KeyValue, error)

func (*GlobalObjectManager) RetrieveMetadataValue added in v0.21.0

func (this *GlobalObjectManager) RetrieveMetadataValue(ct context.Context, id vim.ID, snapshotID *vim.ID, key string) (
	string, error)

func (*GlobalObjectManager) RetrieveObjects added in v0.21.0

func (this *GlobalObjectManager) RetrieveObjects(ct context.Context, ids []vim.ID) ([]types.VslmVsoVStorageObjectResult,
	error)

func (*GlobalObjectManager) RetrieveSnapshotDetails added in v0.22.0

func (this *GlobalObjectManager) RetrieveSnapshotDetails(ctx context.Context, id vim.ID, snapshotId vim.ID) (
	*vim.VStorageObjectSnapshotDetails, error)

func (*GlobalObjectManager) RetrieveSnapshotInfo added in v0.21.0

func (*GlobalObjectManager) RetrieveState added in v0.21.0

func (this *GlobalObjectManager) RetrieveState(ct context.Context, id vim.ID) (*vim.VStorageObjectStateInfo, error)

func (*GlobalObjectManager) Revert added in v0.21.0

func (this *GlobalObjectManager) Revert(ctx context.Context, id vim.ID, snapshotID vim.ID) (*Task, error)

func (*GlobalObjectManager) ScheduleReconcileDatastoreInventory added in v0.21.0

func (this *GlobalObjectManager) ScheduleReconcileDatastoreInventory(ctx context.Context, datastore mo.Reference) error

func (*GlobalObjectManager) SetControlFlags added in v0.21.0

func (this *GlobalObjectManager) SetControlFlags(ct context.Context, id vim.ID, controlFlags []string) error

func (*GlobalObjectManager) UpdateInfrastructurePolicy added in v0.21.0

func (this *GlobalObjectManager) UpdateInfrastructurePolicy(ct context.Context,
	spec vim.VslmInfrastructureObjectPolicySpec) (*Task, error)

func (*GlobalObjectManager) UpdateMetadata added in v0.21.0

func (this *GlobalObjectManager) UpdateMetadata(ctx context.Context, id vim.ID, metadata []vim.KeyValue,
	deleteKeys []string) (*Task, error)

func (*GlobalObjectManager) UpdatePolicy added in v0.21.0

func (this *GlobalObjectManager) UpdatePolicy(ct context.Context, id vim.ID, profile []vim.VirtualMachineProfileSpec) (
	*Task, error)

type ObjectManager

type ObjectManager struct {
	types.ManagedObjectReference
	// contains filtered or unexported fields
}

ObjectManager wraps VStorageObjectManagerBase.

func NewObjectManager

func NewObjectManager(client *vim25.Client, ref ...types.ManagedObjectReference) *ObjectManager

NewObjectManager returns an ObjectManager referencing the VcenterVStorageObjectManager singleton when connected to vCenter or the HostVStorageObjectManager singleton when connected to an ESX host. The optional ref param can be used to specify a ESX host instead, when connected to vCenter.

func (ObjectManager) AttachTag

func (m ObjectManager) AttachTag(ctx context.Context, id string, tag types.VslmTagEntry) error

func (ObjectManager) Clone

func (ObjectManager) CreateDisk

func (m ObjectManager) CreateDisk(ctx context.Context, spec types.VslmCreateSpec) (*object.Task, error)

func (ObjectManager) CreateSnapshot

func (m ObjectManager) CreateSnapshot(ctx context.Context, ds mo.Reference, id, desc string) (*object.Task, error)

func (ObjectManager) Delete

func (m ObjectManager) Delete(ctx context.Context, ds mo.Reference, id string) (*object.Task, error)

func (ObjectManager) DeleteSnapshot

func (m ObjectManager) DeleteSnapshot(ctx context.Context, ds mo.Reference, id, sid string) (*object.Task, error)

func (ObjectManager) DetachTag

func (m ObjectManager) DetachTag(ctx context.Context, id string, tag types.VslmTagEntry) error

func (ObjectManager) ExtendDisk added in v0.24.0

func (m ObjectManager) ExtendDisk(ctx context.Context, ds mo.Reference, id string, newCapacityInMB int64) (*object.Task, error)

func (ObjectManager) InflateDisk added in v0.24.0

func (m ObjectManager) InflateDisk(ctx context.Context, ds mo.Reference, id string) (*object.Task, error)

func (ObjectManager) List

func (m ObjectManager) List(ctx context.Context, ds mo.Reference) ([]types.ID, error)

func (ObjectManager) ListAttachedObjects

func (m ObjectManager) ListAttachedObjects(ctx context.Context, category, tag string) ([]types.ID, error)

func (ObjectManager) ListAttachedTags

func (m ObjectManager) ListAttachedTags(ctx context.Context, id string) ([]types.VslmTagEntry, error)

func (ObjectManager) PlaceDisk

PlaceDisk uses StorageResourceManager datastore placement recommendations to choose a Datastore from a Datastore cluster. If the given spec backing Datastore field is not that of type StoragePod, the spec is unmodifed. Otherwise, the backing Datastore field is replaced with a Datastore suggestion.

func (ObjectManager) ReconcileDatastoreInventory added in v0.21.0

func (m ObjectManager) ReconcileDatastoreInventory(ctx context.Context, ds mo.Reference) (*object.Task, error)

func (ObjectManager) RegisterDisk

func (m ObjectManager) RegisterDisk(ctx context.Context, path, name string) (*types.VStorageObject, error)

func (ObjectManager) Rename

func (m ObjectManager) Rename(ctx context.Context, ds mo.Reference, id, name string) error

func (ObjectManager) Retrieve

func (ObjectManager) RetrieveSnapshotInfo

func (m ObjectManager) RetrieveSnapshotInfo(ctx context.Context, ds mo.Reference, id string) (*types.VStorageObjectSnapshotInfo, error)

type Task added in v0.21.0

type Task struct {
	object.Common
	vim.ManagedObjectReference
	// contains filtered or unexported fields
}

func NewTask added in v0.21.0

func NewTask(client *Client, mref vim.ManagedObjectReference) *Task

func (*Task) Cancel added in v0.21.0

func (this *Task) Cancel(ctx context.Context) error

func (*Task) QueryInfo added in v0.21.0

func (this *Task) QueryInfo(ctx context.Context) (*types.VslmTaskInfo, error)

func (*Task) QueryResult added in v0.21.0

func (this *Task) QueryResult(ctx context.Context) (vim.AnyType, error)

func (*Task) Wait added in v0.21.0

func (this *Task) Wait(ctx context.Context, timeoutNS time.Duration) (vim.AnyType, error)

func (*Task) WaitNonDefault added in v0.21.0

func (this *Task) WaitNonDefault(ctx context.Context, timeoutNS time.Duration, startIntervalNS time.Duration,
	exponential bool, maxIntervalNS time.Duration) (vim.AnyType, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL