Subject: Fix filesystem socket.source
From: Jonathon Jongsma jjongsma@redhat.com Mon Oct 23 14:42:19 2023 -0500
Date: Tue Oct 24 10:30:37 2023 +0200:
Git: 40b73fec1b251da866485ac8534ba61aaca14fe7
When specifying the socket.source option for filesystem devices, like
this:
--filesystem type=mount,driver.type=virtiofs,source.socket=/xyz.sock,target.dir=tag1
virt-install is writing the xml as:
This produces an error such as:
ERROR missing source information for device mount_tag1
But the socket should be an attribute of source rather than a child
element. After this patch, the same command results in the following XML
and no error is produced:
Resolves: RHEL-1126
Signed-off-by: Jonathon Jongsma
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index e4a7da8f..8eca4e5b 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -509,9 +509,7 @@
1234500
-
+
diff --git a/virtinst/devices/filesystem.py b/virtinst/devices/filesystem.py
index 975548f4..e38e35c3 100644
--- a/virtinst/devices/filesystem.py
+++ b/virtinst/devices/filesystem.py
@@ -53,7 +53,7 @@ class DeviceFilesystem(Device):
source_units = XMLProperty("./source/@units")
source_pool = XMLProperty("./source/@pool")
source_volume = XMLProperty("./source/@volume")
- source_socket = XMLProperty("./source/socket")
+ source_socket = XMLProperty("./source/@socket")
binary_path = XMLProperty("./binary/@path")
binary_xattr = XMLProperty("./binary/@xattr", is_onoff=True)