summaryrefslogtreecommitdiff
path: root/virtManager/object/domain.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2022-02-27 12:08:30 -0500
committerCole Robinson <crobinso@redhat.com>2022-02-27 13:44:26 -0500
commit365d1f5d563b5bab2d5d831a0fe3cf9e3ef62b41 (patch)
tree48643bd154b11a0dbe076c568b243a7512580197 /virtManager/object/domain.py
parent59595aebb7863bb8ae495fc927e70d97398234c0 (diff)
downloadvirt-manager-365d1f5d563b5bab2d5d831a0fe3cf9e3ef62b41.tar.gz
diskbackend: Set relative path for media change
Via the virt-manager UI we aren't converting relative path to absolute path, even though we do it internally when needed. We were benefiting from this in the test suite in some ways, so we need to adjust tests to strip out the dev dir on XML comparison Signed-off-by: Cole Robinson <crobinso@redhat.com>
Diffstat (limited to 'virtManager/object/domain.py')
-rw-r--r--virtManager/object/domain.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py
index c1669c1f..70e4e49f 100644
--- a/virtManager/object/domain.py
+++ b/virtManager/object/domain.py
@@ -784,10 +784,12 @@ class vmmDomain(vmmLibvirtObject):
if not editdev:
return # pragma: no cover
+ validate = False
if path != _SENTINEL:
editdev.set_source_path(path)
if not do_hotplug:
editdev.sync_path_props()
+ validate = True
if readonly != _SENTINEL:
editdev.read_only = readonly
@@ -806,6 +808,8 @@ class vmmDomain(vmmLibvirtObject):
if bus != _SENTINEL:
editdev.change_bus(self.xmlobj, bus)
+ if validate:
+ editdev.validate()
self._process_device_define(editdev, xmlobj, do_hotplug)
def define_network(self, devobj, do_hotplug,