conf: Write network config to disk after generating UUID
conf: Write network config to disk after generating UUID

While we generally expect libvirt objects to be defined using the
appropriate APIs, there are cases where it's reasonable for an
external entity, usually a package manager, to drop a valid
configuration file under /etc/libvirt and have libvirt take over
from there: notably, this is exactly how the default network is
handled.

For the most part, whether the configuration is saved back to disk
after being parsed by libvirt doesn't matter, because we'll end up
with the same values anyway, but an obvious exception to this is
data that gets randomly generated when not present, namely MAC
address and UUID.

Historically, both were handled by our build system, but commit
a47ae7c004e9 moved handling of the former inside libvirt proper;
this commit extends such behavior to the latter as well.

Proper error handling for the virNetworkSaveConfig() call, which
was missing until now, is introduced in the process.

Signed-off-by: Andrea Bolognani <3ada0bee826c753786fdbba72243dfba997094cf@redhat.com>
Reviewed-by: Laine Stump <c23361c43fbf79fed83e8b76173707b083d6caf5@redhat.com>

olafhering/libvirt,jfehlig/libvirt,nertpinx/libvirt,crobinso/libvirt,libvirt/libvirt,olafhering/libvirt,zippy2/libvirt,jfehlig/libvirt,libvirt/libvirt,libvirt/libvirt,zippy2/libvirt,nertpinx/libvirt,zippy2/libvirt,jfehlig/libvirt,crobinso/libvirt,nertpinx/libvirt,olafhering/libvirt,zippy2/libvirt,crobinso/libvirt,libvirt/libvirt,nertpinx/libvirt,nertpinx/libvirt,jfehlig/libvirt,olafhering/libvirt,crobinso/libvirt