On Tue, 2011-06-07 at 16:30 +0100, Shriram Rajagopalan wrote:
> On Tue, Jun 7, 2011 at 5:02 AM, Ian Campbell <
Ian.Campbell@xxxxxxxxxx>
> wrote:
>
> On Tue, 2011-06-07 at 04:30 +0100, Shriram Rajagopalan wrote:
> > I am looking into adding Remus support for libxl. The
> easiest way is
> > to obtain the domain's sxpr, so that the rest of Remus
> python code
> > stays as is.
> >
> > Is there an api call in libxl to return a domain's sxpr ? a
> grep on
> > the libxl code
> > base returned nothing. Or am I missing something pretty
> obvious?
>
>
> xl has some code to do this but libxl doesn't. An sxpr
> representation of
> a domain is rather a xend specific concept which is the only
> reason xl
> has it.
> There are some plans to allow libxl to generate json for any
> of the IDL
> defined datastructures, mostly as a convenient pretty-printer
> but being
> machine parsable is a handy side-effect. Currently this would
> just be
> for individual datastructures though.
>
> Where/how does remus use sxp?
> tools/python/xen/remus/vm.py:domtosxpr()
> seems to consume a xend datastructure and make a Remus sxp out
> of it --
> can an xl equivalent not be written using the python bindings?
> (NB
> bindings may be incomplete, we can fix up as you discover
> stuff). Are
> all usages of sxp in Remus of that particular sxp format or
> are there
> others?
>
>
> The only reason remus uses sxpr is because xend conveys info in that
> form. Basically, it only needs the vif device name (vif1.0, etc), the
> disk device name and the access format (tap/drbd) for proper
> operation.