summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2017-07-04 16:50:00 +0200
committerPavel Hrdina <phrdina@redhat.com>2018-03-23 12:59:56 +0100
commit247e3a72753ed35306d673abde80a0cd08b9f571 (patch)
treeb0e206f06814638d4fed979c3efc09f04e492747
parent0641b5fe06da72a5b857d8c10640418edd37fda7 (diff)
downloadlibvirt-247e3a72753ed35306d673abde80a0cd08b9f571.tar.gz
docs: introduce libvirt-dbus binding
libvirt-dbus is a new binding that wraps libvirt API into D-Bus calls. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
-rw-r--r--docs/bindings.html.in13
-rw-r--r--docs/dbus.html.in102
-rw-r--r--docs/docs.html.in6
-rw-r--r--docs/downloads.html.in15
4 files changed, 133 insertions, 3 deletions
diff --git a/docs/bindings.html.in b/docs/bindings.html.in
index 733c89bc20..46930cd6f6 100644
--- a/docs/bindings.html.in
+++ b/docs/bindings.html.in
@@ -2,7 +2,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
- <h1 >Bindings for other languages</h1>
+ <h1 >Bindings for other languages and integration API modules</h1>
<p>
Libvirt supports C and C++ directly, and has bindings available
@@ -75,6 +75,17 @@
</ul>
<p>
+ Integration API modules:
+ </p>
+
+ <ul>
+ <li>
+ <strong>D-Bus</strong>: Pavel Hrdina develops
+ <a href="dbus.html">D-Bus API</a>.
+ </li>
+ </ul>
+
+ <p>
For information on using libvirt on <strong>Windows</strong>
<a href="windows.html">please see the Windows support page</a>.
</p>
diff --git a/docs/dbus.html.in b/docs/dbus.html.in
new file mode 100644
index 0000000000..6ff71d2770
--- /dev/null
+++ b/docs/dbus.html.in
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <h1>D-Bus API bindings</h1>
+
+ <ul id="toc"></ul>
+
+ <h2><a name="description">Description</a></h2>
+
+ <p>
+ libvirt-dbus wraps libvirt API to provide a high-level object-oriented
+ API better suited for dbus-based applications.
+ </p>
+
+ <h2><a name="git">GIT source repository</a></h2>
+ <p>
+ The D-Bus bindings source code is maintained in a
+ <a href="https://git-scm.com/">git</a> repository available on
+ <a href="https://libvirt.org/git/">libvirt.org</a>:
+ </p>
+
+<pre>
+git clone https://libvirt.org/git/libvirt-dbus.git
+</pre>
+
+ <p>
+ They can also be browsed online:
+ </p>
+
+<pre>
+<a href="https://libvirt.org/git/?p=libvirt-dbus.git">https://libvirt.org/git/?p=libvirt-dbus.git</a>
+</pre>
+
+ <h2><a name="usage">Usage</a></h2>
+
+ <p>
+ libvirt-dbus exports libvirt API using D-Bus objects with methods and
+ properties described by interfaces. Currently only local connection
+ to libvirt is exported and the list of supported drivers depends
+ on the type of the bus connection (session or system).
+ </p>
+
+ <p>
+ The name of the libvirt-dbus service is <code>org.libvirt</code>.
+ libvirt-dbus distributes an interface XML descriptions which can be
+ usually found at <code>/usr/share/dbus-1/interfaces/</code>.
+ </p>
+
+ <p>
+ By default unprivileged user has access only to the session D-Bus
+ connection. In order to allow specific user "foo" to access the system
+ D-Bus connection you need to create a file
+ <code>/etc/dbus-1/system.d/org.libvirt.conf</code> that contains:
+ </p>
+
+<pre>
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
+
+&lt;busconfig&gt;
+
+ &lt;policy user="foo"&gt;
+ &lt;allow send_destination="org.libvirt"/&gt;
+ &lt;/policy&gt;
+
+&lt;/busconfig&gt;
+</pre>
+
+ <p>
+ To get a list of supported drivers for the specific bus connection
+ you can run these commands (not all drivers may be available on
+ the host):
+ </p>
+
+<pre>
+gdbus introspect --xml --session --dest org.libvirt --object-path /org/libvirt
+gdbus introspect --xml --system --dest org.libvirt --object-path /org/libvirt
+</pre>
+
+ <p>
+ Every object is introspectable so you can get a list of available
+ interfaces with methods, signals and properties running this command:
+ </p>
+
+<pre>
+gdbus introspect --xml --system --dest org.libvirt --object-path /org/libvirt/QEMU
+</pre>
+
+ <p>
+ To get a list of domains for specific connection driver you can run
+ this command:
+ </p>
+
+<pre>
+gdbus call --system --dest org.libvirt --object-path /org/libvirt/QEMU \
+ --method org.libvirt.Connect.ListDomains 0
+</pre>
+
+ </body>
+</html>
diff --git a/docs/docs.html.in b/docs/docs.html.in
index ee521c7460..40e0e3b82e 100644
--- a/docs/docs.html.in
+++ b/docs/docs.html.in
@@ -54,7 +54,7 @@
<dt><a href="virshcmdref.html">Virsh Commands</a></dt>
<dd>Command reference for virsh</dd>
- <dt><a href="bindings.html">Language bindings</a></dt>
+ <dt><a href="bindings.html">Language bindings and API modules</a></dt>
<dd>Bindings of the libvirt API for
<a href="csharp.html">c#</a>,
<a href="https://godoc.org/github.com/libvirt/libvirt-go">go</a>,
@@ -63,7 +63,9 @@
<a href="http://search.cpan.org/dist/Sys-Virt/">perl</a>,
<a href="python.html">python</a>,
<a href="php.html">php</a>,
- <a href="https://libvirt.org/ruby/">ruby</a></dd>
+ <a href="https://libvirt.org/ruby/">ruby</a>
+ and integration API modules for
+ <a href="dbus.html">D-Bus</a></dd>
<dt><a href="format.html">XML schemas</a></dt>
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index 7c28e2ba9b..8cca203e54 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -221,6 +221,21 @@
</td>
</tr>
<tr>
+ <td>D-Bus</td>
+ <td>
+ <a href="ftp://libvirt.org/libvirt/dbus/">ftp</a>
+ <a href="https://libvirt.org/sources/dbus/">https</a>
+ </td>
+ <td>
+ <a href="https://libvirt.org/git/?p=libvirt-dbus.git;a=summary">libvirt</a>
+ </td>
+ <td>
+ <a href="https://gitlab.com/libvirt/libvirt-dbus">gitlab</a>
+ <a href="https://github.com/libvirt/libvirt-dbus">github</a>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
<td>Console Proxy</td>
<td>
<a href="ftp://libvirt.org/libvirt/consoleproxy/">ftp</a>