Cole Robinson
accff84ecc
virtinst: Fix import ordering to standardize on relative imports
...
Kind of annoying that some imports were directly from files while
some were from the __init__.py convenience bits.
2013-08-08 20:49:50 -04:00
Cole Robinson
a23e30eb2d
xmlbuilder: Fix clearing address.domain element
...
Our scheme for not unlinking a root node would cause issues if trying
to clear a @domain property when the root node was <domain>, even
if they are unrelated.
2013-07-29 10:45:37 -04:00
Cole Robinson
03bd6f024e
xmlbuilder: Fix setting float value for is_int
2013-07-25 15:31:40 -04:00
Cole Robinson
695c4b7189
VirtualDisk: Make the driver/type auto changes opt-in
...
It was hard to get this right, so just require that any API users
which are changing the path of an existing disk call sync_path_props()
2013-07-25 15:04:47 -04:00
Cole Robinson
bdfb86fd06
xmlbuilder: Break out much of the xml handling to a separate class
...
Clears things up a bit.
2013-07-25 15:04:47 -04:00
Cole Robinson
bba3c93508
xmlbuilder: Always keep around an xml node, even if building from scratch
...
This further unifies the 'parse existing' vs. 'build new' case.
2013-07-25 10:59:23 -04:00
Cole Robinson
170595698e
xmlbuilder: Drop is_tri property
...
It's a minor variation of is_bool which is better understood by using
defaults.
2013-07-24 12:51:53 -04:00
Cole Robinson
7a369a9802
xmlbuilder: Drop is_multi option
...
It complicates things quite a bit. And there's only one user, so just open
code it.
2013-07-24 12:36:44 -04:00
Cole Robinson
7411776c9a
xmlbuilder: Simplify global XML vars
...
Just have classes specify a root XML path, and figure out root name,
indentation, and dumpxml path from there.
2013-07-24 12:36:10 -04:00
Cole Robinson
3cf7679beb
Guest: Add get_install_xml for install handling
2013-07-24 11:32:30 -04:00
Cole Robinson
c7af25f7ae
xmlbuilder: Drop cleanup_xml
2013-07-24 10:59:03 -04:00
Cole Robinson
e0190f7b5e
XMLBuilder: Drop some is_parse checking
2013-07-24 10:40:35 -04:00
Cole Robinson
2ba3ec2684
Guest: Convert to new style XML prop, drop a bunch of XML infrastructure
...
Now every XML property is new style, without explicit local get/set
handlers. Drop a bunch of XML infrastructure that was helping with the
transition.
2013-07-24 07:54:04 -04:00
Cole Robinson
24e433a8de
CPU: Convert to new style XML props
2013-07-23 17:34:33 -04:00
Cole Robinson
6af0848fb8
osxml: Convert to new style XML props
2013-07-23 17:34:33 -04:00
Cole Robinson
6127cac414
xmlbuilder: Allow is_int with custom converter options
2013-07-23 17:34:33 -04:00
Cole Robinson
aba9d82bac
xmlbuilder: Improve error report if we might unlink root node
2013-07-23 17:34:32 -04:00
Cole Robinson
b18a29d8ff
xmlbuilder: Add explicit support for yes/no XML options
2013-07-23 17:34:32 -04:00
Cole Robinson
326731cfc5
xmlbuilder: Remove order_elements hack
2013-07-23 17:34:32 -04:00
Cole Robinson
510d28e33b
Seclabel: Convert to new style XML props.
2013-07-23 17:34:31 -04:00
Cole Robinson
e802eae07b
VirtualCharDevice: Convert to new style XML props, rework API
2013-07-23 17:34:31 -04:00
Cole Robinson
a9296ec3ae
VirtualController: Convert to new style XML props
2013-07-15 21:52:18 -04:00
Cole Robinson
b6f2d99db2
VirtualSmartCard: Convert to new style XML props
2013-07-15 12:36:57 -04:00
Cole Robinson
f3a37ba195
VirtualTPM: Convert to new style properties
2013-07-15 12:18:23 -04:00
Cole Robinson
6f61e30b18
VirtualWatchdog: Convert to new style XML props
2013-07-15 11:11:16 -04:00
Cole Robinson
e5230e90e9
VirtualAddress: Convert to new style XML properties
...
This adds a bunch of extra XML parsing infrastructure to make everything
work the same.
2013-07-15 10:40:12 -04:00
Cole Robinson
7cfe4ddb4d
VirtualDisk: Move xml cleanup to a global xmlbuilder hook
2013-07-14 18:31:33 -04:00
Cole Robinson
1a74a8fda6
VirtualDisk: Convert 'type' to new style XML property
2013-07-14 18:15:47 -04:00
Cole Robinson
8ad9084e5f
default rejiggering setup, no regression
2013-07-14 17:12:39 -04:00
Cole Robinson
2cea517823
xmlbuilder: Allow classes to specify order of certain xml elements
...
This will save us some test case churn. As an example, we now
do auto building of disk <target> XML and it doesn't alter things.
Without this bus and target are often swapped.
2013-07-14 16:45:28 -04:00
Cole Robinson
154bad0184
xmlbuilder: Simplify default getter/setter some more
2013-07-14 16:35:25 -04:00
Cole Robinson
2d460a98e5
xmlbuilder: Don't treat 0 as None in setter impl
2013-07-14 16:35:25 -04:00
Cole Robinson
328f98272c
xmlbuilder: Add plumbing to track if a property is unset
2013-07-14 16:35:09 -04:00
Cole Robinson
d3dbbe9f54
xmlbuilder: Add explicit support for refreshing an XML prop
2013-07-14 16:34:54 -04:00
Cole Robinson
c12327cbd1
Guest: Switch memory units to KB to match default XML
2013-07-13 23:07:01 -04:00
Cole Robinson
69e1d66b53
xmlbuilder: Few misc cleanups and streamlinings
2013-07-13 22:51:54 -04:00
Cole Robinson
7d75a43e33
XMLProperty: Add convenience param is_int
2013-07-13 21:49:32 -04:00
Cole Robinson
5f58d05051
VirtualDisk: Convert more XMLProperties to the new world order
2013-07-13 21:40:54 -04:00
Cole Robinson
41afdfd9aa
hostkeymap: Globally cache the host lookup
...
Rather than make the callers worry about it
2013-07-13 20:58:09 -04:00
Cole Robinson
ed826315a5
xmlbuilder: Simplify free'ing xpath contexts
2013-07-13 20:47:19 -04:00
Cole Robinson
02f35628fb
VirtualDisk: Make get_xml_config not have side effects
...
Move all the defaults setting to a set_defaults function, wire it
up to Guest.get_xml_config.
2013-07-13 20:22:19 -04:00
Cole Robinson
b152e83fef
virtinst: Rename XMLBuilderDomain.py -> xmlbuilder.py
...
And XMLBuilderDomain -> XMLBuilder
And _xml_property -> XMLProperty
2013-07-13 18:57:24 -04:00