vmware.vsphere.view

vmware.vsphere.view.container(vc, obj, search_type, **kwargs):

Create a container-view of the object and get a list of all containing objects that are matching search_type

Parameters:
  • vc – The vCenter-object in which the container-view shall be created

  • obj (list) – The object

  • search_type – List of types that should be matching (i.e vim.Folder). Will convert itself into a list if a single element is given

Returns:

List of matching items

Return type:

list

Keyword Arguments:
  • recurse (bool) If set to “True” recursion through childs is enabled. Default is False