As a by-product, the vSphere Java API makes Jython programming a lot easier. The following is a very simple sample written in Jython to print out the name of the first virtual machine in inventory.
from java.net import * from com.vmware.vim25.mo import * si= ServiceInstance(URL(“https://sjin-dev1/sdk”),\ “root”, “password”, True) rootFolder = si.getRootFolder() vms = InventoryNavigator(rootFolder) \ .searchManagedEntities(“VirtualMachine”) print “Hello ” + vms.getName() si.getServerConnection().logout()
As you can see, it really brings in the benefit of VI Java API into Python community at almost no extra cost.
Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.