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

Re: [Xen-users] xend http interface

To: Jean-David Silberzahn <jds@xxxxxxxxxx>
Subject: Re: [Xen-users] xend http interface
From: Anand <xen.mails@xxxxxxxxx>
Date: Mon, 2 Jan 2006 19:36:16 +0530
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 02 Jan 2006 14:11:20 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=QJoNOzZCOI2aWb4VbLX3xKIU66L44ezEL7O1ztCEzBc4OzxzppbAFVd0nxRcunwsAqir0C6jgzO74n9W5pWfqSyoyx6nXbJBlv964IpX/jpS9h4VZZbysWkOEvrti7QE0dfNpgNwnyeUcZOZ7iCgl4Q1gTdz+0YNWyfWQdd03Xk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <43B92DE9.8030605@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <acb757c00512301017q16cda192g40927118ccbb5924@xxxxxxxxxxxxxx> <43B8FBCD.3030306@xxxxxxxxxx> <acb757c00601020506k58f849f2n102e8ac5b0433a3a@xxxxxxxxxxxxxx> <43B92DE9.8030605@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thanks Jean for the information.

I tried the the http://xendomain:8000/xend/domain/?detail=1, it shows me exactly the same as http://xendomain:8000/xend/domain

I will appreciate if you can you explain these parameter below ? Are they related to cpu time scheduling for the domain ?

op=cpu_sedf_set&latency=nnn
&slice=nnn&period=nnn&weight=nnn&extratime=n
: réglage des paramètres sedf (xm sched-sedf)


On 1/2/06, Jean-David Silberzahn <jds@xxxxxxxxxx> wrote:
I've not the complete list of commands for http interface, I try to
discover them when I need to use it ... If someone has this list or know
where to find it, i would appreciate too to get this ...
However, the command I already found and use with the HTTP interface are
those :

GET requests :
/xend/domain/ AND /xend/domain/?detail=1 : to get a list of all started
nodes (detailed or not)
/xend/node : to get informations on the node on which xen runs (free
memory, number of cpu, ...)

POST requests on /xend/domain :
parameters : op=create&config=s-_expression_ : to create a paused domU
with his config urlencoded in "s-_expression_" (s-expr = (domain (memory
128)(device (vbd (dev xvda1)(uname phy:device)(mode w))) ............)

POST requests on /xend/domain/domain-name :
parameters : op=wait_for_devices : command to wait for the devices of a
newly created domU before unpausing it
parameters : op=unpause : unpause a domU (xm unpause)
parameters : op=pause : pause a domU (xm pause)
parameters : op=destroy : destroy a domU (xm destroy)
parameters : op=shutdown&reason=(halt|poweroff|reboot) : 3 different
ways to shutdown your domU
parameters :
op=cpu_sedf_set&latency=nnn&slice=nnn&period=nnn&weight=nnn&extratime=n
: réglage des paramètres sedf (xm sched-sedf)

I think it's possible to do migrations, save and restore, and many other
things, but i have not searched how to use those commands

Another think to know when using the HTTP interface is that xend acts
differently depending on the headers (especially the Accept: HTTP
header) : if you don't put such a header, it will answer you with
s-_expression_ (useful if you are developping something over xen for
example) and if you put one, you'll get an HTML formatted answer (useful
to read it, even if the s-expressions mostly contains more informations).

regards,
--
Jean-David Silberzahn

ADVISEO
http://www.adviseo.fr/
http://www.open-sp.fr/



Anand a écrit :

> Dear Jean,
>
> Thanks a lot for the help.
>
> Is there some kind of documentation for the complete list of commands
> for http interface ? Alternatively if you have the list and
> explanation i would very appreciate if you can post it here.
>
> On 1/2/06, *Jean-David Silberzahn* <jds@xxxxxxxxxx
> <mailto:jds@xxxxxxxxxx>> wrote:
>
>     Anand a écrit :
>
>     > While going through the manual i came to know that xend has an http
>     > interface which can be used to interact with xen. However
>     searching on
>     > the lists and googling only resulted in 3-4 posts on the devel list
>     > which still didn't have any information on the same.
>     >
>     > Is anyone using it ... ?
>
>     We are using this interface to control the xend daemon. With this
>     interface, you can do quite everything you can with the xm tool.
>     For example to destroy a domain, you can do a HTTP POST request on
>     this
>     url :
>     http://xenserver:8000/xend/domain/domain-name
>     with parameter
>     op=destroy
>     To create a domainU, you can do a POST request on this url :
>     http://xenserver:8000/xend/domain/
>     with parameter
>     op=create&config=s-_expression_
>     s-_expression_ is the xen configuration format (you can look at it
>     making
>     a xm list -l for example)
>     To list started domains :
>     http://xenserver:8000/xend/domain/
>     or
>     http://xenserver:8000/xend/domain/?detail=1
>     <http://xenserver:8000/xend/domain/?detail=1>
>
>     The http server don't exactly map xm commands however : to boot a new
>     server, you have 2 or 3 operations to do when using the http server :
>     create, wait_for_devices and unpause
>
>     The xend HTTP interface is accessible via a TCP socket or via an Unix
>     socket (way used by xm in xen-3.0)
>
>
>
> regards,
>
> Anand
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-users
>


regards,

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