when reading the following code, the line marked with * calls
hasattr(meth, ''api'').
But I cannot find where ''api'' attribute is set to the method
after
searching the whole directory.
And also, what kind of typical methods are in self.xenapi? I traced to
Unix PAM, then get stucked. thanks.
===============tools/python/xen/xend/server/XMLRPCServer.py : line 171
----------------
# Register Xen API Functions
# exportable functions are ones that do not begin with
''_''
# and has the ''api'' attribute.
for meth_name in dir(self.xenapi):
if meth_name[0] != ''_'':
meth = getattr(self.xenapi, meth_name)
* if callable(meth) and hasattr(meth, ''api''):
self.server.register_function(meth, getattr(meth,
''api''))
===============
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel