vslm

package
v0.0.0-...-f282198 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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

type Client struct {
	*soap.Client

	ServiceContent types.VslmServiceInstanceContent
}

func NewClient

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

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 (this *GlobalObjectManager) ClearControlFlags(ct context.Context, id vim.ID) error

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 (this *GlobalObjectManager) Delete(ctx context.Context, id vim.ID) (*Task, error)

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 (this *GlobalObjectManager) InflateDisk(ctx context.Context, id vim.ID) (*Task, error)

func (*GlobalObjectManager) ListAttachedTags

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

func (*GlobalObjectManager) ListObjectsAttachedToTag

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

func (*GlobalObjectManager) ListObjectsForSpec

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 (this *GlobalObjectManager) Rename(ctx context.Context, id vim.ID, name string) error

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 (*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 (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 (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

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

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 (this *Task) Cancel(ctx context.Context) error

func (*Task) QueryInfo

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

func (*Task) QueryResult

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

func (*Task) Wait

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

func (*Task) WaitNonDefault

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