Yesterday I posted an article introducing the virtual appliance Timo created last week. I am sure some of you have given it a try. I hope you liked it. If you haven’t done so, you can download it from Timo’s post.
The virtual appliance ships with only two samples. Definitely not enough. That is why the community needs to work together so that we can match the functionalities of vSphere PowerCLI.
The following are two samples by David Rousseau who is an independent consultant living in Paris. Thanks for his permission to publish his code here. He owns the copyright of the code. If you want to use it, you can contact him or leave a message in this post.
- jython_rest.py: This code shows how to use the tiny Client REST API I created. Check out this article for more details of the API itself.
- jython_test.py: list all the hosts, resource pools, virtual machines and vApps that are found at the server.
To help you understand the code, I added a little comment before each file.