[libvirt] [dbus RFC 00/11] improve libvirt connections handling

Pavel Hrdina phrdina at redhat.com
Mon Jan 22 17:15:58 UTC 2018


This patch series is a proposal to how to implement libvirt connections
in the libvirt D-Bus binding.  The design is based on a discussion with
Daniel and it should follow D-Bus convention.

Each connection is represented as existing object where the object
path contains the driver name:

    /org/libvirt/qemu

and there is no need to call any connect API but simply use the existing
object directly to operate with that connection.

This patch series also implements strict difference between system and
user bus.  On the user bus only drivers with session capability are
available and on the system bus only drivers with system capability
are available.


Pavel Hrdina (11):
  util: introduce VIRT_ARRAY_CARDINALITY macro
  util: introduce virtDBusUtilSetError helper
  src: rename manager to connect
  connect: implement lazy connection
  connect: don't use default libvirt authentication callback
  connect: implement reconnect functionality to libvirt
  connect: move domain related code to domain.c
  connect: store connect path in connect structure
  domain: derive domain path from connect path
  main: implement multiple connection within one daemon
  main: add support for all libvirt drivers

 src/Makefile.am                           |   2 +-
 src/connect.c                             | 308 ++++++++++++++++++++++++++++++
 src/connect.h                             |  27 +++
 src/domain.c                              | 131 ++++++++-----
 src/domain.h                              |   4 +-
 src/events.c                              |  64 +++----
 src/events.h                              |   4 +-
 src/main.c                                |  75 ++++++--
 src/manager.c                             | 216 ---------------------
 src/manager.h                             |  20 --
 src/util.c                                |  17 +-
 src/util.h                                |  12 +-
 test/Makefile.am                          |   2 +-
 test/libvirttest.py                       |   6 +-
 test/{test_manager.py => test_connect.py} |  12 +-
 test/test_domain.py                       |   6 +-
 16 files changed, 543 insertions(+), 363 deletions(-)
 create mode 100644 src/connect.c
 create mode 100644 src/connect.h
 delete mode 100644 src/manager.c
 delete mode 100644 src/manager.h
 rename test/{test_manager.py => test_connect.py} (79%)

-- 
2.14.3




More information about the libvir-list mailing list