From nobody Mon Apr 29 22:25:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521790542838526.280790177905; Fri, 23 Mar 2018 00:35:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BFCC220264; Fri, 23 Mar 2018 07:35:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE7B45E1C3; Fri, 23 Mar 2018 07:35:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 28A561806104; Fri, 23 Mar 2018 07:35:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2N7ZZIR029118 for ; Fri, 23 Mar 2018 03:35:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC5912023233; Fri, 23 Mar 2018 07:35:35 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 522682023231 for ; Fri, 23 Mar 2018 07:35:35 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Fri, 23 Mar 2018 08:35:34 +0100 Message-Id: <16b4a3cb9be52041780656640038f820a84c129e.1521790489.git.phrdina@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] docs: introduce libvirt-dbus binding X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 23 Mar 2018 07:35:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" libvirt-dbus is a new binding that wraps libvirt API into D-Bus calls. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/bindings.html.in | 4 ++ docs/dbus.html.in | 102 +++++++++++++++++++++++++++++++++++++++++++++= ++++ docs/docs.html.in | 1 + docs/downloads.html.in | 15 ++++++++ 4 files changed, 122 insertions(+) create mode 100644 docs/dbus.html.in diff --git a/docs/bindings.html.in b/docs/bindings.html.in index 733c89bc20..236bdcf2ae 100644 --- a/docs/bindings.html.in +++ b/docs/bindings.html.in @@ -18,6 +18,10 @@ Go: Daniel Berrange develops Go bin= dings. +
  • + D-Bus: Pavel Hrdina develops + D-Bus bindings. +
  • Java: Daniel Veillard develops Java bindings. diff --git a/docs/dbus.html.in b/docs/dbus.html.in new file mode 100644 index 0000000000..0da8096122 --- /dev/null +++ b/docs/dbus.html.in @@ -0,0 +1,102 @@ + + + + +

    D-Bus API bindings

    + +
      + +

      Description

      + +

      + libvirt-dbus wraps libvirt API to provide a high-level object-orient= ed + API better suited for dbus-based applications. +

      + +

      GIT source repository

      +

      + The D-Bus bindings source code is maintained in a + git repository available on + libvirt.org: +

      + +
      +git clone https://libvirt.org/git/libvirt-dbus.git
      +
      + +

      + They can also be browsed online: +

      + +
      +https://libvirt.=
      org/git/?p=3Dlibvirt-dbus.git
      +
      + +

      Usage

      + +

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

      + +

      + The name of the libvirt-dbus service is org.libvirt. + libvirt-dbus distributes an interface XML descriptions which can be + usually found at /usr/share/dbus-1/interfaces/. +

      + +

      + By default unprivileged user has access only to the session D-Bus + connection. In order to allow specific user "foo" to access the syst= em + D-Bus connection you need to create a file + /etc/dbus-1/system.d/org.libvirt.conf that contains: +

      + +
      +<?xml version=3D"1.0"?>
      +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration=
       1.0//EN"
      + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
      +
      +<busconfig>
      +
      +  <policy user=3D"foo">
      +    <allow send_destination=3D"org.libvirt"/>
      +  </policy>
      +
      +</busconfig>
      +
      + +

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

      + +
      +gdbus introspect --xml --session --dest org.libvirt --object-path /org/lib=
      virt
      +gdbus introspect --xml --system --dest org.libvirt --object-path /org/libv=
      irt
      +
      + +

      + Every object is introspectable so you can get a list of available + interfaces with methods, signals and properties running this command: +

      + +
      +gdbus introspect --xml --system --dest org.libvirt --object-path /org/libv=
      irt/QEMU
      +
      + +

      + To get a list of domains for specific connection driver you can run + this command: +

      + +
      +gdbus call --system --dest org.libvirt --object-path /org/libvirt/QEMU \
      +    --method org.libvirt.Connect.ListDomains 0
      +
      + + + diff --git a/docs/docs.html.in b/docs/docs.html.in index a8d544f83f..abd344ca2e 100644 --- a/docs/docs.html.in +++ b/docs/docs.html.in @@ -57,6 +57,7 @@
      Language bindings
      Bindings of the libvirt API for c#, + D-Bus, go, java, ocaml. diff --git a/docs/downloads.html.in b/docs/downloads.html.in index 7c28e2ba9b..c2bc7af3e9 100644 --- a/docs/downloads.html.in +++ b/docs/downloads.html.in @@ -60,6 +60,21 @@ + + D-Bus + + ftp + https + + + libvirt + + + gitlab + github + + + Go --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list