[libvirt] [PATCH 0/8] Simplify & standarize more parts of driver URI handling

Daniel P. Berrangé posted 8 patches 6 years ago
Failed in applying to current master (apply log)
docs/drvlxc.html.in                     | 34 ++++++-------
docs/drvxen.html.in                     | 14 +++---
docs/hvsupport.pl                       |  6 +--
docs/remote.html.in                     |  6 +--
docs/uri.html.in                        | 16 +++----
examples/lxcconvert/virt-lxc-convert    |  2 +-
src/bhyve/bhyve_driver.c                | 48 +++++++++----------
src/driver-hypervisor.h                 |  4 ++
src/driver.h                            |  8 ++++
src/esx/esx_driver.c                    | 31 +-----------
src/hyperv/hyperv_driver.c              | 24 +---------
src/interface/interface_backend_netcf.c | 47 +++++++-----------
src/interface/interface_backend_udev.c  | 47 +++++++-----------
src/libvirt.c                           | 69 +++++++++++++++++++++++---
src/libxl/libxl_driver.c                | 58 +++++++++++-----------
src/lxc/lxc_driver.c                    | 56 ++++++++++------------
src/lxc/lxc_process.c                   |  4 +-
src/network/bridge_driver.c             | 47 +++++++-----------
src/node_device/node_device_driver.c    | 45 +++++++----------
src/node_device/node_device_hal.c       |  2 +
src/node_device/node_device_udev.c      |  2 +
src/nwfilter/nwfilter_driver.c          | 35 +++++---------
src/openvz/openvz_driver.c              | 70 +++++++++++++--------------
src/phyp/phyp_driver.c                  |  9 +---
src/qemu/qemu_driver.c                  | 85 +++++++++++++++------------------
src/remote/remote_driver.c              | 74 +++++++++++++---------------
src/secret/secret_driver.c              | 47 +++++++-----------
src/storage/storage_driver.c            | 47 +++++++-----------
src/test/test_driver.c                  | 18 ++-----
src/uml/uml_driver.c                    | 71 +++++++++++++--------------
src/vbox/vbox_common.c                  | 26 ++++------
src/vbox/vbox_driver.c                  | 18 ++-----
src/vmware/vmware_driver.c              | 29 ++++-------
src/vz/vz_driver.c                      | 25 ++--------
src/xenapi/xenapi_driver.c              |  6 +--
tools/libvirt-guests.sysconf            |  2 +-
tools/virsh.pod                         |  4 +-
tools/virt-login-shell.c                |  2 +-
38 files changed, 489 insertions(+), 649 deletions(-)
[libvirt] [PATCH 0/8] Simplify & standarize more parts of driver URI handling
Posted by Daniel P. Berrangé 6 years ago
The motivating goal of this series was/is to make it possible to answer
whether there is any driver registered to handle a given URI scheme
without having to call into the drivers.

Ultimately this ended up being a nice simplification and cleanup of
driver URI opening code, removing repetative logic from all drivers.

Daniel P. Berrangé (8):
  xen: encourage use of xen:///system URI as preferred format
  lxc: allow use of lxc:///system URI as preferred format
  driver: introduce a driver method for probing default URIs
  driver: allow drivers to indicate if they permit remote connections
  driver: declare supported URI schemes in virConnectDriver struct
  driver: ensure NULL URI isn't passed to drivers with whitelisted URIs
  driver: enforce a non-NULL URI scheme
  driver: ensure URI path is non-NULL to simplify drivers

 docs/drvlxc.html.in                     | 34 ++++++-------
 docs/drvxen.html.in                     | 14 +++---
 docs/hvsupport.pl                       |  6 +--
 docs/remote.html.in                     |  6 +--
 docs/uri.html.in                        | 16 +++----
 examples/lxcconvert/virt-lxc-convert    |  2 +-
 src/bhyve/bhyve_driver.c                | 48 +++++++++----------
 src/driver-hypervisor.h                 |  4 ++
 src/driver.h                            |  8 ++++
 src/esx/esx_driver.c                    | 31 +-----------
 src/hyperv/hyperv_driver.c              | 24 +---------
 src/interface/interface_backend_netcf.c | 47 +++++++-----------
 src/interface/interface_backend_udev.c  | 47 +++++++-----------
 src/libvirt.c                           | 69 +++++++++++++++++++++++---
 src/libxl/libxl_driver.c                | 58 +++++++++++-----------
 src/lxc/lxc_driver.c                    | 56 ++++++++++------------
 src/lxc/lxc_process.c                   |  4 +-
 src/network/bridge_driver.c             | 47 +++++++-----------
 src/node_device/node_device_driver.c    | 45 +++++++----------
 src/node_device/node_device_hal.c       |  2 +
 src/node_device/node_device_udev.c      |  2 +
 src/nwfilter/nwfilter_driver.c          | 35 +++++---------
 src/openvz/openvz_driver.c              | 70 +++++++++++++--------------
 src/phyp/phyp_driver.c                  |  9 +---
 src/qemu/qemu_driver.c                  | 85 +++++++++++++++------------------
 src/remote/remote_driver.c              | 74 +++++++++++++---------------
 src/secret/secret_driver.c              | 47 +++++++-----------
 src/storage/storage_driver.c            | 47 +++++++-----------
 src/test/test_driver.c                  | 18 ++-----
 src/uml/uml_driver.c                    | 71 +++++++++++++--------------
 src/vbox/vbox_common.c                  | 26 ++++------
 src/vbox/vbox_driver.c                  | 18 ++-----
 src/vmware/vmware_driver.c              | 29 ++++-------
 src/vz/vz_driver.c                      | 25 ++--------
 src/xenapi/xenapi_driver.c              |  6 +--
 tools/libvirt-guests.sysconf            |  2 +-
 tools/virsh.pod                         |  4 +-
 tools/virt-login-shell.c                |  2 +-
 38 files changed, 489 insertions(+), 649 deletions(-)

