Cole Robinson
4ce1774d53
VirtualDisk: Rework provisioning and validation behavior
...
We separate all the provisioning bits to diskbackend.py. VirtualDisk
users now need to explicitly opt in to storage creation by using
set_create_storage().
validation is no longer done automatically, users must call the
validation() command.
__init__ drops all extra parameters.
This will eventually get us to a point where we can unify the manual
XML building and XML parsing machinery, and get consistent validation
behavior between devices.
2013-07-13 16:37:33 -04:00
Cole Robinson
5962fde3e6
VirtualConnection: Fix uri helpers when we use the default empty URI
2013-07-13 16:32:21 -04:00
Cole Robinson
fbf2d9ee40
VirtualDisk: Convert simple props to unified parse/get/set
2013-07-12 15:26:51 -04:00
Cole Robinson
ce243314c0
tests: Verify that every new style XML prop is exercised
...
coverage isn't going to help us much here, so add some hacky infrastructure
to ensure that xmlparse.py is touching every new style xmlprop.
2013-07-12 15:19:37 -04:00
Cole Robinson
dcd632da80
XMLBuilder: Provide default fget and fset impls
...
This is the first step towards unifying the XML handling split between
parsing and creating from scratch. Demonstrate it with VirtualDisk.iotune
bits.
2013-07-12 14:41:29 -04:00
Cole Robinson
f620b317b9
tests: Make sure all XML use " for quoting
...
This is what libxml outputs with, and it's going to mess up
test output with upcoming tests.
2013-07-12 14:19:54 -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
f1b55090d2
VirtualDisk: Drop cache and io from __init__
...
They are barely used and can be specified separately.
2013-07-12 13:10:23 -04:00
Cole Robinson
57d4fcab33
VirtualDisk: Drop the volName parameter, it's not needed
2013-07-12 13:10:22 -04:00
Cole Robinson
c151b75896
XMLBuilder: Remove largely unused validation helpers
...
They aren't adding much value
2013-07-12 13:10:22 -04:00
Cole Robinson
318ba7e474
VirtualConnection: Deal with Guest objects, not raw XML
...
We already do XML parsing, no need to open code it elsewhere
2013-07-10 20:09:51 -04:00
Cole Robinson
97264a3dfe
VirtualConnection: Some reorganizing to avoid circular references
2013-07-10 20:09:51 -04:00
Cole Robinson
3d1b1735ee
XMLBuilder: Simplify XML deference
...
As long as we carry around a reference for every time we lookup
a sub node and use a wrapper class to do the free'ing, we should
be fine.
2013-07-10 20:09:51 -04:00
Martin Kletzander
f08313513b
Use proper disk targets.
...
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=968878
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-07-09 09:12:53 -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
d386ba5d62
VirtualConnection: Add option to cache fetch_* results
...
We use this in the CLI tools since there's no point in repeatedly updating
the VM list if the whole process only takes a few seconds.
2013-07-07 16:38:11 -04:00
Cole Robinson
9d560f7d9a
VirtualDisk: Always return VM names from is_conflict_disk
2013-07-07 16:34:46 -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
b7ee86541d
virtManager: connection: Switch to tick() paradigm for all objects
...
This is going to be much slower than what we currently do, but we
will be trying to fix that shortly.
2013-07-07 08:44:46 -04:00
Cole Robinson
d427800f11
Share default_uri function
2013-07-06 20:09:18 -04:00
Cole Robinson
3692e98ba0
VirtualConnection: Cache conn support checks
2013-07-06 15:53:35 -04:00
Cole Robinson
c406a6433c
VirtualConnection: cache version lookups
2013-07-06 15:39:00 -04:00
Cole Robinson
94f8d4cfa9
VirtualConnection: cache capabilities XML
...
This means we can drop passing around the pre-parsed caps info everywhere.
2013-07-06 14:12:13 -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
de51e67c74
support: Use range() enum hack
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
be2d9ddcb4
Add base conn object and bump minimum libvirt version to 0.6.0
...
This base connection object will be used to simplify the API in various
places, reduce libvirt API calls, and better share code between virtinst
and virt-manager. For now it just centralizes connection opening.
This also exposed various places where our handling for older libvirt
was busted, so raise our minimum host version to 0.6.0, the first
version that supports threaded client requests.
2013-07-05 16:42:19 -04:00
Cole Robinson
35758d0fb7
Merge virt-* logging setup
2013-07-05 16:21:33 -04:00
Cole Robinson
ea2a1331cf
virtinst: Guest: Simplify passing in a connection
2013-07-03 13:37:00 -04:00
Cole Robinson
d5c9f893be
virtinst: Drop polkit0 support
...
Requires a host much older than we will currently run on
2013-07-03 12:27:03 -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
Cole Robinson
802ed1cba6
clone: Bunch of API cleanup
...
Simplify imports, drop back compat stuff, drop needless property handling.
2013-07-02 18:54:03 -04:00
Cole Robinson
b6fa7d16e5
Add epilog and description for virt-* --help
2013-06-30 15:03:53 -04:00
Cole Robinson
80e6389b75
Fix a spelling error
2013-06-30 14:33:01 -04:00
Stefan Berger
93718868c7
Add CLI support and CLI test cases
...
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2013-06-26 19:43:58 -04:00
Stefan Berger
c829b55581
Add VirtualTPMDevice class to virtinst
...
Add VirtualTPMDevice class and TPM test cases to xmlparse.py
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2013-06-26 19:43:53 -04:00
Martin Kletzander
af9762313e
Fix VirtualDisk formatting
...
Add EOLs after iotune elements and add address generation when the
address is set.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-06-19 18:18:32 -04:00
Martin Kletzander
137134650f
Allow partial address formatting
...
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-06-19 18:18:32 -04:00
Cole Robinson
4da8c604f8
osdict: Add Fedora 19
2013-06-13 14:58:59 -04:00
Leonardo Garcia
665375db1b
Fix progres bar output bug in virt-clone.
...
The loop in StorageVolume._progress_thread that updates the cloning progress
bar has a call to sleep in the beginning of the loop which causes issues with
the progress bar. An example output (shorten to use less columns) with the
problem:
[laggarcia@fedora18 virt-manager]$ ./virt-clone --connect
qemu+ssh://root@192.168.122.1/system --original=Fedora18-test --auto-clone
root@192.168.122.1's password:
Allocating 'Fedora18-test-clone.img' | 20 GB 00:00:56
Clone 'Fedora18-test-clone' created successfully.
[laggarcia@fedora18 virt-manager]$ ' 4% [===- ] -300039887.4 B/s | 881 MB --:--:-- ETA
As the StorageVolume._progress_thread sleeps for one second when the loop
starts, it might occur that, when the cloning procedure finishes, the loop is
still awaiting to update the progress bar, which will cause a bad progress bar
update.
This simple fix solves this issue.
2013-06-10 10:20:35 -04:00
Leonardo Garcia
576721d8b2
Remove unnecessary nested try block.
...
This nested block has been added by python-virtinst's commit
4a9664634dd5ae65ed92b59b1f1543633c7d8112, aparently without need.
2013-06-10 09:55:17 -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
2274e233e0
Fix PCI commit, add CCID controller as well
2013-05-28 10:55:40 -04:00