summaryrefslogtreecommitdiff
path: root/virtinst/xmlbuilder.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2018-09-02 09:02:32 -0400
committerCole Robinson <crobinso@redhat.com>2018-09-04 14:55:04 -0400
commit9a5b903086ea23350a6b219d2d0a01594e039268 (patch)
tree449d859aa604e2e4d945dbeb3f213328cfc3825b /virtinst/xmlbuilder.py
parent640a0686500a4665d3507b44c270099356a03e42 (diff)
downloadvirt-manager-9a5b903086ea23350a6b219d2d0a01594e039268.tar.gz
domain: features: Add set_defaults
And move all the Guest logic there. We need to add an xmlbuilder helper _prop_is_unset to be able to determine if a bool property is unset, in our quest to remove default_* xmlbuilder bits
Diffstat (limited to 'virtinst/xmlbuilder.py')
-rw-r--r--virtinst/xmlbuilder.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py
index e02b42de..7f520add 100644
--- a/virtinst/xmlbuilder.py
+++ b/virtinst/xmlbuilder.py
@@ -744,6 +744,14 @@ class XMLBuilder(object):
self._xmlstate.xmlapi.node_force_remove(xpath)
self._set_child_xpaths()
+ def _prop_is_unset(self, propname):
+ """
+ Return True if the property name has never had a value set
+ """
+ if getattr(self, propname):
+ return False
+ return propname not in self._propstore
+
#################################
# Private XML building routines #