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

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