Commit Graph

242 Commits

Author SHA1 Message Date
Giuseppe Scrivano
8abcae5073 virtinst: add support for virtio-rng devices
The virtio-rng device is supported by libvirt since version 1.0.3.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-20 18:56:12 -04:00
Cole Robinson
cadf5ba770 xmlbuilder: Cache class property maps
Shaves about 20 seconds off the test suite
2013-09-20 11:30:33 -04:00
Cole Robinson
85e81df01a xmlbuilder: Serialize child objects even if they aren't in PROP_ORDER
This was just a bug
2013-09-20 11:17:11 -04:00
Cole Robinson
a23f1794d0 guest stuff 2013-09-20 10:55:48 -04:00
Cole Robinson
fd52fb2c32 util: Drop 'partition' helper, we require python 2.5 these days 2013-09-20 10:05:42 -04:00
Cole Robinson
aff0ddb259 Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00
Cole Robinson
3db5cb5f06 Use XMLBuilder for Interface XML
So we unify parsing and building the XML.

Since we already do this for vmmDomain, take the opportunity to move
the shared infrastructure into vmmLibvirtObject
2013-09-19 16:56:38 -04:00
Cole Robinson
cb06f7eb3d xmlbuilder: Ensure top level XML objects always end with a newline 2013-09-19 13:48:28 -04:00
Cole Robinson
99a50de53e Simplify XMLProperty declarations 2013-09-19 13:31:33 -04:00
Cole Robinson
1aaf41b201 xmlbuilder: A couple optimizations
This brings the test suite back to pre-refactor speeds
2013-09-19 13:31:33 -04:00
Cole Robinson
0be727e6bb xmlbuilder: Track singleton child properties explicitly
Things like Guest.Seclabel, VirtualDevice.VirtualAlias, etc.

Now we don't need to track a full xpath with each class, just its root
name and we build its hierarchy depending on its parent.
2013-09-19 13:31:33 -04:00
Cole Robinson
38545e3af8 Fix pylint warnings with latest version 2013-09-19 13:14:44 -04:00
Cole Robinson
f5dab5cdfa xmlbuilder: Distinguish between parent xpath and object xpath
We want to add support for nested objects, like child interfaces
in virInterface definition. To do that we need to distinguish between
parent xpath and relative object path.

This causes a 10-15% slow down in the unit test suite for me. There's
probably opportunities for speeding this up.
2013-09-11 11:28:27 -04:00
Cole Robinson
eb4068cc47 xmlbuilder: Add infrastructure for parsing into subclasses
We already had this open coded in several classes with varying methods.
Now all someone has to do is

features = XMLChildProperty(CPUFeature)

The xmlbuilder code will pull the relevant xpath from the CPUFeature class,
handling parsing into instances of that class directly. The only
thing that needs to be manually added is the add_* remove_* functions.
2013-09-10 21:34:45 -04:00
Cole Robinson
10e608e9dd guest: Fix adding a parsed device to a built guest 2013-09-10 18:34:36 -04:00
Cole Robinson
71d7e20811 guest: Simplify remove_device 2013-09-10 18:34:36 -04:00
Cole Robinson
37ec775daf xmlbuilder: Fix multiple overwrite of root_xpath
Nothing really triggers it right now, but future code may
2013-09-10 18:34:36 -04:00
Cole Robinson
67cc81f6b1 virt-install: Add --boot useserial=on
Which gives bios output over serial console via sgabios
2013-09-04 11:57:26 -04:00
Martin Kletzander
ab94df86c4 Typos fix and minor cleanup
Commit 57aab5de copy-pasted a typo, introduced a new one and used bad
order of parameters, so I'm fixing it so we're not stuck with it
forever.
2013-09-03 08:47:26 +02:00
Martin Kletzander
70fae14635 Automatically add multifunction address parameter when needed
Also check for use of duplicate addresses before passing such XML to
libvirt.  And fix tests (of course).
2013-09-03 08:08:06 +02:00
Martin Kletzander
57aab5de17 Add support for multifunction address parameter 2013-09-03 08:08:06 +02:00
Cole Robinson
018fcbbb4a distroinstaller: Support --initrd-inject for RHEL4 (bz 866608)
RHEL4 kernels are gzip'd ext2 images, so unzip it, use debugfs to inject
files, and zip it back up. Based on shell code from Patrick J. LoPresti.
2013-09-02 16:10:28 -04:00
Cole Robinson
288a611ff7 graphics: Fix default autoport value
default_cb doesn't want yes/no, it wants True/False
2013-09-02 11:54:02 -04:00
Daniel Gollub
1730a8e5ff virtinst: add nwfilter support
This allows to make use of libvirt network filtering support with virt-install.
With the additional option "filterref" in the --network parameter one can
configure any defined nwfilter per network interface, i.e.:
virt-install ... --network network=mynet,model=virtio,filterref=clean-traffic

