Files
deb-python-pyvmomi/docs/vim/TaskManager.rst
Shawn Hartsock 15f7be9a52 pyVmomi reStructured Text Documentation
This external documentation for pyVmomi was generated using Googly Docs
(aka Google Standard Documentation) which renders very cleanly in
GitHub. Internal documentation for a class should be done in Sphinx
format because tools like pyCharm and Eclipse can use that documentation
as a hint for code completion.

Note: External docs as Googly Docs, internal docs as Sphinx.

Closes bug#15
2014-06-17 14:07:42 -04:00

4.4 KiB

vim.TaskManager

The TaskManager managed object provides an interface for creating and managing Task managed objects. Many operations are non-blocking, returning a Task managed object that can be monitored by a client application. Task managed objects may also be accessed through the TaskManager.

Attributes

recentTask (vim.Task):
privilege: System.View

A list of Task managed objects that completed recently, that are currently running, or that are queued to run.The list contains only Task objects that the client has permission to access, which is determined by having permission to access the Task object's managed entity .The completed Task objects by default include only Task objects that completed within the past 10 minutes. When connected to vCenter Server, there is an additional default limitation that each of the completed Task objects in this list is one of the last 200 completed Task objects.This property should not be used for tracking Task completion. Generally, a ListView is a better way to monitor a specific set of Task objects. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated.

description (vim.TaskDescription):
privilege: System.View

Locale-specific, static strings that describe Task information to users.

maxCollector (int):
privilege: System.View

Maximum number of TaskHistoryCollector data objects that can exist concurrently, per client.

Methods

CreateCollectorForTasks(filter):

Creates a TaskHistoryCollector , a specialized HistoryCollector that gathers TaskInfo data objects.A TaskHistoryCollector does not persist beyond the current client session.

Privilege:

System.View

Args:
filter (vim.TaskFilterSpec):

The specification for the task query filter.

Returns:
vim.TaskHistoryCollector:

The task collector based on the filter.

Raises:

vim.fault.InvalidState:

if there are more than the maximum number of task collectors.

vmodl.fault.InvalidArgument:

if the filter is null or unknown.

CreateTask(obj, taskTypeId, initiatedBy, cancelable, parentTaskKey):

Creates a new Task , specifying the object with which the Task is associated, the type of task, and whether the task is cancelable. Use this operation in conjunction with the ExtensionManager . since: VI API 2.5

Privilege:

Task.Create

Args:
obj (vmodl.ManagedObject):

ManagedObject with which Task will be associated

taskTypeId (str):

Extension registered task type identifier for type of task being created

initiatedBy (str, optional):

The name of the user on whose behalf the Extension is creating the task

cancelable (bool):

True if the task should be cancelable, else false

parentTaskKey (str, optional, since vSphere API 4.0 ):

Key of the task that is the parent of this task

Returns:
vim.TaskInfo:

TaskInfo data object describing the new task