datastore

package
v0.0.0-...-26687db Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Browser

Browser returns the HostDatastoreBrowser for a certain datastore. This is a convenience method that exists to abstract the context.

func FileExists

func FileExists(ds *object.Datastore, name string) (bool, error)

FileExists takes a path in the datastore and checks to see if it exists.

The path should be a bare path, not a datastore path. Globs are not allowed.

func FromID

func FromID(client *govmomi.Client, id string) (*object.Datastore, error)

FromID locates a Datastore by its managed object reference ID.

func FromPath

func FromPath(client *govmomi.Client, name string, dc *object.Datacenter) (*object.Datastore, error)

FromPath loads a datastore from its path. The datacenter is optional if the path is specific enough to not require it.

func List

func List(client *govmomi.Client) ([]*object.Datastore, error)

func MoveToFolder

func MoveToFolder(client *govmomi.Client, ds *object.Datastore, relative string) error

MoveToFolder is a complex method that moves a datastore to a given relative datastore folder path. "Relative" here means relative to a datacenter, which is discovered from the current datastore path.

func MoveToFolderRelativeHostSystemID

func MoveToFolderRelativeHostSystemID(client *govmomi.Client, ds *object.Datastore, hsID, relative string) error

MoveToFolderRelativeHostSystemID is a complex method that moves a datastore to a given datastore path, similar to MoveToFolder, except the path is relative to a HostSystem supplied by ID instead of the datastore.

func Properties

func Properties(ds *object.Datastore) (*mo.Datastore, error)

Properties is a convenience method that wraps fetching the Datastore MO from its higher-level object.

func SearchDatastore

func SearchDatastore(ds *object.Datastore, name string) ([]*types.FileInfo, error)

SearchDatastore searches a datastore using the supplied HostDatastoreBrowser and a supplied path. The current implementation only returns the basic information, so all FileQueryFlags set, but not any flags for specific types of files.

func Unmount

func Unmount(client *govmomi.Client, ds *object.Datastore) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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