-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/8] Simplify & standarize more parts of driver URI handling
Posted by Daniel P. Berrangé 6 years ago
On Mon, Apr 09, 2018 at 04:45:43PM +0100, Daniel P. Berrangé wrote:
> The motivating goal of this series was/is to make it possible to answer
> whether there is any driver registered to handle a given URI scheme
> without having to call into the drivers.
> 
> Ultimately this ended up being a nice simplification and cleanup of
> driver URI opening code, removing repetative logic from all drivers.

BTW, this is rebased above Jim's v2 patch for killing the XenD driver

https://www.redhat.com/archives/libvir-list/2018-April/msg00524.html


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] [PATCH 0/8] Simplify & standarize more parts of driver URI handling
Posted by Michal Privoznik 6 years ago
On 04/09/2018 05:45 PM, Daniel P. Berrangé wrote:
> The motivating goal of this series was/is to make it possible to answer
> whether there is any driver registered to handle a given URI scheme
> without having to call into the drivers.
> 
> Ultimately this ended up being a nice simplification and cleanup of
> driver URI opening code, removing repetative logic from all drivers.
> 
> Daniel P. Berrangé (8):
>   xen: encourage use of xen:///system URI as preferred format
>   lxc: allow use of lxc:///system URI as preferred format
>   driver: introduce a driver method for probing default URIs
>   driver: allow drivers to indicate if they permit remote connections
>   driver: declare supported URI schemes in virConnectDriver struct
>   driver: ensure NULL URI isn't passed to drivers with whitelisted URIs
>   driver: enforce a non-NULL URI scheme
>   driver: ensure URI path is non-NULL to simplify drivers
> 
>  docs/drvlxc.html.in                     | 34 ++++++-------
>  docs/drvxen.html.in                     | 14 +++---
>  docs/hvsupport.pl                       |  6 +--
>  docs/remote.html.in                     |  6 +--
>  docs/uri.html.in                        | 16 +++----
>  examples/lxcconvert/virt-lxc-convert    |  2 +-
>  src/bhyve/bhyve_driver.c                | 48 +++++++++----------
>  src/driver-hypervisor.h                 |  4 ++
>  src/driver.h                            |  8 ++++
>  src/esx/esx_driver.c                    | 31 +-----------
>  src/hyperv/hyperv_driver.c              | 24 +---------
>  src/interface/interface_backend_netcf.c | 47 +++++++-----------
>  src/interface/interface_backend_udev.c  | 47 +++++++-----------
>  src/libvirt.c                           | 69 +++++++++++++++++++++++---
>  src/libxl/libxl_driver.c                | 58 +++++++++++-----------
>  src/lxc/lxc_driver.c                    | 56 ++++++++++------------
>  src/lxc/lxc_process.c                   |  4 +-
>  src/network/bridge_driver.c             | 47 +++++++-----------
>  src/node_device/node_device_driver.c    | 45 +++++++----------
>  src/node_device/node_device_hal.c       |  2 +
>  src/node_device/node_device_udev.c      |  2 +
>  src/nwfilter/nwfilter_driver.c          | 35 +++++---------
>  src/openvz/openvz_driver.c              | 70 +++++++++++++--------------
>  src/phyp/phyp_driver.c                  |  9 +---
>  src/qemu/qemu_driver.c                  | 85 +++++++++++++++------------------
>  src/remote/remote_driver.c              | 74 +++++++++++++---------------
>  src/secret/secret_driver.c              | 47 +++++++-----------
>  src/storage/storage_driver.c            | 47 +++++++-----------
>  src/test/test_driver.c                  | 18 ++-----
>  src/uml/uml_driver.c                    | 71 +++++++++++++--------------
>  src/vbox/vbox_common.c                  | 26 ++++------
>  src/vbox/vbox_driver.c                  | 18 ++-----
>  src/vmware/vmware_driver.c              | 29 ++++-------
>  src/vz/vz_driver.c                      | 25 ++--------
>  src/xenapi/xenapi_driver.c              |  6 +--
>  tools/libvirt-guests.sysconf            |  2 +-
>  tools/virsh.pod                         |  4 +-
>  tools/virt-login-shell.c                |  2 +-
>  38 files changed, 489 insertions(+), 649 deletions(-)
> 

ACK series, but please before pushing:

a) read my comments,
b) make sure 'make check syntax-check' passes after each patch ;-)

Michal

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