[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-API] Help with python binding. my simple example
- To: Joni Lee <webcokies@xxxxxxxxx>
- From: Christopher Winslett <christopherwinslett@xxxxxxxxx>
- Date: Mon, 31 Aug 2009 20:44:43 -0500
- Cc: xen-api@xxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 31 Aug 2009 18:52:04 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=ovLQnG7qPBE9JtYtdAcAvAPE7bsKje0FYr235PtBas6byAgJAF9fOAdGDc29wgqd63 +cIs8Gt/qYlepkjc0GS8nEG2U3xyq30XmGWqcvzOfAIYcq7riSUubOilRaUxiWWyLbxr 9VtOamPqCBueHD7+zy6NJRJeSqFg9BD4wmHSI=
- List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
Don't know that much about Python; however, I did get the Python API to work. My experience is with Ruby; and I'm not the Xen guy, I'm the developer.
First off, I always have to connect with "https" no matter the port, but try " https://localhost" or the IP address of the XenSource server.
Next, my configuration files for the API are not in a *.sxp file, they are in /etc/xensource/xenapi.conf It looks like you aren't even getting to the API server. Python is throwing the error, and not an XML error that you would receive from the API host.
cw
On Mon, Aug 31, 2009 at 5:39 PM, Joni Lee <webcokies@xxxxxxxxx> wrote:
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 PMDid 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
|
-- Christopher Winslett christopherwinslett@xxxxxxxxx
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|