Commit Graph

1362 Commits

Author SHA1 Message Date
Cole Robinson 07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -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
Hu Tao ee7168e6f9 Add and fix test cases for cpu mode attribute
This patch adds and fixes test cases for cpu mode attribute.

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

(crobinso: Minor rebase tweaks)
2013-04-14 13:55:26 -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 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 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 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 459cb3de5e util: Remove old default_bridge, rename default_bridge2 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 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
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
Cole Robinson ae0e151c8a tests: Add rbd pool example to testdriver 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
Cole Robinson 9d05583c26 Remove autotools, replace with distutils-extra
Despite being a known quantity, autotools is so overkill for our needs,
so let's drop it and replace it with a much simpler and easy to customize
system.
2013-04-03 18:20:51 -04:00
Cole Robinson abbdd1743a Fix some pylint 2013-04-03 18:13:27 -04:00
Cole Robinson e741d9cab6 Clean up all pylint + pep8 violations 2013-04-03 18:13:25 -04:00
Cole Robinson d057cce292 Remove local copy of IPy 2013-04-03 18:13:25 -04:00
Daniel P. Berrange 3c3237b951 Convert to use GTK3 and GObject Introspection bindings
Switch over to use GObject introspection bindings for all python
modules related to GObject/GTK3/etc. It is not possible to mix
and match old pyggtk/pygobject manual bindings with new introspection
based bindings so it must be all changed in one go.

Imports like

    import gtk

Change to

    from gi.repository import Gtk

The vmmGObject class is changed to always inherit from GObject.GObject
There is no compelling reason to avoid a GObject dep for the
virt-manager TUI & it horribly messed up the code.

Signal declarations are changed from

  vmmChooseCD.signal_new(vmmChooseCD, "cdrom-chosen", [object, str])

To

     __gsignals__ = {
        "cdrom-chosen": (GObject.SignalFlags.RUN_FIRST, None, [object, str])
    }

which is required by new GObject bindings

Most of the rest of the change is simply dealing with renamed
constants / classes.

Alot of legacy compat code was removed - ie helpers which
check to see if certain GTK2 methods are available are no
longer required since we're mandating GTK3 only.

The event loop is replaced with LibvirtGLib's event loop.

Still todo

 - Rip out all DBus stuff & make vmmEngine class inherit GtkApplication
   which provides unique support & DBus method handling
 - Switch to use LibvirtGConfig & LibvirtGObject for libvirt interaction
 - Possibly switch to Python 3 too ?
 - Figure out why GNOME keyring is missing Introspection support

My suggestion is that the standalone GIT repo for virt-install
only live on as a support branch for legacy platforms.

A stable-0.9 branch of virt-manager can be kept for legacy PyGtk2
based virt-manager releases.

The virt-manager master branch should exclusively use GObject
inspection and ideally Python3 and contain both the virt-manager
and virt-install codebases in one since they are intimately
related to each other & using separate GIT repos has needlessly
complicated life for everyone.

crobinso:
    Some locking fixes
    Misc cleanups and dropping now-useless code
    Fix dbus usage
    Fix graph cell renderer regression
    Fix a couple tooltip issues
2013-04-03 18:13:24 -04:00
Cole Robinson 12dcebcc0a Disable a bunch of pep8 tests I won't fix before gtk3 port 2013-02-06 15:41:43 -05:00
Cole Robinson f4aa83e10f Fix pylint detection, and clean up the fallout 2012-01-31 19:07:32 -05:00
Cole Robinson 1ff601138f Specify all logging string format args as function parameters
As warned about by pylint. Also clean up some pylint false positives
and a few scattered legit warnings.
2012-01-16 22:04:40 -05:00
Cole Robinson a1d2b1a0f0 pylint: s/addmsg/skipmsg/g 2012-01-16 21:13:41 -05:00
Cole Robinson 25f5bc90a7 Actually run pep8 against TUI, fix the fallout 2011-07-14 12:28:05 -04:00
Cole Robinson 303c8c91df tui: Enable pylint check for TUI, fix a bunch of reports
There are still a lot of errors reported, so more patches are required to
make pylint silent.
2011-05-31 15:55:52 -04:00
Cole Robinson 33b67a1c16 pylint: Add a test exception 2011-03-23 10:41:07 -04:00
Cole Robinson 677f73fca7 Run pep8 with check-pylint, fix the fallout 2010-12-10 11:47:07 -05:00
Cole Robinson 0fd57daca1 pylint: Check for unused variables, fix fallout 2010-12-09 11:22:35 -05:00
Cole Robinson fe14b5e200 Use URI hacking from virtinst to facilitate testing 2010-12-07 14:26:51 -05:00
Cole Robinson 1c3e7a1ea3 Remove some unneeded imports and old pylint workarounds 2010-11-30 15:01:02 -05:00
Cole Robinson 779dcdd824 Don't use old style __gobject_init__() 2010-11-30 14:40:49 -05:00
Cole Robinson 5a8523fc03 Silence a pylint false positive 2010-11-29 18:11:27 -05:00
Cole Robinson 81eb69853f More pylint fixes 2010-11-29 17:28:52 -05:00
Cole Robinson 716bec3e56 Enable some more basic pylint checks and clean the code 2010-11-29 14:06:43 -05:00
Cole Robinson 026934ed3e pylint: Fix script for latest pylint version 2010-11-11 16:29:30 -05:00
Cole Robinson 297c84bbc3 Clean up pylint 2010-05-05 16:16:15 -04:00
Cole Robinson 1e9dcc8615 Drop no longer needed pylint check. 2010-04-21 13:09:15 -04:00
Cole Robinson 5aaae5db86 Fix 'tests' install to not end up in RPM 2010-02-08 22:27:15 -05:00
Cole Robinson b53a3a5e6b Fix an error detecting pylint features 2010-01-27 13:47:53 -05:00
Cole Robinson 1842a204dd Fix up some pylint. 2009-10-28 20:35:13 -04:00
Cole Robinson c24ba2fd5d Make sure pylint supports a check before we disable it. 2009-10-28 20:20:14 -04:00
Cole Robinson 994d516ee8 Block a new pylint check. 2009-09-17 12:31:17 -04:00
Cole Robinson 31509207c2 Actually try to fix pylint spamming. 2009-09-16 16:00:47 -04:00
Cole Robinson 2802745e3e Try to avoid 'maximum recursion depth' errors from pylint script. 2009-09-14 10:14:41 -04:00
Cole Robinson 1e603974bd Clean up some pylint warnings on rawhide. 2009-05-11 10:13:32 -04:00
Cole Robinson dd50d5e141 Check 'defined outside init' w/ pylint script, fix errors. 2009-04-03 14:15:23 -04:00
Cole Robinson 67adc74816 Packages the tests directory with 'make dist' 2009-04-03 14:15:13 -04:00
Cole Robinson b1f69cffd8 Add libvirt storage aware file browser.
Hook it up to the New VM and Add Hardware wizards, all storage browsing.
2009-03-09 16:19:39 -04:00
Cole Robinson bdd09af3f7 Mark pylint script as executable. 2009-01-12 14:54:32 -05:00
Cole Robinson 83884c0ef6 Add 'make check-pylint' command. 2008-12-17 15:27:38 -05:00