package disk
import "github.com/vmware/govmomi/cli/disk"
Index ¶
- type Manager
- func NewManager(ctx context.Context, c *vim25.Client, ds *object.Datastore) (*Manager, error)
- func NewManagerFromFlag(ctx context.Context, cmd *flags.DatastoreFlag) (*Manager, error)
- func (m *Manager) AttachDisk(ctx context.Context, vm *object.VirtualMachine, id string) error
- func (m *Manager) AttachTag(ctx context.Context, id string, tag types.VslmTagEntry) error
- func (m *Manager) CreateDisk(ctx context.Context, spec types.VslmCreateSpec) (*types.VStorageObject, error)
- func (m *Manager) CreateSnapshot(ctx context.Context, id, desc string) (types.ID, error)
- func (m *Manager) Delete(ctx context.Context, id string) error
- func (m *Manager) DeleteSnapshot(ctx context.Context, id, sid string) error
- func (m *Manager) DetachTag(ctx context.Context, id string, tag types.VslmTagEntry) error
- func (m *Manager) List(ctx context.Context, qs ...vslmtypes.VslmVsoVStorageObjectQuerySpec) ([]types.ID, error)
- func (m *Manager) ListAttachedObjects(ctx context.Context, category, tag string) ([]types.ID, error)
- func (m *Manager) ListAttachedTags(ctx context.Context, id string) ([]types.VslmTagEntry, error)
- func (m *Manager) ReconcileDatastoreInventory(ctx context.Context) error
- func (m *Manager) RegisterDisk(ctx context.Context, path, name string) (*types.VStorageObject, error)
- func (m *Manager) Retrieve(ctx context.Context, id string) (*types.VStorageObject, error)
- func (m *Manager) RetrieveSnapshotInfo(ctx context.Context, id string) ([]types.VStorageObjectSnapshotInfoVStorageObjectSnapshot, error)
- type VStorageObject
Types ¶
type Manager ¶
type Manager struct { Client *vim25.Client Datastore *object.Datastore ObjectManager *vslm.ObjectManager GlobalObjectManager *vslm.GlobalObjectManager }
Manager provides a layer for switching between Virtual Storage Object Manager (VSOM) and Virtual Storage Lifecycle Manager (VSLM). The majority of VSOM methods require a Datastore param, and most VSLM methods do not as it uses the "Global Catalog". VSOM was introduced in vSphere 6.5 (11/2016) and VSLM in vSphere 6.7 U2 (04/2019). The govc disk commands were introduced prior to 6.7 U2 and continue to use VSOM when an optional Datastore (-ds flag) is provided. Otherwise, VSLM global methods are used when a Datastore is not specified. Also note that VSOM methods can be used when connected directly to an ESX hosts, but VSLM global methods require vCenter. A disk managed by these methods are also known as a "First Class Disk" (FCD).
func NewManager ¶
func NewManagerFromFlag ¶
func (*Manager) AttachDisk ¶
func (*Manager) AttachTag ¶
func (*Manager) CreateDisk ¶
func (m *Manager) CreateDisk(ctx context.Context, spec types.VslmCreateSpec) (*types.VStorageObject, error)
func (*Manager) CreateSnapshot ¶
func (*Manager) Delete ¶
func (*Manager) DeleteSnapshot ¶
func (*Manager) DetachTag ¶
func (*Manager) List ¶
func (m *Manager) List(ctx context.Context, qs ...vslmtypes.VslmVsoVStorageObjectQuerySpec) ([]types.ID, error)
func (*Manager) ListAttachedObjects ¶
func (m *Manager) ListAttachedObjects(ctx context.Context, category, tag string) ([]types.ID, error)
func (*Manager) ListAttachedTags ¶
func (*Manager) ReconcileDatastoreInventory ¶
func (*Manager) RegisterDisk ¶
func (m *Manager) RegisterDisk(ctx context.Context, path, name string) (*types.VStorageObject, error)
func (*Manager) Retrieve ¶
func (*Manager) RetrieveSnapshotInfo ¶
func (m *Manager) RetrieveSnapshotInfo(ctx context.Context, id string) ([]types.VStorageObjectSnapshotInfoVStorageObjectSnapshot, error)
type VStorageObject ¶
type VStorageObject struct { types.VStorageObject Tags []types.VslmTagEntry `json:"tags"` }
Source Files ¶
attach.go create.go detach.go ls.go manager.go register.go rm.go tags.go
Directories ¶
Path | Synopsis |
---|---|
cli/disk/metadata | |
cli/disk/snapshot |
- Version
- v0.48.1 (latest)
- Published
- Feb 11, 2025
- Platform
- linux/amd64
- Imports
- 20 packages
- Last checked
- 2 months ago –
Tools for package owners.