Commit Graph

51 Commits

Author SHA1 Message Date
Cole Robinson
d76aab264e tests: Only use one env variable to notify we are running tests 2014-02-10 14:47:20 -05:00
Cole Robinson
0b4a72fd77 virt-convert: Reimplement it
We totally break CLI compat here, but the previous tool wasn't sustainable.
Instead, repurpose the tool as strictly converting external formats
like ovf/vmx to native libvirt XML, and launch the guest.

So we drop vmx/virt-image output, and virt-image input, and a slew of
command line options. I don't think anyone was depending on this in a
scripted fashion, so in practice I don't think anyone will care.

Add much more comprehensive unit tests while we are at it.
2014-02-07 21:16:09 -05:00
Cole Robinson
a8dd7bd213 util: Fix validate_name error reporting 2014-02-05 19:02:42 -05:00
Cole Robinson
4ce356985a util: Relax name validation (bz 917444)
Warn about common cases like spaces in name, and let libvirt error on
the rest.
2014-02-01 08:37:28 -05:00
Cole Robinson
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Cédric Bosdonnat
796ddd966a Moved vmmFSDetail.convert_units to virtinst.util 2014-01-25 11:58:24 -05:00
Cole Robinson
d040bf3573 Drop the len <= 50 validation check for domain names
Just let libvirt error out, since we have no idea if this is still
relevant.
2014-01-17 18:42:15 -05:00
Giuseppe Scrivano
2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Cole Robinson
3f532fe263 VirtualDisk: Handle the blktap default
And cache the blktap lookup once for the localhost
2013-10-06 13:17:35 -04:00
Cole Robinson
98187eb4b7 util: Fix generate_name start_num logic
We would start at start_num+1 which was confusing, fix it to do
the right thing.
2013-10-05 10:22:27 -04:00
Cole Robinson
67c62e68de create: Move name to last page, arch/type to first page
Moving name to the end allows us to do things like generate a default
name based on the chosen OS type, which we do here. This is bz 736951

Moving arch/type to the front page of the wizard simplifies validation
and will be needed to intuitively install arm guests without a bunch
of hacky workarounds.
2013-10-01 16:53:59 -04:00
Cole Robinson
0b58badfc1 Storage debug and scratch files in ~/.cache/virt-manager (bz 693028) 2013-10-01 08:28:15 -04:00
Cole Robinson
a6d92c7001 Drop a lot of usage of utility XML functions 2013-09-22 17:34:53 -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
38545e3af8 Fix pylint warnings with latest version 2013-09-19 13:14:44 -04: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
7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Cole Robinson
43d15d67ac util: Have set_xml_path use xml_parse_wrapper 2013-07-24 12:08:00 -04:00
Cole Robinson
012d1cdc52 Installer: Drop all XML handling, just have it setup install info 2013-07-23 17:34:33 -04:00
Cole Robinson
0d5fe93048 Centralize XML helpers in virtinst/util.py 2013-07-12 13:10:23 -04:00
Cole Robinson
534e613d40 VirtualNetworkInterface: Absord MAC generating routines 2013-07-12 13:10:23 -04:00
Cole Robinson
7a2caee6e1 VirtualConnection: Allow using virt-manager object caches
So when we call into virtinst it doesn't do a whole round of object
lookup and XML fetching.
2013-07-07 18:54:08 -04:00
Cole Robinson
d5dc06148d virtinst: Move fetch_all_guests to connection object
And fetch_all_pools. And have it use pollhelpers
2013-07-07 15:14:59 -04:00
Cole Robinson
ee7d0b620d connection: Support listAll* object lookups
These calls save us a few API lookups, but are not supported by all
libvirt versions.

Since these bits were getting quite large, move them all to a separate
pollhelpers file.

However listAllInterfaces is returning an empty list for now, so we
disable the check: https://bugzilla.redhat.com/show_bug.cgi?id=982014
2013-07-07 15:06:09 -04:00
Cole Robinson
d427800f11 Share default_uri function 2013-07-06 20:09:18 -04:00
Cole Robinson
c406a6433c VirtualConnection: cache version lookups 2013-07-06 15:39:00 -04:00
Cole Robinson
3005382e0d Make is_blktap_capable take a connection
So we don't perform the check if we're using a remote connection
2013-07-06 12:44:53 -04:00
Cole Robinson
ba3aa9ecca Drop conn_max_vcpus validation
Let's just let libvirt throw an error in the rare occasion that we
exceed max vcpus.
2013-07-06 12:40:24 -04:00
Cole Robinson
492a039f7d VirtualConnection: proxy virtinst.support API
Simplifies the lives of callers, and will allow us to do caching later
2013-07-06 12:40:24 -04:00
Cole Robinson
ec734191fc virtinst: connection: Absorb all scattered URI helpers 2013-07-06 12:40:24 -04:00
Cole Robinson
57e86259d8 Make conn required for all virtinst objects
This was the way the API had been heading, this just formalizes it.
2013-07-05 20:28:21 -04:00
Cole Robinson
4672ed3a0a Drop most explicit SunOS support
We haven't had a patch from Sun/Oracle in over 4 years, nor a libvirt
patch in about as long. I don't think anyone cares.
2013-07-03 12:15:56 -04:00
Cole Robinson
4c967118d4 VirtualDisk: Remove vdisk provisioning
Since we haven't had any patches from Sun/Oracle for 4 years, and this
stuff should really go through libvirt storage APIs anyways.
2013-07-03 11:53:17 -04:00
Cole Robinson
e973f34c41 virtinst: Remove User module
I'm sure the solaris support is totally broken, so just drop this
overcomplicated abstraction.

Also fix a bug where we were using usermode networking in a bunch of
places where it isn't supported.
2013-07-02 21:17:07 -04:00
Martin Kletzander
74aa8c8a58 Generate valid UUIDs according to RFC4122
Similar change to that made in libvrt's upstream commit 396c4d34.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963161
2013-06-05 10:19:53 +02:00
Cole Robinson
07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -04:00
Cole Robinson
d5f466d558 virtinst: util: Move keymap stuff to its own file 2013-04-13 16:31:13 -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
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
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
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
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