[Ovirt-devel] Managed Node qpid Modeling

Daniel Veillard veillard at redhat.com
Thu Jul 10 11:49:31 UTC 2008


On Thu, Jul 10, 2008 at 05:51:09AM -0400, Daniel Veillard wrote:
> On Thu, Jul 10, 2008 at 10:18:56AM +0100, Daniel P. Berrange wrote:
> > On Wed, Jul 09, 2008 at 09:55:44PM -0700, Ian Main wrote:
> > > So please take a look and feel free to post questions or comments.
> > > 
> > >     <method name="create_domain" desc="Start a new domain">
> > >       <arg name="description" dir="I" type="sstr" desc="Domain description"/>
> > >       <arg name="vcpus" dir="I" type="unit32" desc="Number of virtual CPUs"/>
> > >       <arg name="max_memory" dir="I" type="unit32" desc="Maximum memory allocated in KB"/>
> > >       <arg name="current_memory" dir="I" type="unit32" desc="Memory to use in KB"/>
> > >       <arg name="boot_device" dir="I" type="sstr" desc="Boot device"/>
> > > 
> > >       <arg name="domain" dir="O" type="sstr" desc="Newly created domain object"/>
> > >       <arg name="result" dir="O" type="ObjID" desc="Description of result.  'success' or 'failure: error msg'"/>
> > >     </method>
[...]
>   Look at http://libvirt.org/html/libvirt-libvirt.html#virDomainCreateLinux
>   virDomainPtr	virDomainCreateLinux	(virConnectPtr conn, 
>   					 const char * xmlDesc,
> 					 unsigned int flags)
> 
> for the description of the creation API and
>   http://libvirt.org/formatdomain.html
>   http://libvirt.org/drvqemu.html#xmlconfig
> for the description of the domain XML format used underneath.

  Note the availability of an existing XML description of libvirt APIs
    http://libvirt.org/libvirt-api.xml

Also installed under
  /usr/share/doc/libvirt-*/libvirt-api.xml

you will find for example:

....
    <function name='virDomainCreateLinux' file='libvirt' module='libvirt'>
      <info>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires privileged access to the hypervisor.</info>
      <return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
      <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
      <arg name='xmlDesc' type='const char *' info='string containing an XML description of the domain'/>
      <arg name='flags' type='unsigned int' info='an optional set of virDomainFlags'/>
    </function>
....

  I use that to (mostly) automatize the python libvirt bindings. I do no
suggest to do the same but a simple XSLT or scripting using those data may
help doing the AMQP bindings.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the ovirt-devel mailing list