Blame SOURCES/virt-manager-hostdev-use-method-get_mdev_uuid.patch

a308ed
From 99d841337bab8134c173168cabd93e9b133f6049 Mon Sep 17 00:00:00 2001
a308ed
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
a308ed
Date: Mon, 31 May 2021 21:54:27 +0200
a308ed
Subject: [PATCH] hostdev: use method get_mdev_uuid()
a308ed
a308ed
Use method get_mdev_uuid() to retrieve the UUID of MDEV node device
a308ed
object.
a308ed
a308ed
Reviewed-by: Cole Robinson <crobinso@redhat.com>
a308ed
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
a308ed
(cherry picked from commit f87e96d3d40891f1403601abc389c24800ba1069)
a308ed
a308ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995125
a308ed
a308ed
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
a308ed
---
a308ed
 virtinst/devices/hostdev.py | 2 +-
a308ed
 1 file changed, 1 insertion(+), 1 deletion(-)
a308ed
a308ed
diff --git a/virtinst/devices/hostdev.py b/virtinst/devices/hostdev.py
a308ed
index e8d0fae2..b3717430 100644
a308ed
--- a/virtinst/devices/hostdev.py
a308ed
+++ b/virtinst/devices/hostdev.py
a308ed
@@ -78,7 +78,7 @@ class DeviceHostdev(Device):
a308ed
                         _("Don't know how to generate nodedev for mdev type id '%s'") %
a308ed
                         nodedev.type_id)
a308ed
 
a308ed
-            self.uuid = nodedev.name[5:].replace('_', '-')
a308ed
+            self.uuid = nodedev.get_mdev_uuid()
a308ed
 
a308ed
         else:
a308ed
             raise ValueError(_("Unknown node device type %s") % nodedev)
a308ed
-- 
a308ed
2.31.1
a308ed