[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [Docs] More work on the API and architecture



  Another patch, incomplete adding a new page api.html[.in]
with the goals of describing the main API concepts, architectures,
naming conventions, etc ... It includes Dan's graphics and a change of
how the stylesheet process the .html.in content allowing to turn
<code class='docref'>foo</code> into a link to reference for foo in the
API page. Ultimately I should be able to load the API description from
the stylesheet and do that link generation automagically without any
markup (like all the links in the API reference).
  Still need to write the drivers and remote sections, and augment some
of the APIs entry points, but it's a first step and better in than out.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
Index: docs/api.html.in
===================================================================
RCS file: docs/api.html.in
diff -N docs/api.html.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ docs/api.html.in	14 Apr 2009 13:34:06 -0000
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<html>
+  <body>
+    <h1>The libvirt API concepts</h1>
+
+    <p> This page describes the main principles and architecture choices
+    behind the definition of the libvirt API:
+    <ul>
+      <li>
+        <a href="#Objects">Objects exposed</a>
+      </li>
+      <li>
+        <a href="#Functions">Functions and naming conventions</a>
+      </li>
+      <li>
+        <a href="#Driver">The drivers</a>
+      </li>
+      <li>
+        <a href="#Remote">Daemon and remote access</a>
+      </li>
+    </ul>
+    <h2><a name="Objects" id="Objects">Objects exposed</a></h2>
+    <p> As defined in the <a href="goals.html">goals section</a>, libvirt
+    API need to expose all the resources needed to manage the virtualization
+    support of recent operating systems. The first object manipulated though
+    the API is <code>virConnectPtr</code> which represent a connection to
+    an hypervisor. Any application using libvirt is likely to start using the
+    API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
+    >the virConnectOpen functions</a>. You will note that those functions take
+    a name argument which is actually an URI to select the right hypervisor to
+    open, this is needed to allow remote connections and also select between
+    different possible hypervisors (for example on a Linux system it may be
+    possible to use both KVM and LinuxContainers on the same node). A NULL
+    name will default to a preselected hypervisor but it's probably not a
+    wise thing to do in most cases. See the <a href="uri.html">connection
+    URI</a> page for a full descriptions of the values allowed.<p>
+    <p> Once the application obtained a <code class='docref'>virConnectPtr</code>
+    connection to the
+    hypervisor it can then use it to manage domains and related resources
+    available for virtualization like storage and networking. All those are
+    exposed as first class objects, and connected to the hypervisor connection
+    (and the node or cluster where it is available).</p>
+    <p class="image">
+      <img alt="first class objects exposed by the API"
+           src="libvirt-object-model.gif"/>
+    </p>
+    <p> The figure above shows the five main objects exported by the API:</p>
+    <ul>
+      <li>virConnectPtr: represent a connection to an hypervisor.</li>
+      <li>virDomainPtr: represent one domain either active or defined (i.e.
+      existing as permanent config file and storage but not currently running
+      on that node). The function <code class='docref'>virConnectListDomains</code>
+      allows to list all the IDs for the domains active on this hypervisor.</li>
+      <li>virNetworkPtr: represent one network either active or defined (i.e.
+      existing as permanent config file and storage but not currently activated.
+      The function <code class='docref'>virConnectListNetworks</code>
+      allows to list all the virtualization networks actived on this node.</li>
+      <li>virStorageVolPtr: represent one storage volume, usually this is used
+      as a block device available to one of the domains. The function
+      <code class="docref">virStorageVolLookupByPath</code> allows to find
+      the object based on its path on the node.</li>
+      <li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
+      which can be used to allocate and store storage volumes. The function
+      <code class="docref">virStoragePoolLookupByVolume</code> allows to find
+      the storage pool containing a given storage volume.</li>
+    </ul>
+    <p> Most object manipulated by the library can also be represented using
+      XML descriptions. This is used primarily to create those object, but is
+      also helpful to modify or save their description back.</p>
+    <p> Domains, network and storage pools can be either <code>active</code>
+      i.e. either running or available for immediate use, or
+      <code>defined</code> in which case they are inactive but there is
+      a permanent definition available in the system for them. Based on this
+      thay can be activated dynamically in order to be used.</p>
+    <p> Most kind of object can also be named in various ways:<p>
+    <ul>
+      <li>by their <code>name</code>, an user friendly identifier but
+      whose unicity cannot be garanteed between two nodes.</li>
+      <li>by their <code>ID</code>, which is a runtime unique identifier
+      provided by the hypervisor for one given activation of the object,
+      but it becomes invalid once the resource is deactivated.</li >
+      <li>by their <code>UUID</code>, a 16 bytes unique identifier
+      as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt";>RFC 4122</a>,
+      which is garanteed to be unique for long term usage and across a
+      set of nodes.</li>
+    </ul>
+    
+    <h2><a name="Functions" id="Functions">Functions and naming
+      conventions</a></h2>
+    <p> The naming of the functions present in the library is usually
+      made of a prefix describing the object associated to the function
+      and a verb describing the action on that object.</p>
+    <p> For each first class object you will find apis
+      for the following actions:</p>
+    <ul>
+      <li><b>Lookup</b>:...LookupByName, 
+      <li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
+        those are used to enumerate a set of object available to an given
+        hypervisor connection like:
+        <code class='docref'>virConnectListDomains</code>,
+        <code class='docref'>virConnectNumOfDomains</code>,
+        <code class='docref'>virConnectListNetworks</code>,
+        <code class='docref'>virConnectListStoragePools</code>, etc.</li>
+      <li><b>Description</b>: ...GetInfo: those are generic accessor providing
+        a set of informations about an object, they are
+        <code class='docref'>virNodeGetInfo</code>,
+        <code class='docref'>virDomainGetInfo</code>,
+        <code class='docref'>virStoragePoolGetInfo</code>,
+        <code class='docref'>virStorageVolGetInfo</code>.</li>
+      <li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
+        accessors to query or modify the given object, like
+        <code class='docref'>virConnectGetType</code>,
+        <code class='docref'>virDomainGetMaxMemory</code>,
+        <code class='docref'>virDomainSetMemory</code>,
+        <code class='docref'>virDomainGetVcpus</code>,
+        <code class='docref'>virStoragePoolSetAutostart</code>,
+        <code class='docref'>virNetworkGetBridgeName</code>, etc.</li>
+      <li><b>Creation</b>: </li>
+      <li><b>Destruction</b>: ... </li>
+    </ul>
+    <p> For more in-depth details of the storage related APIs see
+      <a href="storage.html">the storage management page</a>, 
+    <h2><a name="Driver" id="Driver">The libvirt drivers</a></h2>
+    <p></p>
+    <p class="image">
+      <img alt="The libvirt driver architecture"
+           src="libvirt-driver-arch.gif"/>
+    </p>
+    <h2><a name="Remote" id="Remote">Daemon and remote access</a></h2>
+    <p></p>
+    <p class="image">
+      <img alt="The libvirt daemon and remote architecture"
+           src="libvirt-daemon-arch.gif"/>
+    </p>
+  </body>
+</html>
Index: docs/api.html
===================================================================
RCS file: docs/api.html
diff -N docs/api.html
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ docs/api.html	14 Apr 2009 13:34:06 -0000
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<!--
+        This file is autogenerated from api.html.in
+        Do not edit this file. Changes will be lost.
+      -->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+    <link rel="stylesheet" type="text/css" href="main.css" />
+    <link rel="SHORTCUT ICON" href="32favicon.png" />
+    <title>libvirt: The libvirt API concepts</title>
+    <meta name="description" content="libvirt, virtualization, virtualization API" />
+  </head>
+  <body>
+    <div id="header">
+      <div id="headerLogo"></div>
+      <div id="headerSearch">
+        <form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
+            <input id="query" name="query" type="text" size="12" value="" />
+            <input id="submit" name="submit" type="submit" value="Search" />
+          </div></form>
+      </div>
+    </div>
+    <div id="body">
+      <div id="menu">
+        <ul class="l0"><li>
+            <div>
+              <a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
+              <ul class="l1"><li>
+                  <div>
+                    <a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
+                    <ul class="l2"><li>
+                        <div>
+                          <a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <span class="active">API concepts</span>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
+                        </div>
+                      </li></ul>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
+                  </div>
+                </li></ul>
+            </div>
+          </li><li>
+            <div>
+              <a title="User contributed content" class="inactive" href="http://wiki.libvirt.org";>Wiki</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
+            </div>
+          </li></ul>
+      </div>
+      <div id="content">
+        <h1>The libvirt API concepts</h1>
+        <p> This page describes the main principles and architecture choices
+    behind the definition of the libvirt API:
+    </p>
+        <ul><li>
+        <a href="#Objects">Objects exposed</a>
+      </li><li>
+        <a href="#Functions">Functions and naming conventions</a>
+      </li><li>
+        <a href="#Driver">The drivers</a>
+      </li><li>
+        <a href="#Remote">Daemon and remote access</a>
+      </li></ul>
+        <h2>
+          <a name="Objects" id="Objects">Objects exposed</a>
+        </h2>
+        <p> As defined in the <a href="goals.html">goals section</a>, libvirt
+    API need to expose all the resources needed to manage the virtualization
+    support of recent operating systems. The first object manipulated though
+    the API is <code>virConnectPtr</code> which represent a connection to
+    an hypervisor. Any application using libvirt is likely to start using the
+    API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen">the virConnectOpen functions</a>. You will note that those functions take
+    a name argument which is actually an URI to select the right hypervisor to
+    open, this is needed to allow remote connections and also select between
+    different possible hypervisors (for example on a Linux system it may be
+    possible to use both KVM and LinuxContainers on the same node). A NULL
+    name will default to a preselected hypervisor but it's probably not a
+    wise thing to do in most cases. See the <a href="uri.html">connection
+    URI</a> page for a full descriptions of the values allowed.</p>
+        <p>
+    </p>
+        <p> Once the application obtained a <a href="html/libvirt-libvirt.html#virConnectPtr"><code>virConnectPtr</code></a>
+    connection to the
+    hypervisor it can then use it to manage domains and related resources
+    available for virtualization like storage and networking. All those are
+    exposed as first class objects, and connected to the hypervisor connection
+    (and the node or cluster where it is available).</p>
+        <p class="image">
+      <img alt="first class objects exposed by the API" src="libvirt-object-model.gif" /></p>
+        <p> The figure above shows the five main objects exported by the API:</p>
+        <ul><li>virConnectPtr: represent a connection to an hypervisor.</li><li>virDomainPtr: represent one domain either active or defined (i.e.
+      existing as permanent config file and storage but not currently running
+      on that node). The function <a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>
+      allows to list all the IDs for the domains active on this hypervisor.</li><li>virNetworkPtr: represent one network either active or defined (i.e.
+      existing as permanent config file and storage but not currently activated.
+      The function <a href="html/libvirt-libvirt.html#virConnectListNetworks"><code>virConnectListNetworks</code></a>
+      allows to list all the virtualization networks actived on this node.</li><li>virStorageVolPtr: represent one storage volume, usually this is used
+      as a block device available to one of the domains. The function
+      <a href="html/libvirt-libvirt.html#virStorageVolLookupByPath"><code>virStorageVolLookupByPath</code></a> allows to find
+      the object based on its path on the node.</li><li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
+      which can be used to allocate and store storage volumes. The function
+      <a href="html/libvirt-libvirt.html#virStoragePoolLookupByVolume"><code>virStoragePoolLookupByVolume</code></a> allows to find
+      the storage pool containing a given storage volume.</li></ul>
+        <p> Most object manipulated by the library can also be represented using
+      XML descriptions. This is used primarily to create those object, but is
+      also helpful to modify or save their description back.</p>
+        <p> Domains, network and storage pools can be either <code>active</code>
+      i.e. either running or available for immediate use, or
+      <code>defined</code> in which case they are inactive but there is
+      a permanent definition available in the system for them. Based on this
+      thay can be activated dynamically in order to be used.</p>
+        <p> Most kind of object can also be named in various ways:</p>
+        <p>
+    </p>
+        <ul><li>by their <code>name</code>, an user friendly identifier but
+      whose unicity cannot be garanteed between two nodes.</li><li>by their <code>ID</code>, which is a runtime unique identifier
+      provided by the hypervisor for one given activation of the object,
+      but it becomes invalid once the resource is deactivated.</li><li>by their <code>UUID</code>, a 16 bytes unique identifier
+      as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt";>RFC 4122</a>,
+      which is garanteed to be unique for long term usage and across a
+      set of nodes.</li></ul>
+        <h2>
+          <a name="Functions" id="Functions">Functions and naming
+      conventions</a>
+        </h2>
+        <p> The naming of the functions present in the library is usually
+      made of a prefix describing the object associated to the function
+      and a verb describing the action on that object.</p>
+        <p> For each first class object you will find apis
+      for the following actions:</p>
+        <ul><li><b>Lookup</b>:...LookupByName, 
+      </li><li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
+        those are used to enumerate a set of object available to an given
+        hypervisor connection like:
+        <a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>,
+        <a href="html/libvirt-libvirt.html#virConnectNumOfDomains"><code>virConnectNumOfDomains</code></a>,
+        <a href="html/libvirt-libvirt.html#virConnectListNetworks"><code>virConnectListNetworks</code></a>,
+        <a href="html/libvirt-libvirt.html#virConnectListStoragePools"><code>virConnectListStoragePools</code></a>, etc.</li><li><b>Description</b>: ...GetInfo: those are generic accessor providing
+        a set of informations about an object, they are
+        <a href="html/libvirt-libvirt.html#virNodeGetInfo"><code>virNodeGetInfo</code></a>,
+        <a href="html/libvirt-libvirt.html#virDomainGetInfo"><code>virDomainGetInfo</code></a>,
+        <a href="html/libvirt-libvirt.html#virStoragePoolGetInfo"><code>virStoragePoolGetInfo</code></a>,
+        <a href="html/libvirt-libvirt.html#virStorageVolGetInfo"><code>virStorageVolGetInfo</code></a>.</li><li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
+        accessors to query or modify the given object, like
+        <a href="html/libvirt-libvirt.html#virConnectGetType"><code>virConnectGetType</code></a>,
+        <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory"><code>virDomainGetMaxMemory</code></a>,
+        <a href="html/libvirt-libvirt.html#virDomainSetMemory"><code>virDomainSetMemory</code></a>,
+        <a href="html/libvirt-libvirt.html#virDomainGetVcpus"><code>virDomainGetVcpus</code></a>,
+        <a href="html/libvirt-libvirt.html#virStoragePoolSetAutostart"><code>virStoragePoolSetAutostart</code></a>,
+        <a href="html/libvirt-libvirt.html#virNetworkGetBridgeName"><code>virNetworkGetBridgeName</code></a>, etc.</li><li><b>Creation</b>: </li><li><b>Destruction</b>: ... </li></ul>
+        <p> For more in-depth details of the storage related APIs see
+      <a href="storage.html">the storage management page</a>, 
+    </p>
+        <h2>
+          <a name="Driver" id="Driver">The libvirt drivers</a>
+        </h2>
+        <p></p>
+        <p class="image">
+      <img alt="The libvirt driver architecture" src="libvirt-driver-arch.gif" /></p>
+        <h2>
+          <a name="Remote" id="Remote">Daemon and remote access</a>
+        </h2>
+        <p></p>
+        <p class="image">
+      <img alt="The libvirt daemon and remote architecture" src="libvirt-daemon-arch.gif" /></p>
+      </div>
+    </div>
+    <div id="footer">
+      <p id="sponsor">
+	    Sponsored by:<br /><a href="http://et.redhat.com/";><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
+    </div>
+  </body>
+</html>
Index: docs/archdomain.html
===================================================================
RCS file: /data/cvs/libxen/docs/archdomain.html,v
retrieving revision 1.9
diff -u -r1.9 archdomain.html
--- docs/archdomain.html	2 Apr 2009 12:01:11 -0000	1.9
+++ docs/archdomain.html	14 Apr 2009 13:34:06 -0000
@@ -52,6 +52,10 @@
                         </div>
                       </li><li>
                         <div>
+                          <a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
+                        </div>
+                      </li><li>
+                        <div>
                           <span class="active">Domains</span>
                         </div>
                       </li><li>
Index: docs/archnetwork.html
===================================================================
RCS file: /data/cvs/libxen/docs/archnetwork.html,v
retrieving revision 1.9
diff -u -r1.9 archnetwork.html
--- docs/archnetwork.html	2 Apr 2009 12:01:11 -0000	1.9
+++ docs/archnetwork.html	14 Apr 2009 13:34:06 -0000
@@ -52,6 +52,10 @@
                         </div>
                       </li><li>
                         <div>
+                          <a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
+                        </div>
+                      </li><li>
+                        <div>
                           <a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
                         </div>
                       </li><li>
Index: docs/archnode.html
===================================================================
RCS file: /data/cvs/libxen/docs/archnode.html,v
retrieving revision 1.9
diff -u -r1.9 archnode.html
--- docs/archnode.html	2 Apr 2009 12:01:11 -0000	1.9
+++ docs/archnode.html	14 Apr 2009 13:34:06 -0000
@@ -52,6 +52,10 @@
                         </div>
                       </li><li>
                         <div>
+                          <a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
+                        </div>
+                      </li><li>
+                        <div>
                           <a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
                         </div>
                       </li><li>
Index: docs/archstorage.html
===================================================================
RCS file: /data/cvs/libxen/docs/archstorage.html,v
retrieving revision 1.9
diff -u -r1.9 archstorage.html
--- docs/archstorage.html	2 Apr 2009 12:01:11 -0000	1.9
+++ docs/archstorage.html	14 Apr 2009 13:34:06 -0000
@@ -52,6 +52,10 @@
                         </div>
                       </li><li>
                         <div>
+                          <a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
+                        </div>
+                      </li><li>
+                        <div>
                           <a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
                         </div>
                       </li><li>
Index: docs/goals.html
===================================================================
RCS file: /data/cvs/libxen/docs/goals.html,v
retrieving revision 1.1
diff -u -r1.1 goals.html
--- docs/goals.html	2 Apr 2009 12:01:11 -0000	1.1
+++ docs/goals.html	14 Apr 2009 13:34:06 -0000
@@ -52,6 +52,10 @@
                         </div>
                       </li><li>
                         <div>
+                          <a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
+                        </div>
+                      </li><li>
+                        <div>
                           <a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
                         </div>
                       </li><li>
Index: docs/intro.html
===================================================================
RCS file: /data/cvs/libxen/docs/intro.html,v
retrieving revision 1.48
diff -u -r1.48 intro.html
--- docs/intro.html	2 Apr 2009 12:01:11 -0000	1.48
+++ docs/intro.html	14 Apr 2009 13:34:06 -0000
@@ -52,6 +52,10 @@
                         </div>
                       </li><li>
                         <div>
+                          <a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
+                        </div>
+                      </li><li>
+                        <div>
                           <a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
                         </div>
                       </li><li>
Index: docs/libvirt-daemon-arch.fig
===================================================================
RCS file: docs/libvirt-daemon-arch.fig
diff -N docs/libvirt-daemon-arch.fig
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ docs/libvirt-daemon-arch.fig	14 Apr 2009 13:34:06 -0000
@@ -0,0 +1,112 @@
+#FIG 3.2  Produced by xfig version 3.2.5
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 6707 1063 8622 1542
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 6707 1063 8622 1063 8622 1542 6707 1542 6707 1063
+4 0 0 50 -1 16 19 0.0000 4 168 503 6826 1422 xen\001
+-6
+6 6707 1662 8622 2140
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 6707 1662 8622 1662 8622 2140 6707 2140 6707 1662
+4 0 0 50 -1 16 19 0.0000 4 240 766 6826 2021 qemu\001
+-6
+6 6707 2260 8622 2739
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 6707 2260 8622 2260 8622 2739 6707 2739 6707 2260
+4 0 0 50 -1 16 19 0.0000 4 240 1006 6826 2619 openvz\001
+-6
+6 6707 2859 8622 3338
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 6707 2859 8622 2859 8622 3338 6707 3338 6707 2859
+4 0 0 50 -1 16 19 0.0000 4 239 407 6826 3218 lxc\001
+-6
+6 6707 3457 8622 3936
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 6707 3457 8622 3457 8622 3936 6707 3936 6707 3457
+4 0 0 50 -1 16 19 0.0000 4 215 527 6826 3816 test\001
+-6
+6 6707 4056 8622 4535
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 6707 4056 8622 4056 8622 4535 6707 4535 6707 4056
+4 0 0 50 -1 16 19 0.0000 4 215 958 6826 4415 remote\001
+-6
+6 15445 1063 17361 1542
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 15445 1063 17361 1063 17361 1542 15445 1542 15445 1063
+4 0 0 50 -1 16 19 0.0000 4 168 503 15565 1422 xen\001
+-6
+6 15445 1662 17361 2140
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 15445 1662 17361 1662 17361 2140 15445 2140 15445 1662
+4 0 0 50 -1 16 19 0.0000 4 240 766 15565 2021 qemu\001
+-6
+6 15445 2260 17361 2739
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 15445 2260 17361 2260 17361 2739 15445 2739 15445 2260
+4 0 0 50 -1 16 19 0.0000 4 240 1006 15565 2619 openvz\001
+-6
+6 15445 2859 17361 3338
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 15445 2859 17361 2859 17361 3338 15445 3338 15445 2859
+4 0 0 50 -1 16 19 0.0000 4 239 407 15565 3218 lxc\001
+-6
+6 15445 3457 17361 3936
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 15445 3457 17361 3457 17361 3936 15445 3936 15445 3457
+4 0 0 50 -1 16 19 0.0000 4 215 527 15565 3816 test\001
+-6
+6 15445 4056 17361 4535
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 15445 4056 17361 4056 17361 4535 15445 4535 15445 4056
+4 0 0 50 -1 16 19 0.0000 4 215 958 15565 4415 remote\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1200 1781 3115 1781 3115 2739 1200 2739 1200 1781
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 95.77 191.54
+	 3115 2260 5031 2260
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
+	0 0 1.00 95.77 191.54
+	 8622 4295 9819 4295 10298 2260 10777 2260
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
+	0 0 1.00 95.77 191.54
+	 5031 2260 5988 2260 6347 4295 6707 4295
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 5031 824 8861 824 8861 4774 5031 4774 5031 824
+2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2
+	 5031 824 5031 4774
+2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
+	 5988 824 5988 4774
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 95.77 191.54
+	 12692 2260 13769 2260
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 10777 1781 12692 1781 12692 2739 10777 2739 10777 1781
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
+	0 0 1.00 95.77 191.54
+	 13769 2260 14727 2260 14966 3098 15445 3098
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 13769 824 17600 824 17600 4774 13769 4774 13769 824
+2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2
+	 13769 824 13769 4774
+2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
+	 14727 824 14727 4774
+4 0 0 50 -1 16 19 0.0000 4 311 1532 1320 2260 Application\001
+4 0 0 50 -1 16 16 0.0000 4 192 455 3594 2140 URI\001
+4 0 0 50 -1 16 19 5.3233 4 239 1436 5869 5133 Driver API\001
+4 0 0 50 -1 16 19 5.3233 4 239 1484 5031 5133 Public API\001
+4 0 0 50 -1 16 19 5.3233 4 311 1508 7425 5133 Driver Impl\001
+4 0 0 50 -1 16 22 0.0000 4 287 910 5869 584 libvirt\001
+4 0 0 50 -1 16 16 0.0000 4 192 1125 3594 2619 lxc://host/\001
+4 0 0 50 -1 16 19 0.0000 4 239 910 10896 2260 libvirtd\001
+4 0 0 50 -1 16 19 5.3233 4 239 1436 14607 5133 Driver API\001
+4 0 0 50 -1 16 19 5.3233 4 239 1484 13769 5133 Public API\001
+4 0 0 50 -1 16 19 5.3233 4 311 1508 16164 5133 Driver Impl\001
+4 0 0 50 -1 16 22 0.0000 4 287 910 14607 584 libvirt\001
Index: docs/libvirt-daemon-arch.gif
===================================================================
RCS file: docs/libvirt-daemon-arch.gif
diff -N docs/libvirt-daemon-arch.gif
Binary files /dev/null and libvirt-daemon-arch.gif differ
Index: docs/libvirt-driver-arch.fig
===================================================================
RCS file: docs/libvirt-driver-arch.fig
diff -N docs/libvirt-driver-arch.fig
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ docs/libvirt-driver-arch.fig	14 Apr 2009 13:34:06 -0000
@@ -0,0 +1,62 @@
+#FIG 3.2  Produced by xfig version 3.2.5
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 1200 225 10950 8147
+6 8208 1291 10646 1900
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 8208 1291 10646 1291 10646 1900 8208 1900 8208 1291
+4 0 0 50 -1 16 24 0.0000 4 214 639 8360 1748 xen\001
+-6
+6 8208 2054 10646 2662
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 8208 2054 10646 2054 10646 2662 8208 2662 8208 2054
+4 0 0 50 -1 16 24 0.0000 4 305 975 8360 2510 qemu\001
+-6
+6 8208 2815 10646 3424
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 8208 2815 10646 2815 10646 3424 8208 3424 8208 2815
+4 0 0 50 -1 16 24 0.0000 4 305 1280 8360 3272 openvz\001
+-6
+6 8208 3577 10646 4187
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 8208 3577 10646 3577 10646 4187 8208 4187 8208 3577
+4 0 0 50 -1 16 24 0.0000 4 304 518 8360 4033 lxc\001
+-6
+6 8208 4339 10646 4948
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 8208 4339 10646 4339 10646 4948 8208 4948 8208 4339
+4 0 0 50 -1 16 24 0.0000 4 274 670 8360 4795 test\001
+-6
+6 8208 5100 10646 5710
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+	 8208 5100 10646 5100 10646 5710 8208 5710 8208 5100
+4 0 0 50 -1 16 24 0.0000 4 274 1219 8360 5557 remote\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1200 2206 3637 2206 3637 3424 1200 3424 1200 2206
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 121.88 243.75
+	 3637 2815 6075 2815
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
+	0 0 1.00 121.88 243.75
+	 6075 2815 7294 2815 7598 3881 8208 3881
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6075 987 10950 987 10950 6014 6075 6014 6075 987
+2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2
+	 6075 987 6075 6014
+2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
+	 7294 987 7294 6014
+4 0 0 50 -1 16 24 0.0000 4 395 1950 1352 2815 Application\001
+4 0 0 50 -1 16 20 0.0000 4 244 579 4246 2662 URI\001
+4 0 0 50 -1 16 20 0.0000 4 244 792 4246 3272 lxc:///\001
+4 0 0 50 -1 16 24 5.3233 4 304 1828 7142 6472 Driver API\001
+4 0 0 50 -1 16 24 5.3233 4 304 1889 6075 6472 Public API\001
+4 0 0 50 -1 16 24 5.3233 4 395 1920 9121 6472 Driver Impl\001
+4 0 0 50 -1 16 28 0.0000 4 366 1157 7142 682 libvirt\001
+-6
Index: docs/libvirt-driver-arch.gif
===================================================================
RCS file: docs/libvirt-driver-arch.gif
diff -N docs/libvirt-driver-arch.gif
Binary files /dev/null and libvirt-driver-arch.gif differ
Index: docs/libvirt-object-model.fig
===================================================================
RCS file: docs/libvirt-object-model.fig
diff -N docs/libvirt-object-model.fig
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ docs/libvirt-object-model.fig	14 Apr 2009 13:34:06 -0000
@@ -0,0 +1,61 @@
+#FIG 3.2  Produced by xfig version 3.2.5
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 1200 1200 10274 6975
+6 4500 1200 6974 2025
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4500 1200 6974 1200 6974 2025 4500 2025 4500 1200
+4 0 0 50 -1 16 17 0.0000 4 202 1679 4603 1613 virConnectPtr\001
+-6
+6 1200 3675 3675 4500
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1200 3675 3675 3675 3675 4500 1200 4500 1200 3675
+4 0 0 50 -1 16 17 0.0000 4 202 1595 1303 4087 virDomainPtr\001
+-6
+6 1200 6150 3675 6975
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1200 6150 3675 6150 3675 6975 1200 6975 1200 6150
+4 0 0 50 -1 16 17 0.0000 4 202 1667 1303 6562 virNetworkPtr\001
+-6
+6 7799 3675 10274 4500
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7799 3675 10274 3675 10274 4500 7799 4500 7799 3675
+4 0 0 50 -1 16 17 0.0000 4 262 2155 7902 4087 virStoragePoolPtr\001
+-6
+6 7799 6150 10274 6975
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7799 6150 10274 6150 10274 6975 7799 6975 7799 6150
+4 0 0 50 -1 16 17 0.0000 4 262 2000 7902 6562 virStorageVolPtr\001
+-6
+3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
+	0 0 1.00 82.50 164.99
+	 4706 2025 4706 4087 3675 4087
+	 0.000 1.000 0.000
+3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
+	0 0 1.00 82.50 164.99
+	 6768 2025 6768 4087 7799 4087
+	 0.000 1.000 0.000
+3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
+	0 0 1.00 82.50 164.99
+	 6562 2025 6562 6562 7799 6562
+	 0.000 1.000 0.000
+3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
+	0 0 1.00 82.50 164.99
+	 4912 2025 4912 6562 3675 6562
+	 0.000 1.000 0.000
+3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2
+	0 0 1.00 82.50 164.99
+	 8933 4500 8933 6150
+	 0.000 0.000
+4 0 0 50 -1 16 17 0.0000 4 143 155 3881 3985 n\001
+4 0 0 50 -1 16 17 0.0000 4 143 155 3881 6459 n\001
+4 0 0 50 -1 16 17 0.0000 4 143 155 7387 6459 n\001
+4 0 0 50 -1 16 17 0.0000 4 143 155 7387 3985 n\001
+4 0 0 50 -1 16 17 0.0000 4 143 155 8727 5944 n\001
+-6
Index: docs/libvirt-object-model.gif
===================================================================
RCS file: docs/libvirt-object-model.gif
diff -N docs/libvirt-object-model.gif
Binary files /dev/null and libvirt-object-model.gif differ
Index: docs/page.xsl
===================================================================
RCS file: /data/cvs/libxen/docs/page.xsl,v
retrieving revision 1.9
diff -u -r1.9 page.xsl
--- docs/page.xsl	8 May 2008 14:20:07 -0000	1.9
+++ docs/page.xsl	14 Apr 2009 13:34:06 -0000
@@ -8,6 +8,22 @@
   <!-- The sitemap.html.in page contains the master navigation structure -->
   <xsl:variable name="sitemap" select="document('sitemap.html.in')/html/body/div[ id='sitemap']"/>
 
+  <xsl:template match="code[ class='docref']" mode="content">
+    <xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
+    <a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
+  </xsl:template>
+
+  <xsl:template match="node() | @*" mode="content">
+    <xsl:copy>
+      <xsl:apply-templates select="node() | @*" mode="content"/>
+    </xsl:copy>
+  </xsl:template>
+
+
+  <xsl:template match="ul[ id='toc']" mode="content">
+    <xsl:call-template name="toc"/>
+  </xsl:template>
+
   <!-- This processes the sitemap to form a context sensitive
        navigation menu for the current page -->
   <xsl:template match="ul" mode="menu">
@@ -143,16 +159,7 @@
             </xsl:apply-templates>
           </div>
           <div id="content">
-            <xsl:for-each select="html/body/*">
-              <xsl:choose>
-                <xsl:when test="name() = 'ul' and @id = 'toc'">
-                  <xsl:call-template name="toc"/>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:copy-of select="."/>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:for-each>
+            <xsl:apply-templates select="/html/body/*" mode="content"/>
           </div>
         </div>
         <div id="footer">
Index: docs/sitemap.html
===================================================================
RCS file: /data/cvs/libxen/docs/sitemap.html,v
retrieving revision 1.12
diff -u -r1.12 sitemap.html
--- docs/sitemap.html	2 Apr 2009 12:01:11 -0000	1.12
+++ docs/sitemap.html	14 Apr 2009 13:34:06 -0000
@@ -109,6 +109,9 @@
                 <a href="goals.html">Goals</a>
                 <span>Terminology and goals of libvirt API</span>
               </li><li>
+                <a href="api.html">API concepts</a>
+                <span>The libvirt API concepts</span>
+              </li><li>
                 <a href="archdomain.html">Domains</a>
                 <span>Managing virtual machines</span>
               </li><li>
Index: docs/sitemap.html.in
===================================================================
RCS file: /data/cvs/libxen/docs/sitemap.html.in,v
retrieving revision 1.5
diff -u -r1.5 sitemap.html.in
--- docs/sitemap.html.in	2 Apr 2009 12:01:11 -0000	1.5
+++ docs/sitemap.html.in	14 Apr 2009 13:34:06 -0000
@@ -61,6 +61,10 @@
                 <span>Terminology and goals of libvirt API</span>
               </li>
               <li>
+                <a href="api.html">API concepts</a>
+                <span>The libvirt API concepts</span>
+              </li>
+              <li>
                 <a href="archdomain.html">Domains</a>
                 <span>Managing virtual machines</span>
               </li>
Index: src/xm_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/xm_internal.c,v
retrieving revision 1.123
diff -u -r1.123 xm_internal.c
--- src/xm_internal.c	3 Apr 2009 12:38:52 -0000	1.123
+++ src/xm_internal.c	14 Apr 2009 13:34:07 -0000
@@ -1624,7 +1624,7 @@
     const char *filename;
     xenXMConfCachePtr entry;
     virBuffer mapbuf = VIR_BUFFER_INITIALIZER;
-    char *mapstr = NULL;
+    char *mapstr = NULL, *mapsave = NULL;
     int i, j, n, comma = 0;
     int ret = -1;
     char *cpuset = NULL;
@@ -1679,6 +1679,7 @@
     }
 
     mapstr = virBufferContentAndReset(&mapbuf);
+    mapsave = mapstr;
 
     if (VIR_ALLOC_N(cpuset, maxcpu) < 0) {
         virReportOOMError(domain->conn);
@@ -1700,7 +1701,7 @@
     ret = 0;
 
  cleanup:
-    VIR_FREE(mapstr);
+    VIR_FREE(mapsave);
     VIR_FREE(cpuset);
     xenUnifiedUnlock(priv);
     return (ret);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]