From fe59c3377201ce06501498e677296171d828c9bc Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 14 Dec 2017 12:12:35 -0500 Subject: [PATCH] virtinst: storage: Don't generate UUID by default Just let libvirt do it for us, it doesn't really add anything --- virtinst/storage.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/virtinst/storage.py b/virtinst/storage.py index 1b3d2de6..babec2f3 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -304,11 +304,6 @@ class StoragePool(_StorageObject): return util.generate_name(basename, cb, **kwargs) - def __init__(self, *args, **kwargs): - _StorageObject.__init__(self, *args, **kwargs) - self._random_uuid = None - - ###################### # Validation helpers # ###################### @@ -343,11 +338,6 @@ class StoragePool(_StorageObject): return _DEFAULT_MPATH_TARGET raise RuntimeError("No default target_path for type=%s" % self.type) - def _get_default_uuid(self): - if self._random_uuid is None: - self._random_uuid = util.generate_uuid(self.conn) - return self._random_uuid - def _type_to_source_prop(self): if (self.type == self.TYPE_NETFS or self.type == self.TYPE_GLUSTER): @@ -409,7 +399,7 @@ class StoragePool(_StorageObject): type = XMLProperty("./@type", doc=_("Storage device type the pool will represent.")) - uuid = XMLProperty("./uuid", default_cb=_get_default_uuid) + uuid = XMLProperty("./uuid") capacity = XMLProperty("./capacity", is_int=True) allocation = XMLProperty("./allocation", is_int=True)