I'm trying to get a simple inventory list of servers (by hostname) from Xencenter, using XenAPI from the python shell. However, the documentation on XenAPI seems to be pretty sparse, and I'm unable to even do a dir() on the objects that I need to learn more about.
I installed it and ran as follows:
# pip install XenAPI
# python
>>> session = XenAPI.Session("http://myhost")
>>> session.xenapi.login_with_password("myuser", "mypass")
I'm stuck here. Where pysphere has a simple way to pull all VM's, I can't figure out how to do the same thing in XenAPI. A dir(session) does not allow me to view the object -- it looks like the implementation of dict() was not done properly?
Does someone have experience with this module?