Commit Graph

2915 Commits

Author SHA1 Message Date
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
b26fd8fa3e tests: Minor cleanup in xmlparse 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
fcc82e8f9d virt-manager: Fix --show-* options 2013-07-12 13:10:05 -04:00
Cole Robinson
d09bc39a2b serialcon: Fix copy+paste 2013-07-11 13:32:41 -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
Cole Robinson
2f43fb68d9 man: Drop all AUTHORS section
They aren't really maintainable.
2013-07-10 17:49:45 -04:00
Leonardo Garcia
ddcd29bfeb Improve virt-manager man page.
Clarify the usage of --show-* options.
2013-07-10 12:55:36 -04:00
Leonardo Garcia
297fd32046 Make virt-manager man page consistent. 2013-07-10 12:55:36 -04:00
Cole Robinson
5f497cba41 console: Don't double create spice display
I can't reproduce, but a couple gentoo users have issues that this
fixes:

https://bugzilla.redhat.com/show_bug.cgi?id=981975
2013-07-09 17:50:05 -04:00
Cole Robinson
2ca9e364a5 uihelpers: Drop global error dialog
Just have callers pass one in.
2013-07-09 09:20:43 -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
bbf54d7a08 uihelpers: Fix error showing dialog if default pool isn't started 2013-07-09 09:12:26 -04:00
Cole Robinson
194cb715a3 console: A few tweaks to usbredir code
- Make sure to set menu item to unsensitive when console closes
- Avoid dep on latest spice-gtk git for channel_type_from_string
- Create usbwidget every time it's requested, like virt-viewer does
- Minor style fixes
2013-07-08 19:13:52 -04:00
Cole Robinson
e826de7c73 storagebrowse: Only tick if we actually have a pool 2013-07-08 14:20:15 -04:00
Cole Robinson
0ee5ddbf54 create: Drop host storage timer
It's kind of needy to be doing a pool.refresh every 3 seconds, and really
I'm fine with telling people they have to close and reopen the wizard to
get up2date host size reporting.
2013-07-07 19:00:57 -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
9f3e17d270 uihelpers: Don't do raw libvirt calls when checking if net is active 2013-07-07 16:57:00 -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
5e9e444dec connection: Do non-VM polling on demand
The goal here is to reduce the amount of tick() polling that we do by default.
For things like pools, networks, and interfaces, the constant polling is
not very helpful and causes CPU churn and slowness for remote connections.

Switch to a more on demand style. Pages that want new information for
these objects now request a priority tick that only refreshes the info
we want.

This isn't perfect, but neither was the previous solution in the face of
things like XML updates behind our back. The real solution here is libvirt
event support across the board.
2013-07-07 12:17:54 -04:00
Cole Robinson
39a819c34b details: Fix error with usbredir if no viewer was created 2013-07-07 12:17:54 -04:00
Cole Robinson
149e19da64 connection: Pass nostatsupdate through to VM tick
When kicking off a priority tick, we want to update domain status but not
update stats listing.
2013-07-07 09:42:21 -04:00
Cole Robinson
b044dd94c7 Various cleanup and sync between libvirtobject classes 2013-07-07 09:05:01 -04:00
Cole Robinson
ed5e67485c domain: Don't pass timestamp to domain tick()
Since we might not poll stats info until a decent amount of time after
this timestamp, it messes up VM stats reporting.

Our usage still isn't correct because we use a later timestamp for
calculating total host usage. We could fix it by averaging out the
timestamp of each VM but I don't care that much at the moment.
2013-07-07 08:44:46 -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
2e47d2e5fa connection: Only overwrite master lists in main thread 2013-07-07 08:44:46 -04:00
Cole Robinson
141ad96298 connection: Remove some dead code 2013-07-06 21:41:27 -04:00
Cole Robinson
76887c9a32 engine: Switch tick threading model to use queues
And allow other parts of the API to request a priority tick that is
dispatched from the main tick thread.
2013-07-06 21:24:38 -04:00
Cole Robinson
d427800f11 Share default_uri function 2013-07-06 20:09:18 -04:00
Cole Robinson
ead31139b0 virtManager: Emit state change signals from objects
This is a step towards supporting listAll*() API and domain events.

We still proxy these signals through vmmConnection so that we don't
need to rework the dependent code yet.
2013-07-06 20:09:18 -04:00
Cole Robinson
eb53a6770b vmmConnection: Minor cleanups to libvirt polling 2013-07-06 17:49:42 -04:00
Cole Robinson
125cbc4541 virtManager: connection: Clean up some inconsistent API 2013-07-06 17:24:51 -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
c0deb97dba Fix --trace-libvirt option 2013-07-06 14:33:02 -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
f5ef1edeea Drop a duplicated function 2013-07-06 12:48:20 -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