def get_all(content, container, object_type):
obj_list = list()<EOL>view_manager = content.viewManager<EOL>object_view = view_manager.CreateContainerView(<EOL>container, [object_type], True<EOL>)<EOL>for obj in object_view.view:<EOL><INDENT>if isinstance(obj, object_type):<EOL><INDENT>obj_list.append(obj)<EOL><DEDENT><DEDENT>object_view.Destroy()<EOL>return obj_list<EOL>
Get all items of a certain type
Example: get_all(content, vim.Datastore) return all datastore objects