From nobody Mon Feb 9 10:32:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1649084682; cv=none; d=zohomail.com; s=zohoarc; b=mH/J+ggCCpNnToSgc6g6Yv1rSGT6Abc8LKxU3oyAlXEg64jvk2jnalHE8tjzWF99z9fCuITzUKoe2s1reszNRwl2+CDEtocuxbsXKHE1fgsEf7ii69mO3lXBgeg9RqAElTARUVYO1nR355SxLx/Tn014Zy21gZ011D43y0zkS5c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649084682; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6wMjBMN6q6QqGqcslj4GFAwZUun06Bt56aM/QeWCIBM=; b=AAi4vrPwOS2DMhNmXZsbScwmDfWZbNfqyL7DyP65HWeX5ml3R5UBQYpW3GYfM+9a7CrrDA/I1hYuZJDykHWdoLHtAS8ZNCPEvk9Qy0cfL/IyuZLh2aDr1xxvrpJmyVK4TRdsP0XUnYwV5735KTqKE66Ei4CeSTbaIoj1QV58Jgw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1649084682089452.54030977222396; Mon, 4 Apr 2022 08:04:42 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-371-jucsg8OxNKu-JY3vZhaufg-1; Mon, 04 Apr 2022 11:04:37 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 72E2D2805522; Mon, 4 Apr 2022 15:04:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F449C28111; Mon, 4 Apr 2022 15:04:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5440D19451F2; Mon, 4 Apr 2022 15:04:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7926519451EF for ; Mon, 4 Apr 2022 15:04:27 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6736114582FB; Mon, 4 Apr 2022 15:04:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id C013C14583CB for ; Mon, 4 Apr 2022 15:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649084680; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6wMjBMN6q6QqGqcslj4GFAwZUun06Bt56aM/QeWCIBM=; b=g6gfbqNcZ+FzWd72K8XR+kynYJJHdIbMpCxjNr0RbSP0nWAOUsQN6WTARM/Tg3EEeglPOD VYzRmlFDhMsi5ub0I4UF2taAK1rR8DMbR7yE2gtuVE7/dU8Rzh8XxiGhVuc9X4lp754QUj Lu2FRiFkkga9RZ/Pc2jP7utcd68kzZo= X-MC-Unique: jucsg8OxNKu-JY3vZhaufg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/7] docs: convert 'dbus' page to rst Date: Mon, 4 Apr 2022 17:04:18 +0200 Message-Id: <5bee2d540e953949ad9f99cac8c6c718890ad3b9.1649084492.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: application/octet-stream; x-default=true X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1649084683963100001 From: Pavel Hrdina Signed-off-by: Pavel Hrdina Signed-off-by: Peter Krempa --- docs/dbus.html.in | 94 ----------------------------------------------- docs/dbus.rst | 75 +++++++++++++++++++++++++++++++++++++ docs/meson.build | 2 +- 3 files changed, 76 insertions(+), 95 deletions(-) delete mode 100644 docs/dbus.html.in create mode 100644 docs/dbus.rst diff --git a/docs/dbus.html.in b/docs/dbus.html.in deleted file mode 100644 index 99f191a685..0000000000 --- a/docs/dbus.html.in +++ /dev/null @@ -1,94 +0,0 @@ - - - - -

D-Bus API bindings

- -
    - -

    Description

    - -

    - libvirt-dbus wraps libvirt API to provide a high-level object-oriented - API better suited for dbus-based applications. -

    - -

    GIT source repository

    -

    - The D-Bus bindings source code is maintained in a - git repository available on - gitlab.com: -

    - -
    -git clone https://gitlab.com/libvirt/libvirt-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 system - D-Bus connection you need to create a file - /etc/dbus-1/system.d/org.libvirt.conf that contains: -

    - -
    -<?xml version="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="foo">
    -    <allow send_destination="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/libvirt
    -gdbus introspect --xml --system --dest org.libvirt --object-path /org/libvirt
    -
    - -

    - 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/libvirt/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/dbus.rst b/docs/dbus.rst new file mode 100644 index 0000000000..f026dc0aba --- /dev/null +++ b/docs/dbus.rst @@ -0,0 +1,75 @@ +================== +D-Bus API bindings +================== + +.. contents:: + +Description +----------- + +libvirt-dbus wraps libvirt API to provide a high-level object-oriented API +better suited for dbus-based applications. + +GIT source repository +--------------------- + +The D-Bus bindings source code is maintained in a `git `__ +repository available on +`gitlab.com `__: + +:: + + git clone https://gitlab.com/libvirt/libvirt-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 system D-Bus connection you +need to create a file ``/etc/dbus-1/system.d/org.libvirt.conf`` that contains: + +:: + + + + + + + + + + + + +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/libvirt + gdbus introspect --xml --system --dest org.libvirt --object-path /org/libvirt + +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/libvirt/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/meson.build b/docs/meson.build index 6effe4f838..e73cb3c6cd 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -20,7 +20,6 @@ docs_assets = [ docs_html_in_files = [ '404', 'csharp', - 'dbus', 'docs', 'formatcaps', 'formatdomaincaps', @@ -57,6 +56,7 @@ docs_rst_files = [ 'contact', 'contribute', 'daemons', + 'dbus', 'downloads', 'drivers', 'drvbhyve', -- 2.35.1