summaryrefslogtreecommitdiff
path: root/virtinst/guest.py
diff options
context:
space:
mode:
authorErik Skultety <eskultet@redhat.com>2019-06-11 17:41:57 +0200
committerCole Robinson <crobinso@redhat.com>2019-06-11 13:00:34 -0400
commit45f3a47c840413639eb97da90a00573d4d9fcdcf (patch)
tree7519ac8ccfdb8ad2d6247893974ee724eda7c335 /virtinst/guest.py
parent9bfdd92c0e0d09508c481eca90231655c374db3c (diff)
downloadvirt-manager-45f3a47c840413639eb97da90a00573d4d9fcdcf.tar.gz
virtinst: cli: Introduce parser support for SEV launch security
Introduce both the launchSecurity XML and parser classes. While at it, add launchSecurity as a property instance to the Guest class too. The parser requires the 'type' argument to be mandatory since in the future it will determine different code paths, therefore '--launchSecurity foo=bar' is incorrect. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Erik Skultety <eskultet@redhat.com>
Diffstat (limited to 'virtinst/guest.py')
-rw-r--r--virtinst/guest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/virtinst/guest.py b/virtinst/guest.py
index a65b2a0b..b0c66b81 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -181,7 +181,7 @@ class Guest(XMLBuilder):
"vcpu_cpuset", "vcpulist", "numatune", "resource", "sysinfo",
"bootloader", "os", "idmap", "features", "cpu", "clock",
"on_poweroff", "on_reboot", "on_crash",
- "pm", "emulator", "devices", "seclabels"]
+ "pm", "emulator", "devices", "launchSecurity", "seclabels"]
def __init__(self, *args, **kwargs):
XMLBuilder.__init__(self, *args, **kwargs)
@@ -272,6 +272,7 @@ class Guest(XMLBuilder):
idmap = XMLChildProperty(DomainIdmap, is_single=True)
resource = XMLChildProperty(DomainResource, is_single=True)
sysinfo = XMLChildProperty(DomainSysinfo, is_single=True)
+ launchSecurity = XMLChildProperty(DomainLaunchSecurity, is_single=True)
_metadata = XMLChildProperty(DomainMetadata, is_single=True)
xmlns_qemu = XMLChildProperty(DomainXMLNSQemu, is_single=True)