Scripting Object - VcInventoryView

Scripting-object corresponding to
InventoryView
Returned by
createInventoryView

Scripting Object Description

The {@link InventoryView} managed object provides a means of browsing the inventory and tracking changes to open folders. This managed object is particularly useful for UI clients that display a tree-based navigation panel of the inventory.

{@link InventoryView} maintains the {@link ManagedObjectView#view} list of managed object references to inventory objects. When you create an inventory view ({@link ViewManager#createInventoryView}), the server initializes the view's object list with a single folder - the root folder.

{@link InventoryView} provides methods to open and close folders in the inventory. Use these methods to add and subtract objects from the {@link ManagedObjectView#view} list. Use the {@link InventoryView} together with the {@link vmodl.query.PropertyCollector} to manage the data resulting from {@link InventoryView#openFolder} and {@link InventoryView#closeFolder} methods. By using the {@link vmodl.query.PropertyCollector}, you have access to the modifications to the view, rather than processing the entire view list.

For example, you might use the following sequence of operations with an {@link InventoryView} and the {@link vmodl.query.PropertyCollector}:

  1. Create an {@link InventoryView}.
  2. Create a filter specification for the {@link vmodl.query.PropertyCollector}.
  3. Use either the {@link vmodl.query.PropertyCollector#checkForUpdates} or {@link vmodl.query.PropertyCollector#waitForUpdates} method to obtain {@link InventoryView} modifications. Both methods return an {@link vmodl.query.PropertyCollector.UpdateSet} object that describes the changes returned by the {@link vmodl.query.PropertyCollector}.
  4. Call the {@link InventoryView#openFolder} or {@link InventoryView#closeFolder 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
viewVcManagedObject []

@since VI API 2.5
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, closeInventoryViewFolder, createTrigger, destroyView, openInventoryViewFolder

_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

destroyView

Destroy this view. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
None

closeInventoryViewFolder

Notify the server that folder(s) have been closed, and changes for all its contained objects should no longer be sent. The associated child objects are removed from the view. The containers themselves will still be retained as open objects until their parent is closed.

May partially succeed if some entities could not be resolved. The operation will still succeed for all entities that could be resolved, and the list of those that failed is returned as the result. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedEntity []


Return Value

Type Description
VcManagedEntity []

openInventoryViewFolder

Adds the child objects of a given managed entity to the view.

If a {@link vim.Datacenter} is returned as a child, the implicit virtual machine folder and host folder objects are also returned. If a {@link vim.ComputeResource} is returned, the implicit root {@link vim.ResourcePool} and {@link vim.HostSystem} objects are also returned.

May partially succeed if some entities could not be resolved. The operation will still succeed for all entities which could be resolved, and the list of those which failed is returned as the result. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedEntity []


Return Value

Type Description
VcManagedEntity []