Commit Graph

2664 Commits

Author SHA1 Message Date
Guannan Ren
0a9f58a064 fix argument error when right-clicking hw list to popup menu
Traceback (most recent call last):
  File "../virt-manager/virtManager/details.py", line 1072, in popup_addhw_menu
    self.addhwmenu.popup(None, None, None, 0, event.time)
TypeError: popup() takes exactly 7 arguments (6 given)
2013-04-14 13:10:19 -04:00
Cole Robinson
cdac966360 setup: Make 'install' work even if 'configure' wasn't run 2013-04-14 12:51:22 -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
1771f6a300 tests: Replace 'scriptimports' with a much simpler method 2013-04-13 15:38:53 -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
fcc680cae1 Use an RC file for pylint
Will let use tweak things easier in the future
2013-04-13 15:22:29 -04:00
Cole Robinson
f471761ebd Simplify MANIFEST
Seems to give us the same results
2013-04-13 14:17:28 -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
b8f1bbd3de asyncjob: Rename function that collides with gtk method 2013-04-13 13:42:39 -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
d323fbbe23 pylint: Disable 'Use of property on old style class' warning
pylint can't handle the fact that our Gtk subclasses _are_ new
style classes.
2013-04-12 08:27:45 -04:00
Cole Robinson
e03f84ac7f autodrawer: Disable pylint warnings caused by gobject introspection 2013-04-12 08:27:45 -04:00
Cole Robinson
c1e0bec220 graphwidgets: Drop cairo import
We only use it for one constant, so just hardcode it.
2013-04-12 08:27:45 -04:00
Cole Robinson
9515a8575d Disable pylint warnings about gi.repository
Since pylint still can't handle the dynamic nature of gobject
introspection.
2013-04-12 08:27:45 -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
aead0135b0 setup.py: Re-add 'pylint' subcommand
We drop our hacky shell wrappers, and just track it all in setup.py
2013-04-12 08:27:09 -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
Gene Czarcinski
d5d146aad1 make autobuild.sh work
There a some problems with autobuild.sh and this patch addresses
them:

1. "python setup.py install" needs to use --root= instead
of --prefix=

2. For the rpmbuild, use dist/*.tar.gz instead of *.tar.gz

3. Add "export AUTOBUILD_OVERRIDE_VERSION=y" so that if
the version-id changes are applied, a simpler version-id
is used for autobuild.

4. Assume tests are fixed and enable running
"python setup.py test"
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-10 17:49:18 -04:00
Cole Robinson
3ef6e4d539 Fix wrapper scripts
Reported-by: Gene Czarcinski <gene@czarc.net>
2013-04-10 17:45:13 -04:00
Cole Robinson
ffb876e3a1 setup: Make sure non-/usr prefix works
Basically mandate that configure is passed a prefix, since we need this
info before the install process.
2013-04-10 17:45:13 -04:00
Gene Czarcinski
2a7a634df0 Install virtcli directory 2013-04-10 17:45:12 -04:00
Cole Robinson
48bb05e32f cliconfig: Privatize _get_param 2013-04-10 16:47:36 -04:00
Gene Czarcinski
fde67ce3d3 add MANIFEST.in to specify includes and excludes
With no MANIFEST.in, distutils/setup/sdist gets the filelist
mostly correct except that it adds in whatever is in the
top directory.  Using git-ls-files is not a good solution
either because a number of additional files (not git
managed) will be needed.

The solution is to use a MANIFEST.in.  All of the
toplevel files which are to be included will need to be
specified.  Also, each directory will need to be specified
and unwanted files (e.g., *.pyc) excluded.  Other (non-specified)
files and directories will be ignored.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-10 16:20:32 -04:00
Martin Kletzander
1876ce0af8 Fix cpuset tests
In order to fix last tests that fail for me, I had to modify the
output xml, both modified machines will fit in the first numa node, so
the cpus from that node should be mentioned in the xml and that lead
me to the fact that the problem was in the test xml and not the code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-04-10 10:02:13 -04:00
Martin Kletzander
a2d36f8c52 Fix hostdev tests
For <hostdev> element, mode="capabilities" is used only for
block/character device passthrough and thus it fails with pci
passthrough.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-04-10 10:02:13 -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
Cole Robinson
d0a76f3905 Add a couple todo entries 2013-04-04 12:07:31 -04:00
Cole Robinson
9fc356af43 virt-install: Better error when user accidentally passes -vcpus
Notice the missing - in -vcpus. It maps to

--hvm --cdrom pus

If the user also specifies --paravirt, they get an error that hvm and
paravirt conflict, which is very confusing.

There isn't a nice way to catch this issue which isn't back compatible,
so scrape the raw argv and try to figure it out.
2013-04-04 12:04:07 -04:00
Cole Robinson
9aa54dc1c4 man: virt-install: Update fedora URL examples 2013-04-04 11:59:28 -04:00
Cole Robinson
c6c9393cd8 Remove my name from all translation files, I didn't do anything 2013-04-04 08:39:28 -04:00
Gene Czarcinski
6baad232fe IPv6 support v2: update rpm spec file
1. remove Requires: python-IPy
2. add Requires: python-ipaddr
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-03 21:32:57 -04:00
Gene Czarcinski
ee748e19c7 IPv6 support v2: update the virt-manager-tui
This patch updates the tui python to use ipaddr
from python-ipaddr rather than IPy.py.  This patch
removes all IPy dependency.

This patch works under RELEASE-0.9.4-1 but tui is
broken under branch gtk3.2.  Applying patch anyway
and then will worry about it working later.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-03 21:32:57 -04:00
Gene Czarcinski
61f8e39700 IPv6 support v2: update the create network wizard
With this patch, basic IPv6 support has been added to
the network creation wizard.  It includes changes to
both the glade-3 ui and the related python code.  There
have been some significant changes made to both files for
IPv6 support and some additional capabilities.

This update includes the fix so color will work in the
network creation wizard.

Besides basic IPv6 support, this includes optionally
specifying a DNS domain name and enabling IPv6 internal
routing if no IPv6 address is specified.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-03 21:32:57 -04:00
Gene Czarcinski
73629b76b2 IPv6 support v2: update gui python and ui
The purpose of this update is:

1. replace use of IPy with ipaddr since ipaddr has needed
functionality and IPy does not.
2. Update the glade-3 ui (vmm-host.ui) to provide
for IPv6 as well as IPv4.  If either IPv4 or IPv6
is not defined, its respective frame is hidden.
3. The DNS Domain Name is added to the basic frame.
4. IPv4 forwarding is moved to the basic frame and ipv6
forwarding is added.
5. If an IPv4 address is not defined then the IPv4
is set to Isolated network, internal rout only.
6. IPv6 network has three values for Forwarding:
Isolated network, Isolated network with internal forwarding,
and Routed network.
7. Add network definitions to tests/testdriver.xml which
include IPv6 and other new parameters now being handled.

This patch includes the fix for getting a KeyError exception
when deleting a network definition.

In this update, createnet.py has been changed to use
ipaddr but it still only handles IPv4 network creation.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>

(crobinso: Add Gene to AUTHORS)
2013-04-03 21:32:42 -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