[libvirt] [RFC PATCH 0/4] Add new macro to check for existent server

Matthias Bolte matthias.bolte at googlemail.com
Sun Jul 8 20:07:36 UTC 2018


2018-07-08 3:06 GMT+02:00 Marcos Paulo de Souza <marcos.souza.org at gmail.com>:
> Hello,
>
> I am trying to add a generic way to check for server, specially in drivers that
> needs the server to be declared. If there is better way to put the check, or a
> better way to check this setting, let me know.
>
> Thanks in advance!

I'd realize this in a different way.

The virConnectDriver struct has a localOnly flag that is used to
indicate whether a connection driver permits a server in the URI. Then
virConnectOpenInternal uses this flag during its driver auto-probing
phase.

I suggest expanding this concept and adding a remoteOnly flag to the
virConnectDriver struct. Instead of checking the URI server part in
the driver's own open function let virConnectOpenInternal do this
check based on the remoteOnly flag.

-- 
Matthias Bolte
http://photron.blogspot.com




More information about the libvir-list mailing list