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

Pavel Hrdina posted 11 patches 6 years, 2 months ago
Failed in applying to current master (apply log)
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%)
[libvirt] [dbus RFC 00/11] improve libvirt connections handling
Posted by Pavel Hrdina 6 years, 2 months ago
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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus RFC 00/11] improve libvirt connections handling
Posted by Daniel P. Berrange 6 years, 2 months ago
On Mon, Jan 22, 2018 at 06:15:58PM +0100, Pavel Hrdina wrote:
> 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.

Aside from the last patch, this all looks great to me.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus RFC 00/11] improve libvirt connections handling
Posted by Pavel Hrdina 6 years, 2 months ago
On Tue, Jan 23, 2018 at 10:13:07AM +0000, Daniel P. Berrange wrote:
> On Mon, Jan 22, 2018 at 06:15:58PM +0100, Pavel Hrdina wrote:
> > 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.
> 
> Aside from the last patch, this all looks great to me.

Thanks, I've pushed the patch series except for the last patch.
V2 of the last patch is on its way.

Pavel
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list