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

Re: [Xen-API] Help with python binding. my simple example

To: Christopher Winslett <christopherwinslett@xxxxxxxxx>
Subject: Re: [Xen-API] Help with python binding. my simple example
From: Joni Lee <webcokies@xxxxxxxxx>
Date: Mon, 31 Aug 2009 15:39:32 -0700 (PDT)
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 31 Aug 2009 15:39:35 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1251758372; bh=aSaLpBy3taaoCi1s1jyMu+v20J6nZSUu8MK1BgrFPsQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=qWSRd8HtvegA9bYgE5JNPj1dwuhwNqB86zR5gOy+k0ZD41sdGh6QnFXYQX/zn2lDPTsDtUnuyaP+6cT+yoktyeLMWq0igx4I7bxNi3yad7nmd1VmMETRKtpMhbl55AAz7oKNnYpvM4Ccie4MV79O9gt0Khh8kRjpbrFVdBgsKfY=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=FVyDZDSqmnJwt0sYb9e/PaPn5j9Vx0EXWuztcr96Jmz2fl25jRdJuEwdh+/XSyrtL8eNLLh7tHHxqxTEWp/4bNdMBSsen6PjHv1lfb3TvQaGXQ5+SLj48oKQtXErcco3aXGQgZ7HDReJST378DLr5wIR8UU6EtExBwB7q4Aojno=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <96a7a7780908310947i7a2f8a14m22ec6321d443d588@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
First Thank  you Christoph for answering me.
I don't know where is the configuration for API. If it is in the xend-config.sxp
Yes, I have these on

(xend-tcp-xmlrpc-server yes)
(xend-unix-xmlrpc-server yes)
(xend-tcp-xmlrpc-server-address 'localhost')
(xend-tcp-xmlrpc-server-port 8006)

When I look into XenAPI.py there is no def login_with_password in it.
I wonder where the function login_with_password comes from?
Any ideas?

--- On Mon, 8/31/09, Christopher Winslett <christopherwinslett@xxxxxxxxx> wrote:

From: Christopher Winslett <christopherwinslett@xxxxxxxxx>
Subject: Re: [Xen-API] Help with python binding. my simple example
To: "Joni Lee" <webcokies@xxxxxxxxx>
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Date: Monday, August 31, 2009, 11:47 PM

Did you change your API port to use 8006?  I typically use https://localhost

cw

On Mon, Aug 31, 2009 at 9:25 AM, Joni Lee <webcokies@xxxxxxxxx> wrote:
Hi list,

I install xen 3.3 from apt-get xen-server install
on Ubuntu and this is my small Python script:
-------------------------------------------------------------
import sys
sys.path.append('/usr/lib/python2.6/site-packages')
from xen.xm.XenAPI import Session
session = Session('http://localhost:8006/')
session.login_with_password('root', '')
-------------------------------------------------------------
and it returns
"xen.xm.XenAPI.Failure: The method session.login_with_password is unsupported"
-------------------------------------------------------------
Please help me with the first step into binding. I only want to get the information about the resource assumption such as CPU, RAM of the doms.

Thank you very much


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




--
Christopher Winslett
christopherwinslett@xxxxxxxxx

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>