Using the VmaTargetLib Library
The VmaTargetLib library allows you to programmatically connect to vMA targets by using Perl or Java. Agents can link with VmaTargetLib and use vi-fastpass functionality. The VmaTargetLib library allows you to enable vi-fastpass authentication and to query or list one or more targets with the following commands:
EnumerateTargets – Retrieves a list of all servers that are vMA targets.
QueryTarget – Retrieves connection information for a target server.
Login – Connects to a target server.
See the VmaTargetLib java library for a more detailed reference to the Java interface. You can find samples in /opt/vmware/vma/samples.
VmaTargetLib Reference
You can use the following VmaTargetLib commands in Perl or Java programs.
Enumerating Targets
Usage
Description
Returns a list of target vCenter Server or ESXi systems added to the vMA instance by using vifp addserver.
Options
None
Returns
Returns a list of all target servers.
Querying Targets
Usage
query_target (<servername>)
Description
Allows the caller, for example, an agent, to retrieve login credentials from a vMA target and use those credentials to connect to the vMA target.
Options
One of the servers added to this vMA instance using vifp addserver. Can be an ESXi host or a vCenter Server system.
Returns
Returns a specific vMA target server.
Programmatic Login
Usage
Description
Allows a program to log in to a target server programmatically.
Options
Returns
Returns 1 if successful and 0 otherwise.
Programmatic Logout
Usage
Description
Allows a program to log out of a target server programmatically.
Options