package vslm
import "github.com/vmware/govmomi/vslm"
Package vslm provides access to the vSphere Storage Lifecycle Management service.
Index ¶
- Constants
- Variables
- type Client
- type GlobalObjectManager
- func NewGlobalObjectManager(client *Client) *GlobalObjectManager
- func (this *GlobalObjectManager) AttachDisk(ct context.Context, id vim.ID, vm mo.Reference, controllerKey int32, unitNumber *int32) (*Task, error)
- func (this *GlobalObjectManager) AttachTag(ctx context.Context, id vim.ID, category string, tag string) error
- func (this *GlobalObjectManager) ClearControlFlags(ct context.Context, id vim.ID) error
- func (this *GlobalObjectManager) Clone(ctx context.Context, id vim.ID, spec vim.VslmCloneSpec) (*Task, error)
- func (this *GlobalObjectManager) CreateDisk(ctx context.Context, spec vim.VslmCreateSpec) (*Task, error)
- 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 (this *GlobalObjectManager) CreateSnapshot(ctx context.Context, id vim.ID, description string) (*Task, error)
- func (this *GlobalObjectManager) Delete(ctx context.Context, id vim.ID) (*Task, error)
- func (this *GlobalObjectManager) DeleteSnapshot(ctx context.Context, id vim.ID, snapshotID vim.ID) (*Task, error)
- func (this *GlobalObjectManager) DetachTag(ctx context.Context, id vim.ID, category string, tag string) error
- func (this *GlobalObjectManager) ExtendDisk(ctx context.Context, id vim.ID, newCapacityInMB int64) (*Task, error)
- func (this *GlobalObjectManager) InflateDisk(ctx context.Context, id vim.ID) (*Task, error)
- func (this *GlobalObjectManager) List(ctx context.Context, qs ...types.VslmVsoVStorageObjectQuerySpec) (*types.VslmVsoVStorageObjectQueryResult, error)
- func (this *GlobalObjectManager) ListAttachedObjects(ctx context.Context, category string, tag string) ( []vim.ID, error)
- func (this *GlobalObjectManager) ListAttachedTags(ctx context.Context, id vim.ID) ([]vim.VslmTagEntry, error)
- func (this *GlobalObjectManager) ListObjectsForSpec(ctx context.Context, query []types.VslmVsoVStorageObjectQuerySpec, maxResult int32) (*types.VslmVsoVStorageObjectQueryResult, error)
- func (this *GlobalObjectManager) QueryChangedDiskAreas(ctx context.Context, id vim.ID, snapshotId vim.ID, startOffset int64, changeId string) (*vim.DiskChangeInfo, error)
- func (this *GlobalObjectManager) QueryGlobalCatalogSyncStatus(ct context.Context) ([]types.VslmDatastoreSyncStatus, error)
- func (this *GlobalObjectManager) QueryGlobalCatalogSyncStatusForDatastore(ct context.Context, datastoreURL string) ( *types.VslmDatastoreSyncStatus, error)
- func (this *GlobalObjectManager) ReconcileDatastoreInventory(ctx context.Context, datastore mo.Reference) (*Task, error)
- func (this *GlobalObjectManager) RegisterDisk(ctx context.Context, path string, name string) (*vim.VStorageObject, error)
- func (this *GlobalObjectManager) Relocate(ct context.Context, id vim.ID, spec vim.VslmRelocateSpec) (*Task, error)
- func (this *GlobalObjectManager) Rename(ctx context.Context, id vim.ID, name string) error
- func (this *GlobalObjectManager) Retrieve(ctx context.Context, id vim.ID) (*vim.VStorageObject, error)
- func (this *GlobalObjectManager) RetrieveAssociations(ct context.Context, ids []vim.ID) ( []types.VslmVsoVStorageObjectAssociations, error)
- func (this *GlobalObjectManager) RetrieveInfrastructurePolicy(ct context.Context, datastore mo.Reference) ( []vim.VslmInfrastructureObjectPolicy, error)
- func (this *GlobalObjectManager) RetrieveMetadata(ct context.Context, id vim.ID, snapshotID *vim.ID, prefix string) ( []vim.KeyValue, error)
- func (this *GlobalObjectManager) RetrieveMetadataValue(ct context.Context, id vim.ID, snapshotID *vim.ID, key string) ( string, error)
- func (this *GlobalObjectManager) RetrieveObjects(ct context.Context, ids []vim.ID) ([]types.VslmVsoVStorageObjectResult, error)
- func (this *GlobalObjectManager) RetrieveSnapshotDetails(ctx context.Context, id vim.ID, snapshotId vim.ID) ( *vim.VStorageObjectSnapshotDetails, error)
- func (this *GlobalObjectManager) RetrieveSnapshotInfo(ctx context.Context, id vim.ID) ( []vim.VStorageObjectSnapshotInfoVStorageObjectSnapshot, error)
- func (this *GlobalObjectManager) RetrieveState(ct context.Context, id vim.ID) (*vim.VStorageObjectStateInfo, error)
- func (this *GlobalObjectManager) Revert(ctx context.Context, id vim.ID, snapshotID vim.ID) (*Task, error)
- func (this *GlobalObjectManager) ScheduleReconcileDatastoreInventory(ctx context.Context, datastore mo.Reference) error
- func (this *GlobalObjectManager) SetControlFlags(ct context.Context, id vim.ID, controlFlags []string) error
- func (this *GlobalObjectManager) UpdateInfrastructurePolicy(ct context.Context, spec vim.VslmInfrastructureObjectPolicySpec) (*Task, error)
- func (this *GlobalObjectManager) UpdateMetadata(ctx context.Context, id vim.ID, metadata []vim.KeyValue, deleteKeys []string) (*Task, error)
- func (this *GlobalObjectManager) UpdatePolicy(ct context.Context, id vim.ID, profile []vim.VirtualMachineProfileSpec) ( *Task, error)
- type ObjectManager
- func NewObjectManager(client *vim25.Client, ref ...types.ManagedObjectReference) *ObjectManager
- func (m ObjectManager) AttachTag(ctx context.Context, id string, tag types.VslmTagEntry) error
- func (m ObjectManager) Clone(ctx context.Context, ds mo.Reference, id string, spec types.VslmCloneSpec) (*object.Task, error)
- func (m ObjectManager) CreateDisk(ctx context.Context, spec types.VslmCreateSpec) (*object.Task, error)
- func (m ObjectManager) CreateSnapshot(ctx context.Context, ds mo.Reference, id, desc string) (*object.Task, error)
- func (m ObjectManager) Delete(ctx context.Context, ds mo.Reference, id string) (*object.Task, error)
- func (m ObjectManager) DeleteSnapshot(ctx context.Context, ds mo.Reference, id, sid string) (*object.Task, error)
- func (m ObjectManager) DetachTag(ctx context.Context, id string, tag types.VslmTagEntry) error
- func (m ObjectManager) ExtendDisk(ctx context.Context, ds mo.Reference, id string, newCapacityInMB int64) (*object.Task, error)
- func (m ObjectManager) InflateDisk(ctx context.Context, ds mo.Reference, id string) (*object.Task, error)
- func (m ObjectManager) List(ctx context.Context, ds mo.Reference) ([]types.ID, error)
- func (m ObjectManager) ListAttachedObjects(ctx context.Context, category, tag string) ([]types.ID, error)
- func (m ObjectManager) ListAttachedTags(ctx context.Context, id string) ([]types.VslmTagEntry, error)
- func (m ObjectManager) PlaceDisk(ctx context.Context, spec *types.VslmCreateSpec, pool types.ManagedObjectReference) error
- func (m ObjectManager) ReconcileDatastoreInventory(ctx context.Context, ds mo.Reference) (*object.Task, error)
- func (m ObjectManager) RegisterDisk(ctx context.Context, path, name string) (*types.VStorageObject, error)
- func (m ObjectManager) Rename(ctx context.Context, ds mo.Reference, id, name string) error
- func (m ObjectManager) Retrieve(ctx context.Context, ds mo.Reference, id string) (*types.VStorageObject, error)
- func (m ObjectManager) RetrieveSnapshotInfo(ctx context.Context, ds mo.Reference, id string) (*types.VStorageObjectSnapshotInfo, error)
- type Task
- func NewTask(client *Client, mref vim.ManagedObjectReference) *Task
- func (this *Task) Cancel(ctx context.Context) error
- func (this *Task) QueryInfo(ctx context.Context) (*types.VslmTaskInfo, error)
- func (this *Task) QueryResult(ctx context.Context) (vim.AnyType, error)
- func (this *Task) Wait(ctx context.Context, timeoutNS time.Duration) (vim.AnyType, error)
- func (this *Task) WaitNonDefault(ctx context.Context, timeoutNS time.Duration, startIntervalNS time.Duration, exponential bool, maxIntervalNS time.Duration) (vim.AnyType, error)
Constants ¶
const ( Namespace = "vslm" Path = "/vslm/sdk" )
Variables ¶
var DefaultMaxResults = 100
var ( ServiceInstance = vim.ManagedObjectReference{ Type: "VslmServiceInstance", Value: "ServiceInstance", } )
Types ¶
type Client ¶
type Client struct { *soap.Client ServiceContent types.VslmServiceInstanceContent }
func NewClient ¶
type GlobalObjectManager ¶
type GlobalObjectManager struct { vim.ManagedObjectReference // contains filtered or unexported fields }
func NewGlobalObjectManager ¶
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 ¶
func (this *GlobalObjectManager) AttachDisk(ct context.Context, id vim.ID, vm mo.Reference, controllerKey int32, unitNumber *int32) (*Task, error)
func (*GlobalObjectManager) AttachTag ¶
func (this *GlobalObjectManager) AttachTag(ctx context.Context, id vim.ID, category string, tag string) error
func (*GlobalObjectManager) ClearControlFlags ¶
func (*GlobalObjectManager) Clone ¶
func (this *GlobalObjectManager) Clone(ctx context.Context, id vim.ID, spec vim.VslmCloneSpec) (*Task, error)
func (*GlobalObjectManager) CreateDisk ¶
func (this *GlobalObjectManager) CreateDisk(ctx context.Context, spec vim.VslmCreateSpec) (*Task, error)
func (*GlobalObjectManager) CreateDiskFromSnapshot ¶
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 ¶
func (this *GlobalObjectManager) CreateSnapshot(ctx context.Context, id vim.ID, description string) (*Task, error)
func (*GlobalObjectManager) Delete ¶
func (*GlobalObjectManager) DeleteSnapshot ¶
func (this *GlobalObjectManager) DeleteSnapshot(ctx context.Context, id vim.ID, snapshotID vim.ID) (*Task, error)
func (*GlobalObjectManager) DetachTag ¶
func (this *GlobalObjectManager) DetachTag(ctx context.Context, id vim.ID, category string, tag string) error
func (*GlobalObjectManager) ExtendDisk ¶
func (this *GlobalObjectManager) ExtendDisk(ctx context.Context, id vim.ID, newCapacityInMB int64) (*Task, error)
func (*GlobalObjectManager) InflateDisk ¶
func (*GlobalObjectManager) List ¶
func (this *GlobalObjectManager) List(ctx context.Context, qs ...types.VslmVsoVStorageObjectQuerySpec) (*types.VslmVsoVStorageObjectQueryResult, error)
List wraps ListObjectsForSpec, using maxResult = DefaultMaxResults and looping until AllRecordsReturned == true or error is returned.
func (*GlobalObjectManager) ListAttachedObjects ¶
func (this *GlobalObjectManager) ListAttachedObjects(ctx context.Context, category string, tag string) ( []vim.ID, error)
func (*GlobalObjectManager) ListAttachedTags ¶
func (this *GlobalObjectManager) ListAttachedTags(ctx context.Context, id vim.ID) ([]vim.VslmTagEntry, error)
func (*GlobalObjectManager) ListObjectsForSpec ¶
func (this *GlobalObjectManager) ListObjectsForSpec(ctx context.Context, query []types.VslmVsoVStorageObjectQuerySpec, maxResult int32) (*types.VslmVsoVStorageObjectQueryResult, error)
func (*GlobalObjectManager) QueryChangedDiskAreas ¶
func (this *GlobalObjectManager) QueryChangedDiskAreas(ctx context.Context, id vim.ID, snapshotId vim.ID, startOffset int64, changeId string) (*vim.DiskChangeInfo, error)
func (*GlobalObjectManager) QueryGlobalCatalogSyncStatus ¶
func (this *GlobalObjectManager) QueryGlobalCatalogSyncStatus(ct context.Context) ([]types.VslmDatastoreSyncStatus, error)
func (*GlobalObjectManager) QueryGlobalCatalogSyncStatusForDatastore ¶
func (this *GlobalObjectManager) QueryGlobalCatalogSyncStatusForDatastore(ct context.Context, datastoreURL string) ( *types.VslmDatastoreSyncStatus, error)
func (*GlobalObjectManager) ReconcileDatastoreInventory ¶
func (this *GlobalObjectManager) ReconcileDatastoreInventory(ctx context.Context, datastore mo.Reference) (*Task, error)
func (*GlobalObjectManager) RegisterDisk ¶
func (this *GlobalObjectManager) RegisterDisk(ctx context.Context, path string, name string) (*vim.VStorageObject, error)
func (*GlobalObjectManager) Relocate ¶
func (this *GlobalObjectManager) Relocate(ct context.Context, id vim.ID, spec vim.VslmRelocateSpec) (*Task, error)
func (*GlobalObjectManager) Rename ¶
func (*GlobalObjectManager) Retrieve ¶
func (this *GlobalObjectManager) Retrieve(ctx context.Context, id vim.ID) (*vim.VStorageObject, error)
func (*GlobalObjectManager) RetrieveAssociations ¶
func (this *GlobalObjectManager) RetrieveAssociations(ct context.Context, ids []vim.ID) ( []types.VslmVsoVStorageObjectAssociations, error)
func (*GlobalObjectManager) RetrieveInfrastructurePolicy ¶
func (this *GlobalObjectManager) RetrieveInfrastructurePolicy(ct context.Context, datastore mo.Reference) ( []vim.VslmInfrastructureObjectPolicy, error)
func (*GlobalObjectManager) RetrieveMetadata ¶
func (this *GlobalObjectManager) RetrieveMetadata(ct context.Context, id vim.ID, snapshotID *vim.ID, prefix string) ( []vim.KeyValue, error)
func (*GlobalObjectManager) RetrieveMetadataValue ¶
func (this *GlobalObjectManager) RetrieveMetadataValue(ct context.Context, id vim.ID, snapshotID *vim.ID, key string) ( string, error)
func (*GlobalObjectManager) RetrieveObjects ¶
func (this *GlobalObjectManager) RetrieveObjects(ct context.Context, ids []vim.ID) ([]types.VslmVsoVStorageObjectResult, error)
func (*GlobalObjectManager) RetrieveSnapshotDetails ¶
func (this *GlobalObjectManager) RetrieveSnapshotDetails(ctx context.Context, id vim.ID, snapshotId vim.ID) ( *vim.VStorageObjectSnapshotDetails, error)
func (*GlobalObjectManager) RetrieveSnapshotInfo ¶
func (this *GlobalObjectManager) RetrieveSnapshotInfo(ctx context.Context, id vim.ID) ( []vim.VStorageObjectSnapshotInfoVStorageObjectSnapshot, error)
func (*GlobalObjectManager) RetrieveState ¶
func (this *GlobalObjectManager) RetrieveState(ct context.Context, id vim.ID) (*vim.VStorageObjectStateInfo, error)
func (*GlobalObjectManager) Revert ¶
func (this *GlobalObjectManager) Revert(ctx context.Context, id vim.ID, snapshotID vim.ID) (*Task, error)
func (*GlobalObjectManager) ScheduleReconcileDatastoreInventory ¶
func (this *GlobalObjectManager) ScheduleReconcileDatastoreInventory(ctx context.Context, datastore mo.Reference) error
func (*GlobalObjectManager) SetControlFlags ¶
func (this *GlobalObjectManager) SetControlFlags(ct context.Context, id vim.ID, controlFlags []string) error
func (*GlobalObjectManager) UpdateInfrastructurePolicy ¶
func (this *GlobalObjectManager) UpdateInfrastructurePolicy(ct context.Context, spec vim.VslmInfrastructureObjectPolicySpec) (*Task, error)
func (*GlobalObjectManager) UpdateMetadata ¶
func (this *GlobalObjectManager) UpdateMetadata(ctx context.Context, id vim.ID, metadata []vim.KeyValue, deleteKeys []string) (*Task, error)
func (*GlobalObjectManager) UpdatePolicy ¶
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 (m ObjectManager) Clone(ctx context.Context, ds mo.Reference, id string, spec types.VslmCloneSpec) (*object.Task, error)
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 ¶
func (m ObjectManager) ExtendDisk(ctx context.Context, ds mo.Reference, id string, newCapacityInMB int64) (*object.Task, error)
func (ObjectManager) InflateDisk ¶
func (m ObjectManager) InflateDisk(ctx context.Context, ds mo.Reference, id string) (*object.Task, error)
func (ObjectManager) List ¶
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 ¶
func (m ObjectManager) PlaceDisk(ctx context.Context, spec *types.VslmCreateSpec, pool types.ManagedObjectReference) error
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 ¶
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 (ObjectManager) Retrieve ¶
func (m ObjectManager) Retrieve(ctx context.Context, ds mo.Reference, id string) (*types.VStorageObject, error)
func (ObjectManager) RetrieveSnapshotInfo ¶
func (m ObjectManager) RetrieveSnapshotInfo(ctx context.Context, ds mo.Reference, id string) (*types.VStorageObjectSnapshotInfo, error)
type Task ¶
type Task struct { object.Common vim.ManagedObjectReference // contains filtered or unexported fields }
func NewTask ¶
func NewTask(client *Client, mref vim.ManagedObjectReference) *Task
func (*Task) Cancel ¶
func (*Task) QueryInfo ¶
func (*Task) QueryResult ¶
func (*Task) Wait ¶
func (*Task) WaitNonDefault ¶
func (this *Task) WaitNonDefault(ctx context.Context, timeoutNS time.Duration, startIntervalNS time.Duration, exponential bool, maxIntervalNS time.Duration) (vim.AnyType, error)
Source Files ¶
client.go doc.go global_object_manager.go object_manager.go
Directories ¶
Path | Synopsis |
---|---|
vslm/methods | |
vslm/simulator | |
vslm/types |
- Version
- v0.48.1 (latest)
- Published
- Feb 11, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 2 months ago –
Tools for package owners.