From f4fe2dcf39d5f3575aaf183f70fae983146ba48f Mon Sep 17 00:00:00 2001 From: nanli Date: Thu, 12 Sep 2024 16:41:22 +0800 Subject: [PATCH] add support for disk encryption attrs attributes Signed-off-by: nanli --- virttest/libvirt_xml/devices/disk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virttest/libvirt_xml/devices/disk.py b/virttest/libvirt_xml/devices/disk.py index abda3d3c36..98b0112f8c 100644 --- a/virttest/libvirt_xml/devices/disk.py +++ b/virttest/libvirt_xml/devices/disk.py @@ -644,7 +644,7 @@ class Encryption(base.base.LibvirtXMLBase): dict, keys: type, uuid """ - __slots__ = ("encryption", "secret") + __slots__ = ("encryption", "secret", "attrs") def __init__(self, virsh_instance=base.base.virsh): accessors.XMLAttribute( @@ -657,6 +657,9 @@ def __init__(self, virsh_instance=base.base.virsh): accessors.XMLElementDict( "secret", self, parent_xpath="/", tag_name="secret" ) + accessors.XMLElementDict( + "attrs", self, parent_xpath="/", tag_name="encryption" + ) super(self.__class__, self).__init__(virsh_instance=virsh_instance) self.xml = ""