From c286593b56f5c2f63bb9a9a7b2635972c1e210ef Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 14 Dec 2017 12:10:28 -0500 Subject: [PATCH] virtinst: network: Don't generate UUID by default Just let libvirt do it for us, it doesn't really add anything --- virtinst/network.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/virtinst/network.py b/virtinst/network.py index 271762b5..3a1b2af8 100644 --- a/virtinst/network.py +++ b/virtinst/network.py @@ -191,10 +191,6 @@ class Network(XMLBuilder): return desc - def __init__(self, *args, **kwargs): - XMLBuilder.__init__(self, *args, **kwargs) - self._random_uuid = None - ################### # Helper routines # @@ -223,11 +219,6 @@ class Network(XMLBuilder): raise ValueError(_("Name '%s' already in use by another network." % name)) - def _get_default_uuid(self): - if self._random_uuid is None: - self._random_uuid = util.generate_uuid(self.conn) - return self._random_uuid - ################## # XML properties # @@ -240,7 +231,7 @@ class Network(XMLBuilder): ipv6 = XMLProperty("./@ipv6", is_yesno=True) name = XMLProperty("./name", validate_cb=_validate_name) - uuid = XMLProperty("./uuid", default_cb=_get_default_uuid) + uuid = XMLProperty("./uuid") virtualport_type = XMLProperty("./virtualport/@type")