WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] Why it is SESSION_INVALID?

To: "xen-api" <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] Why it is SESSION_INVALID?
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>