[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] Why it is SESSION_INVALID?


  • To: "xen-api" <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: "pine_tan" <pine_tan@xxxxxxx>
  • Date: Wed, 9 Apr 2008 12:00:50 +0800
  • Delivery-date: Tue, 08 Apr 2008 23:35:34 -0700
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

I am tring to use xen API server.
In /etc/xen/xen-config.sxp, I setup (xen-api-server ((9363 none) (unix none)))

And following is my test code.

###############
from xen.util.xmlrpcclient import ServerProxy
from xen.xm.XenAPI import Session
from xen.xend.XendAPI import XendAPI

if __name__ == "__main__":
        xen = ServerProxy("http://172.19.122.11:9363";)
        print xen.system.listMethods()
        
        session = xen.session.login_with_password("","")
        print session

        all = xen.host.get_all(session)
        print all
#############

Follows are my output

##################
{'Status':'Failure', 'ErrorDescription':['INTERNAL_ERROR','Invalid result 
['PBD.create','PBD.destroy','PBD.get_all',
  ******(more information omitted)]' handling system.listMethods]}

{'Status':'Success', 'Value':'c1bf2101-224e-328d-4ede-1d3758a104b'}

{'Status':'Failure', 'ErrorDescription':['SESSION_INVALID', 
"{'Status':'Success', 'Value':'c1bf2101-224e-328d-4ede-1d3758a104b'}"]}
##############

Now I want to ask two questions:

1) Why listMethods tells me error but it can output some information about the 
methods?
2) Why xen.host.get_all tells me the session is invalid?

2008-04-09   
pine_tan 



_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.