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-devel

[Xen-devel] Getting domain information in xen 3.0.4-1

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Getting domain information in xen 3.0.4-1
From: Thomas Goirand <thomas@xxxxxxxxxx>
Date: Sat, 31 Mar 2007 03:29:04 +0800
Delivery-date: Mon, 02 Apr 2007 05:00:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=98EF9A49
Organization: GPLHost
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060722)
Hi here!

As you may know, we did dtc-xen, that you can find here (and in Debian SID):

http://www.gplhost.com/software-dtc-xen.html

This is a soap server in Python with HTTPS and auth so it's possible to
control Xen from the outside. In our case, we use it inside our control
panel to start / shutdown / destroy a VPS.

The problem is that the internals of the xen lib in /usr/lib/python/xen
changed, and that our software cannot get the information it used to
fetch. The result is that our control panel cannot tell if a VPS is
running or not with that newer version of Xen, which is rather bad.

Here is what we used to do:

import xen.xm.main as xenxm
try:
        if xen_version == 3:
                info = xenxm.server.xend.domain(vpsname)
                return info
        else:
                info = xenxm.server.xend_domain(vpsname)
                return info

The part after the else is for Xen2, of course, and when the method does
return, the object "info" is serialised to the network, then our nusoap
php client gets it in a php array/key object. Everything was fine...
until the release of Xen 3.0.4-1!

The problem is that if I try this:
print xenxm.server.xend.domain( 'xen01' )

python returns: object has no attribute 'xend'

and if I try this:
print xenxm.server.xend_domain( 'xen01' )

python returns: object has no attribute 'xend_domain'

I did a diff between xen 3.0.3 and 3.0.4, and it really seems that the
method changed from xend.domain() back to xend_domain() like how it was
in xen 2.

So I have 2 questions: 1st, how do I get it running under any conditions
again, like expected? Am-I missing something obvious here? How do I get
access to the xen_domain() that still seems to be in the python lib?

2nd question: how comes the lib in /usr/lib/python/xen is changing from
3.0.3 to 3.0.4? Isn't that supposed to be accessed by anybody that wants
to do some programming with Xen?

Please help us, we got 3 new Xen servers in production recently, they
are up-and-running with Xen 3.0.4, and I really don't want to do some
ugly code that would fork another process with something like "xm list
xen01". Also, I'd like to correct our package before Etch is out, and
it's waiting for this fix before it's uploaded again...

Last: as far as I could see, the Xen API is still not ready, right?

Thomas Goirand

P.S: I know it's not very polite to say so, but please add my email as
cc: as I'm not willing to read all the list and subscribe, even if I
often read the archive.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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