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

On Mon, Jan 02, 2006 at 02:43:05PM +0100, Jean-David Silberzahn 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 ...

+1 

The simplest way is probably to read the xend source code to get
an exhaustive list, the problem is that as long as it's not
'officially' documented, I'm afraid you can have garantee that
the interface or its semantic won't change.

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

  Thanks for the informations !

> 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).

  Anthony Liguori also suggested last month the possibility to add an
XML-RPC interface, which would certainly make it easier to use in a
variety of environments (at the expense of slightly more CPU usage I
guess) and feel more confident about this being a supported interface.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

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