Scripting Object - VcViewManager

Scripting-object corresponding to
ViewManager
Attribute of
VcSdkConnection, VcServiceContent

Scripting Object Description

The {@link ViewManager} managed object provides methods to create {@link ContainerView}, {@link InventoryView}, and {@link ListView} managed objects. The {@link ViewManager} also maintains a list of managed object references to the views that you have created. Use the {@link ViewManager#viewList} property to access the views.

A {@link View} is a mechanism that supports selection of objects on the server and subsequently, access to those objects. Views can simplify the task of retrieving data from the server. When you use a view, you can use a single invocation of a {@link vmodl.query.PropertyCollector} method to retrieve data or receive notification of changes instead of multiple invocations involving multiple filter specifications. A view exists until you destroy it or until the end of the session.

The {@link ViewManager} supports the following views:

For example, you might use the following sequence of operations to get the names of all the virtual machines on a server:

  1. Create a {@link ContainerView} for the root folder in the server inventory. For the {@link ContainerView}, use the {@link ContainerView#type} property to include only virtual machines.
  2. Create a filter specification for the {@link vmodl.query.PropertyCollector}.
  3. Invoke the {@link vmodl.query.PropertyCollector} {@link vmodl.query.PropertyCollector#retrieveContents} method.

Attributes

Name Type Description
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
viewListVcView []

@since VI API 2.5
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, createContainerView, createInventoryView, createListView, createListViewFromView, createTrigger

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

createListView

Create a {@link ListView} object for this session. The method returns a session object that has a list of managed object references. The list of references corresponds to the input object list. You can modify the resulting list after you have created the object. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedObject []


Return Value

Type Description
VcListView

createInventoryView

Create a new {@link InventoryView} managed object for this session. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
VcInventoryView

createContainerView

Create a {@link ContainerView} managed object for this session. The method returns a reference to a {@link ContainerView} object that has a list of managed object references. The list references objects in the container and may include references to objects from additional containers. You can configure the resulting list of objects by specifying a type list and recursion. Once you have created the view, the object list always represents the current configuration of the virtual environment and reflects any subsequent changes that occur. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedEntity

arg1String []

arg2Boolean


Return Value

Type Description
VcContainerView

createListViewFromView

Create a {@link ListView} object for this session. This method uses an existing view to construct the object list for the new view. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcView


Return Value

Type Description
VcListView