networkUpdateState: Create virMacMap module more frequently
networkUpdateState: Create virMacMap module more frequently

The virMacMap module is there for dumping [domain, <list of is
MACs>] pairs into a file so that libvirt_guest NSS module can use
it. Whenever a interface is allocated from network (e.g. on
domain<F2> startup or NIC hotplug), network is notified and so is
virMacMap module subsequently. The module update functions
networkMacMgrAdd() and networkMacMgrDel() gracefully handle the
case when there's no module. The problem is, the module is
created if and only if network is freshly started, or if the
daemon restarts and network previously had the module.

This is not very user friendly - if users want to use the NSS
module they need to destroy their network and bring it up again
(and subsequently all the domains using it).

One disadvantage of this approach implemented here is that one
may get just partial results: any already running network does
not record mac maps, thus only newly plugged domains will be
stored in the module. The network restart scenario is not touched
by this of course. But one can argue that older libvirts had
never recorded the mac maps anyway.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

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