Commit Graph

2235 Commits

Author SHA1 Message Date
Cole Robinson
6f7fca5f2a tests: Greatly expand testdriver.xml
Mostly comes from my own testdriver I used for manual virt-manager testing.
Add some notes to HACKING about using it.
2013-04-21 13:34:51 -04:00
Guannan Ren
e941a9e92b cpu: add helper function to reset cpu related variables to none
The helper function aims to reset cpu related vars to none except
<topology>.
It is named with clear_attrs(). clear() could be saved for later use
of clearing all of them including <topology>.
2013-04-20 16:04:55 -04:00
Guannan Ren
15f72a84ab check cpu host-model mode support
UPDATE_CPU flag exists after v0.8.0, so libvirt that
supports HOST_MODEL should support UPDATE_CPU,
the earliest version we are going to check is v0.9.10.
2013-04-20 16:04:43 -04:00
Cole Robinson
a55bb900fc VirtualDisk: Fix iotune code indentation 2013-04-17 13:15:24 -04:00
Cole Robinson
07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -04:00
Cole Robinson
9f3b21c9a1 Shorten iotune names for simplicity
And refactor some of the virt-manager code for the same goal.
2013-04-16 18:37:42 -04:00
Cole Robinson
4107646bf3 virtinst: install: simplify has_install_phase() 2013-04-15 12:37:36 -04:00
Cole Robinson
0f57dae8b2 virtinst: Remove not-very-useful post_install_check
It doesn't work in a variety of cases and it's not very useful
to begin with.
2013-04-15 12:37:36 -04:00
Ken ICHIKAWA
2a72d50477 Add support for cpu mode attribute and cpu host-passthrough
With this patch, users can use cpu host-passthrough like this:

  virt-install --cpu host-passthrough ...

Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>

(crobinso: Add Hu Tao to AUTHORS)
2013-04-14 13:55:06 -04:00
Cole Robinson
d5f466d558 virtinst: util: Move keymap stuff to its own file 2013-04-13 16:31:13 -04:00
Cole Robinson
abbc828b70 VirtualGraphics: Don't lookup local keymap over and over
Triggered with virt-manager: new vm -> customize before install with a
non qemu. Guest.get_xml_config copies each device so it can set defaults
in a non persistent way. Unfortunately VirtualGraphics was copied before
a keymap lookup was ever done. End result was that we called
util.default_keymap over and over which is slow and floods the logs.
2013-04-13 16:18:03 -04:00
Cole Robinson
94cf9a204b VirtualGraphics: Cache locally keymap 2013-04-13 16:14:14 -04:00
Cole Robinson
02733ecff4 virtinst: util: Simplify randomUUID 2013-04-13 15:48:06 -04:00
Cole Robinson
0d243983d0 Revive pep8 and clean up the code
autopep8 is pretty cool :)
2013-04-13 15:22:43 -04:00
Cole Robinson
3f79fa3919 Fix the last of the pylint messages
If using an older pylint, there are still some complaints about hashlib
and Popen, but those aren't our problems.
2013-04-13 13:45:08 -04:00
Cole Robinson
baf531f710 virtinst: Guest: Remove back compat static device lists 2013-04-13 13:40:45 -04:00
Cole Robinson
248a1a509f virtinst: Guest: remove legacy 'boot' handling 2013-04-13 13:40:45 -04:00
Cole Robinson
7a47465ab6 virtinst: Guest: remove back compat graphics handling 2013-04-13 13:40:45 -04:00
Cole Robinson
9359ad2bb6 virtinst: Remove ParaVirt and FullVirtGuest
They were just around for back compat at this point, the tools
have moved on.
2013-04-13 13:40:45 -04:00
Cole Robinson
ae471007fc Tons of misc pylint fixes 2013-04-13 13:40:29 -04:00
Cole Robinson
986014ec49 XMLBuilderDomain: Replace 'map' usage
Our usage here was complex and very specific to map() behavior, so
add an explicit function that replicates what we want.
2013-04-12 08:27:44 -04:00
Cole Robinson
a386186c74 Remove most map() and filter() usage
They aren't available on python3 so pylint complains, and list
comprehensions are usually better.
2013-04-12 08:27:44 -04:00
Cole Robinson
c5e45ae448 Remove all relative imports
We also drop VirtualDevice from the 'public' virtinst API, since there
are better ways to get its info.
2013-04-12 08:27:44 -04:00
Cole Robinson
927bcc11cd virtinst: util: Move URI helpers to their own file
Helps us avoid some relative imports, and makes things cleaner.
2013-04-11 12:15:38 -04:00
Cole Robinson
69d3f21da6 virtinst: nic: Don't check MAC collision with host
It was:

- Slow
- Not that useful
- Only worked in the local case

If anyone cares, the proper thing to do is implement it with the iface APIs.
2013-04-11 12:15:37 -04:00
Cole Robinson
e0e3c212e4 virtinst: Remove manual selinux bits
Wasn't very useful to begin with, and modern day svirt correctly
handles things.
2013-04-11 12:15:37 -04:00
Cole Robinson
459cb3de5e util: Remove old default_bridge, rename default_bridge2 2013-04-11 12:15:37 -04:00
Cole Robinson
a07c81e92a util: Remove a bunch of unused methods
And move some to the only files they are used in.
2013-04-11 12:15:37 -04:00
Cole Robinson
b3779eec7d Remove old 'Xen' class name back compat 2013-04-11 12:15:37 -04:00
Cole Robinson
3bce20d974 virtinst: Combine util.py and _util.py
Was originally split to not pollute the public API, but we aren't public
anymore
2013-04-11 12:15:37 -04:00
Martin Kletzander
212b77cc1f Fix logical volume tests
After commit 590c8dbebf, the tests got
broken due to the fact that the commit broke something that was
working.  I'm changing the error to warning and fixing the tests.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-04-10 10:02:13 -04:00
Martin Kletzander
590c8dbebf Don't support sparse logical volumes
Sparse logical volumes are supported by libvirt, but only in case the
user takes care of the reallocation, which is not what virt-install
and virt-manager users want.  This patch defaults the logical volumes
to non-sparse ones and makes sure allocation is always equal to
capacity for such volumes.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-04-03 20:44:29 -04:00
Tom Lanyon
ef2bdc4722 virt-install: don't fail on storage pools without targets.
(crobinso: Add Tom to AUTHORS)
2013-04-03 19:40:39 -04:00
Cole Robinson
d6c8ad0297 Wire up python unit tests, unify gettext setup 2013-04-03 18:22:05 -04:00
Cole Robinson
88603e4fad Merge code from python-virtinst.git
As outlined here:

https://www.redhat.com/archives/virt-tools-list/2012-February/msg00040.html

For now this is just a direct import of the code from virtinst commit
dca5a4d6245f21d554f8853197a6a234bfc8e52c. History is not merged, so
please refer to original git for detailed commit histor:

http://git.fedorahosted.org/cgit/python-virtinst.git/
2013-04-03 18:22:05 -04:00