network: properly check for taps that are connected to an OVS bridge
network: properly check for taps that are connected to an OVS bridge

When libvirtd is restarted, it checks that each guest tap device is
still attached to the bridge device that the configuration info says
it should be connected to. If not, the tap will be disconnected from
[wherever it is] and connected to [wherever it should be].

The previous code that did this did not account for:

1) the IFLA_MASTER attribute in a netdev's ifinfo will be set to
   "ovs-system" for any tap device connected to an OVS bridge, *not*
   to the name of the bridge it is attached to.

2) virNetDevRemovePort() only works for devices that are attached to a
   standard Linux host bridge. If a device is currently attached to an
   OVS bridge, then virNetDevOpenvswitchRemovePort() must be called
   instead.

This patch remedies those problems, and adds a couple of information
log messages to aid in debugging any future problem.

Resolves: https://bugzilla.redhat.com/1596176

Signed-off-by: Laine Stump <c23361c43fbf79fed83e8b76173707b083d6caf5@laine.org>
ACKed-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

eskultety/libvirt,fabianfreyer/libvirt,libvirt/libvirt,andreabolognani/libvirt,zippy2/libvirt,jfehlig/libvirt,nertpinx/libvirt,jfehlig/libvirt,libvirt/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,olafhering/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,zippy2/libvirt,jardasgit/libvirt,olafhering/libvirt,crobinso/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,andreabolognani/libvirt,jfehlig/libvirt,crobinso/libvirt,olafhering/libvirt,zippy2/libvirt,andreabolognani/libvirt,nertpinx/libvirt,crobinso/libvirt,eskultety/libvirt,zippy2/libvirt,olafhering/libvirt,jardasgit/libvirt,crobinso/libvirt,fabianfreyer/libvirt,eskultety/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,libvirt/libvirt,jardasgit/libvirt,libvirt/libvirt,jardasgit/libvirt,eskultety/libvirt,andreabolognani/libvirt,nertpinx/libvirt