The Vim package includes the following subroutines:
■
■
■ Terminates the current session loaded by the load_session() subroutine.Searches the inventory tree for a managed entity that matches the specified entity type. The search begins with the root folder unless the begin_entity parameter is specified.In most cases, you specify a filter or property when using this command to avoid performance problems. See Creating and Using Filters and Filtering Views Selectively Using Properties.
■ begin_entity (optional) To avoid performance problems, use this command with a filter or specify the properties argument. By default, this subroutine retrieves all properties of an entity. See Creating and Using Filters and Filtering Views Selectively Using Properties.See the vSphere SDK for Perl API Reference for a list of properties. You can specify properties inherited from ManagedEntity or local to a specific entity type.
■ begin_entity (optional) filter (optional) The following example, originally published in VMware Communities in post #1272780, retrieves the name property from each inventory object. Note that $entity_views extracted from the server-side managed object is an array reference, not a scalar.Retrieves a ServiceInstance object, which can be used to query the server time or to retrieve the ServiceContent object.Returns a ServiceInstance object.Retrieves properties of the service instance enabling access to the managed objects of the service. Alternatively, you can use get_views(), get_view(), and other subroutines to access the objects more directly. If you start with the service content to work with the Web service, you can navigate to the object of interest.Reference to ServiceContent object, which contains managed object references to all inventory content, including the root folder.Session ID cookie for use by load_session().
view_type (optional)
view_type (optional) The Vim::get_views() subroutine takes a reference to an array of managed object references and returns a reference to an array of view objects. Although the array can contain multiple managed object types, objects of only one type can be obtained at the same time.Uses a saved session file or session cookie for connecting to a server. Use Util::connect() instead of Vim::login() after loading the session.
Full path and filename for a session file returned by save_session(). You must specify either session_file or session_id. You must pass in the filename as a hash. To load a session using a session file: load_session(session_file => $filename);To load a session using a session ID: load_session(service_url => $url, session_id => $sessionid);
Disconnects the client from the server and closes the connection to the Web service. Use this subroutine if you connected using Vim::login(). Otherwise, use Util::disconnect().