Commit Graph

137 Commits

Author SHA1 Message Date
Cole Robinson
cd7837bc4b domain: Clean up some support checks
We don't need to cache things since virtinst/connection does it for
us.
2013-09-29 09:58:31 -04:00
Cole Robinson
72058f2bbf support: Remove unused nodedev support checks 2013-09-29 09:19:56 -04:00
Cole Robinson
7a5dc7c544 devicedisk: path_in_use_by: Check backing stores as well
Plumb through a fetch_all_vols helper for this, and do all the
caching bits.
2013-09-28 21:07:18 -04:00
Cole Robinson
a7b1414dc5 libvirtobject: Make parseclass non-optional
All libvirtobject child classes have an associated XMLBuilder now, so
make it mandatory.
2013-09-23 08:34:50 -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
7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Cole Robinson
14103f175d VirtualConnection: Allow setting a display name for fake URIs 2013-07-23 17:34:32 -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
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
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
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
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
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
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
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
255ba11079 virt-manager: Drop remnants of read-only connection support
Haven't supported it for a while
2013-07-05 09:00:31 -04:00
Guannan Ren
32f0781531 addhardware: differentiate duplicate usb devices by bus/addr
When there are multiple usb devices with same vendor/product
in the host device list, the bus/addr is going to be used when
attaching one of usb devices.

Currently is_dup flag is only useful to VirtualHostDeviceUSB.

I put get_nodedevs_number() in connection.py, so the startup
hooks can use it.
2013-05-09 13:48:18 -04:00
Guannan Ren
15f72a84ab check cpu host-model mode support
UPDATE_CPU flag exists after v0.8.0, so libvirt that
supports HOST_MODEL should support UPDATE_CPU,
the earliest version we are going to check is v0.9.10.
2013-04-20 16:04:43 -04:00
Cole Robinson
7e23244096 Port from gconf to gsettings
This unfortunately has a decent amount of fallout: add a wrapper class
in config.py that reduces much of the churn.

Another big piece is that gsettings can't accept arbitrary paths like
gconf would, everything needs to be described in the schema.

Also do a bunch more RPM spec modernizing
2013-04-18 12:43:16 -04:00
Cole Robinson
c60ad16b3b Convert all DBus usage to Gio GDBUS
And drop a whole bunch of legacy dbus fallback stuff. Now that we
are bumping the host dependencies to very recent gtk, none of the
back compat should matter.
2013-04-16 15:22:09 -04:00
Cole Robinson
812899daf8 Remove HAL support
It is long since deprecated, and the UI has been able to accomodate
lack of interface API support for a while.
2013-04-15 19:51:46 -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
ae471007fc Tons of misc pylint fixes 2013-04-13 13:40:29 -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
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
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