[Xen-users] Question about XenAPI

pine_tan
Thu, 03 Apr 2008 08:59:17 -0000

Following is part of my /etc/xen/xen-config.sxp about xmlrpcserver
(xend-tcp-xmlrpc-server yes)
(xend-unix-xmlrpc-server no)
(xend-tcp-xmlrpc-server-address '''')
(xend-tcp-xmlrpc-server-port 8006)

I can connect my xen xmlrpcserver with 8006 port with Python code as follows:
...
from xen.util.xmlrpcclient import ServerProxy

mySP = ServerProxy(URLOfMyServerAndPort)
print mySP.system.listMethods()
...

It gives me a api list as "xend.domain.*" , "xend.node.*"
and others. Yes, it is OK.
But where is the other APIs such as "VM.get_platform"?

I insert a log.info into XMLRPCServer class''s run function of
/usr/lib/python/xen/xend/server/XMLRPCServer.py as follows:
# Register Xen API Function
....
for meth_name in dir(self.xenapi):
...
if callable(meth) and hasattr(meth, ''api''):
log.info("xmlrpc try to reg. %s as %s",(meth_name,
getattr(meth,''api'')))
self.server.register_function(meth, getattr(meth,''api''))
...

After I restart xend using "service xend restart", I can find some api
such as "VM.get_platform" in /var/log/xen/xend.log file.

Then what is the matter? Why my server does no has those APIs?

Another question, how can I config username/passwd for xmlrpc server?

Thanks a lot!