Documentation ¶
Index ¶
- func Browser(ds *object.Datastore) (*object.HostDatastoreBrowser, error)
- func FileExists(ds *object.Datastore, name string) (bool, error)
- func FromID(client *govmomi.Client, id string) (*object.Datastore, error)
- func FromPath(client *govmomi.Client, name string, dc *object.Datacenter) (*object.Datastore, error)
- func List(client *govmomi.Client) ([]*object.Datastore, error)
- func MoveToFolder(client *govmomi.Client, ds *object.Datastore, relative string) error
- func MoveToFolderRelativeHostSystemID(client *govmomi.Client, ds *object.Datastore, hsID, relative string) error
- func Properties(ds *object.Datastore) (*mo.Datastore, error)
- func SearchDatastore(ds *object.Datastore, name string) ([]*types.FileInfo, error)
- func Unmount(client *govmomi.Client, ds *object.Datastore) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Browser ¶
func Browser(ds *object.Datastore) (*object.HostDatastoreBrowser, error)
Browser returns the HostDatastoreBrowser for a certain datastore. This is a convenience method that exists to abstract the context.
func FileExists ¶
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 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 MoveToFolder ¶
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 ¶
Properties is a convenience method that wraps fetching the Datastore MO from its higher-level object.
func SearchDatastore ¶
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.
Types ¶
This section is empty.