domcaps: get list of supported panic device models

libvirt commit a52cd504 added support for advertisting panic device models.
Let's use it in domcapabilities.

Signed-off-by: Lin Ma <lma@suse.de>
This commit is contained in:
Lin Ma 2024-12-03 13:32:15 +08:00 committed by Pavel Hrdina
parent 8af438dd58
commit c859c7acec

View File

@ -115,6 +115,7 @@ class _Devices(_CapsBlock):
filesystem = XMLChildProperty(_make_capsblock("filesystem"), is_single=True)
redirdev = XMLChildProperty(_make_capsblock("redirdev"), is_single=True)
channel = XMLChildProperty(_make_capsblock("channel"), is_single=True)
panic = XMLChildProperty(_make_capsblock("panic"), is_single=True)
class _Features(_CapsBlock):
@ -508,3 +509,9 @@ class DomainCapabilities(XMLBuilder):
return []
return self.features.hyperv.get_enum("features").get_values()
def supported_panic_models(self):
"""
Return list of supported panic device models.
"""
return self.devices.panic.get_enum("model").get_values()