| Local Properties | Local Methods | |
Managed Object Types | Data Object Types | All Properties | All Methods |
Although datastores may often be implemented using a traditional file system, a full interface to a file system is not provided here. Instead, specialized access for virtual machine files is provided. A datastore implementation may completely hide the file directory structure.
The intent is to provide functionality analogous to a file chooser in a user interface.
Files on datastores do not have independent permissions through this API. Instead, the permissions for all the files on a datastore derive from the datastore object itself. It is not possible to change individual file permissions as the user browsing the datastore may not necessarily be a recognized user from the point of view of the host changing the permission. This occurs if the user browsing the datastore is doing so through the VirtualCenter management server.
The DatastoreBrowser provides many ways to customize a search for files. A search can be customized by specifying the types of files to be searched, search criteria specific to a file type, and the amount of detail about each file. The most basic queries only use file details and are efficient with limited side effects. For these queries, file metadata details can be optionally retrieved, but the files themselves are opened and their contents examined. As a result, these files are not necessarily validated.
More complicated queries can be formed by specifying the specific types of files to be searched, the parameters to filter for each type, and the desired level of detail about each file. This method of searching for files is convenient because it allows additional data about the virtual machine component to be retrieved. In addition, certain validation checks can be performed on matched files as an inherent part of the details collection process. However, gathering extra details or the use of type specific filters can sometimes only be implemented by examining the contents of a file. As a result, the use of these conveniences comes with the cost of additional latency in the request and possible side effects on the system as a whole.
The DatastoreBrowser is referenced from various objects, including from Datastore, ComputeResource, HostSystem and VirtualMachine. Depending on which object is used, there are different requirements for the accessibility of the browsed datastore from the host (or hosts) associated with the object:
Properties
Name | Type | Description |
---|---|---|
datastore* P | ManagedObjectReference[]
to a Datastore[] |
Set of datastores that can be searched on this DatastoreBrowser.
The list of datastores available to browse on this DatastoreBrowser is contextual
information that depends on the object being browsed. If the host is being
browsed, the host's datastores are used. If the Datacenter is being browsed, the
Datacenter's list of datastores is used.
|
supportedType* | FileQuery[] |
The list of supported file types. The supported file types are represented as
items in this list. For each supported file type, there is an object in the list
whose dynamic type is one of the types derived from the
FileQuery data object
type. In general, the properties in this query type are not set.
Use the Query of the desired file type in the SearchSpec.query to indicate the desired file types.
This property is used by clients to determine what kinds of file types are
supported. Clients should consult this list to avoid querying for types of virtual
machine components that are not supported.
|
Methods
Methods defined in this Managed Object |
---|
DeleteFile, SearchDatastore_Task, SearchDatastoreSubFolders_Task |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreBrowser used to make the method call. |
datastorePath | xsd:string |
|
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
CannotDeleteFile | Thrown if the delete operation on the file fails. |
FileFault | |
FileNotFound | Thrown if the file or folder specified by datastorePath is not found. |
InvalidArgument | Thrown if fileInfo is not a valid FileInfo type. |
InvalidDatastore | Thrown if the operation cannot be performed on the target datastores. Typically, a specific subclass of this exception is thrown. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreBrowser used to make the method call. |
datastorePath | xsd:string |
|
searchSpec* | HostDatastoreBrowserSearchSpec |
|
Return Value
Type | Description |
---|---|
pbm.Task | This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostDatastoreBrowserSearchResults upon success. |
Faults
Type | Description |
---|---|
FileFault | |
FileNotFound | Thrown if the file or folder specified by datastorePath is not found. |
InvalidArgument | Thrown if the SearchSpec contains duplicate file types. |
InvalidDatastore | Thrown if the operation cannot be performed on the target datastores. The server can throw InvalidDatastorePath to indicate a malformed datastorePath, or InaccessibleDatastore to indicate inaccessibility of the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreBrowser used to make the method call. |
datastorePath | xsd:string |
|
searchSpec* | HostDatastoreBrowserSearchSpec |
|
Return Value
Type | Description |
---|---|
pbm.Task | This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostDatastoreBrowserSearchResults upon success. |
Faults
Type | Description |
---|---|
FileFault | |
FileNotFound | Thrown if the file or folder specified by datastorePath is not found. |
InvalidArgument | Thrown if the SearchSpec contains duplicate file types. |
InvalidDatastore | Thrown if the operation cannot be performed on the target datastores. Typically, a specific subclass of this exception is thrown. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Top of page | Local Properties | Local Methods | |
Managed Object Types | Data Object Types | All Properties | All Methods |