[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-API] Diferences in Xen API languages bindings ou implementations?
XenAPI.py is a thin layer on top of the raw XMLRPC which hides some aspects of
the session handling and error checking. I don't think it's documented anywhere
as far as I know, so figuring out how to get some things to work involves
looking at the source. I often use the standard 'xmlrpclib' module instead,
which you might find is closer to the documented API.
For reference, here's how to call session.get_this_host using both libraries:
First, using XenAPI.py:
session = XenAPI.Session("http://localhost/")
Secondly, using xmlrpclib:
Hope this helps!
On 15 Sep 2010, at 22:17, Erick Gomes wrote:
> I'm new in Xen and here.
> I have studied the Xen API and some questions happened, but i will try
> to resume all in one question:
> I understood that the xenapi is like an set of XML-RPC's that can be
> used as libraries for some languages, like XenAPI.py, etc. My question
> is, there are any possibility that the implementation of those libraries
> doesn't implement the full capabilities of Xen Management API? Or there
> are diferentes APIs implementations?
> I sad this because i am try to execute "session.get_this_host(session
> id, session ref)" using XenAPI.py or directly using xmlrpclib for
> python, and only with the xmlrpc i can execute with sucess.
xen-api mailing list