(crobinso: add an xmlparse test case)
2013-08-29 11:44:40 -04:00
Cole Robinson
9d11c7eae3 virtinst: Add DomainSnapshot object and some plumbing
Just for parsing domainsnapshot XML and performing some support checks
2013-08-21 18:26:27 -04:00
Martin Kletzander
3b9c397d11 Handle storage formats properly
This simple patch fixes three issues:

 1) We used only one list of storage formats.  However, we are able to
    use some formats which we cannot create.  This patch adds a list
    called 'no_create_formats' and moves such formats (currently only
    one) into it and uses new parameter 'create' which describes
    whether such formats should be removed or not.

 2) When creating new storage with the above fixed, we need to set the
    combobox's text to "" in order not to change it to "raw".  This
    was already done in reset_state(), but we need it also when
    toggle_storage_select() happens and it doesn't hurt in
    set_initial_state(), so I abstracted the implementation into
    populate_disk_format_combo().

 3) It's a bit unrelated, but when bus of a domain disk gets changed
    (in details.py), the address was not cleaned up properly ('target'
    attribute was still kept), so I fixed up the VirtualDeviceAddress
    as well.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=907289
2013-08-21 11:12:42 +02:00
Martin Kletzander
64b1ca15f2 Fix UUID generation according to RFC 4122
In commit 74aa8c8a, I somehow made an off-by-one error even though
that code was almost copy-paste from libvirt's commit 396c4d34.
2013-08-19 10:56:56 +02:00
Cole Robinson
8460af9a99 VirtualWatchdog: Add dump action 2013-08-18 16:06:18 -04:00
Cole Robinson
e52f6050fa qemu ARM support: wire up virtio, fix a bunch of defaults
This has some fallout on non-x86 tests which were wrong to begin with.
There's still some missing bits but this is the jist of it.
2013-08-18 12:30:58 -04:00
Cole Robinson
414f6bbd99 guest: Use virtio on plain qemu on x86
It's been available for a long long time, and unifies code paths.
2013-08-17 18:00:31 -04:00
Cole Robinson
a8858cd366 osdict: Don't run support checks, make the caller do it
Some ARM bits we are about to add would substantially complicate the
current setup, so move all the logic into guest.py where we can be
more flexible. I think this is closer to what libosinfo will give us
as well.
2013-08-17 17:53:17 -04:00
Cole Robinson
3130f64e35 VirtualDisk: Add is_disk, is_cdrom, is_floppy helpers 2013-08-17 14:21:30 -04:00
Cole Robinson
c67bd587b7 osdict: Add solaris 11 (bz 894017) 2013-08-17 10:37:59 -04:00
Cole Robinson
cfe771cf4a VirtualDisk: Add error_policy 'report' value 2013-08-17 10:35:44 -04:00
Cole Robinson
e02fa9b4fe virt-install: Add --boot dtb=DTB support
Allows passing in a device tree binary to the guest. Needed for
some non-x86 configurations.
2013-08-16 19:25:26 -04:00
Cole Robinson
cc75bc9311 guest: Remove needless functions
And simplify some test infrastructure as a result
2013-08-14 19:43:02 -04:00
Cole Robinson
7323b58862 osdict: Add Fedora 20 2013-08-12 13:32:30 -04:00
Cole Robinson
81ce0a1085 osdict: Clean up 'default' handling usage
- Unify looking up osdict values
- Have Guest.py pass in its defaults, not encoding them in osdict
- Explicitly specify every device parameter that osdict handles, rather
    than have some psuedo magic dictionary format to handle it
2013-08-12 13:31:47 -04:00
Cole Robinson
f220e6778c Guest: Drop OS listing helpers, and OS_TYPES back compat 2013-08-11 14:52:30 -04:00
Cole Robinson
e07154f997 osdict: Drop solaris back compat bits
Once upon a time solaris entries has typename="unix", but were moved to
typename="solaris". We maintained a link to the unix type for back compat,
but now the distinction doesn't matter at all, so drop it.
2013-08-11 13:52:53 -04:00
Cole Robinson
c426d5a16f Guest: Drop os_type, just use single os_variant
Internally the distinction hasn't been valuable for a long time,
so simplify the API here.
2013-08-11 12:39:36 -04:00
Cole Robinson
45d2db887d virt-*: Unify handling of --os-variant
And hide --os-type from the cli since it is long since redundant.
2013-08-11 12:39:28 -04:00
Cole Robinson
f1cb3dfa04 Guest: Remove needless _OS_TYPES storage 2013-08-11 12:39:28 -04:00
Cole Robinson
f1bf4c7188 osdict: Allow inheiriting from another OS entry 2013-08-11 12:39:28 -04:00
Cole Robinson
3ef81d5d1e osdict: Convert opencoded dicts to explicit classes
Right now this is a no-op, but will be used to simplify things
further.
2013-08-11 12:39:28 -04:00
Cole Robinson
d328b311ec support: Drop open coded dict, use classes 2013-08-11 12:39:28 -04:00
Cole Robinson
3e158b80bf guest: Move cpuset static functions to DomainNumatune 2013-08-11 12:39:28 -04:00
Cole Robinson
d36f953142 guest: Move all console handling to virt-install, the only consumer 2013-08-11 12:39:28 -04:00
Cole Robinson
090f663a6a guest: Drop removeOld parameter, just use Guest.replace 2013-08-11 12:39:28 -04:00
Cole Robinson
87789548ba guest: Drop consolecb and wait parameters from start_install 2013-08-11 12:39:28 -04:00