[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH 1/3] virtinst: parse capabilities baselabel element



libvirt since version 1.1.4 shows the security context used to execute
the hypervisor process.

Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
---
 virtinst/capabilities.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py
index b2b2952..ec18ac8 100644
--- a/virtinst/capabilities.py
+++ b/virtinst/capabilities.py
@@ -486,6 +486,7 @@ class SecurityModel(object):
     def __init__(self, node=None):
         self.model = None
         self.doi = None
+        self.baselabels = {}
 
         if not node is None:
             self.parseXML(node)
@@ -496,6 +497,9 @@ class SecurityModel(object):
                 self.model = child.content
             elif child.name == "doi":
                 self.doi = child.content
+            elif child.name == "baselabel":
+                typ = child.prop("type")
+                self.baselabels[typ] = child.content
 
 
 class Capabilities(object):
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]