Commit Graph

42 Commits

Author SHA1 Message Date
Cole Robinson a0c2fdf429 virt-manager: Make --show-domain-creator show the manager as well
Otherwise we don't have any way to close the app.
2014-01-19 12:03:17 -05:00
Martin Kletzander 2b7aa33887 engine: Fix started libvirt daemon requirement
This patch makes virt-manager usable again without systemd (or dbus).
When started without systemd, but with libvirtd properly working,
there was error reported, and virt-manager didn't even try to connect
to the destination.

This patch modifies the behavior in two ways.  When connection is
added with "do_start=False" it will still try to connect, but won't
error out when unsuccessful.  The second modification is that upon
startup, the idle_connect() function will error out only if we failed
starting libvirtd _and_ we couldn't connect to the uri.  So if we
failed starting libvirtd, but could connect, there is no disruption
for the user.
2013-10-29 11:24:52 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson 97f5717ef7 snapshots: Fix showing async dialogs for revert/delete 2013-10-05 10:03:56 -04:00
Cole Robinson e91cc84770 uihelpers: Add VMActionMenu, share between manager and systray 2013-09-22 15:45:53 -04:00
Cole Robinson 268b462126 uihelpers: Add VMShutdownMenu class
And use it in all the places where we are duplicating a similar menu
2013-09-22 15:45:49 -04:00
Cole Robinson 6869760732 asyncjob: Fix issues with multiple dialogs (bz 1003101)
Basically, drop usage of nested main loops. As has been documented in
other commit messages, we use nested main loops in ways they aren't
supposed to be used. They gave us async behavior that would block
callers, but had weird behavior in some edge cases.

Switch to having async dialogs be 100% async, requiring the user to
pass in a completion callback which is triggered after the async
action is complete.
2013-09-06 21:30:19 -04:00
Cole Robinson 0551d8956b error: Rename confusing sync/async param to modal 2013-09-06 20:16:37 -04:00
Cole Robinson 280663c685 packageutils: Don't implement our own search dialog (bz #746011)
Our search dialog isn't as full featured as packagekits, so just call
out to that. This was originally avoided because it doesn't full
provide the semantics we want, but it's close enough and saves us
from duplicating all their work.
2013-09-01 14:19:23 -04:00
Cole Robinson 7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Giuseppe Scrivano ff57d636d7 Drop user back to 'open conn' dialog if connecting fails
In case of connection failure, the user can either maintain the connection
or modify it.

Split up `add_connection_to_ui' into `make_conn' and `register_conn'
to handle separately the object creation and its registration in the
list of connections (ui and conf).

Solves: https://bugzilla.redhat.com/show_bug.cgi?id=617386
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-08 14:38:31 -04:00
Leonardo Garcia 40cff67836 virt-manager: Properly handle errors when --show-* options are used.
crobinso: Fix some pylint
2013-07-15 16:03:15 -04:00
Leonardo Garcia e1be39d986 virt-manager: Code cleanup
Remove functions not necessary or not being used anywhere.
2013-07-15 16:00:37 -04:00
Cole Robinson fcc82e8f9d virt-manager: Fix --show-* options 2013-07-12 13:10: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
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 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 c406a6433c VirtualConnection: cache version lookups 2013-07-06 15:39:00 -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 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 57345cd61a Tweak 'libvirt needs to be started' first run message 2013-06-24 12:15:28 -04:00
Cole Robinson 44328b1507 Fix some pylint 2013-06-17 20:17:20 -04:00
Leonardo Garcia 18bf5f508d Add delete VM option in console viewer.
(crobinso: Fix a minor pep8 warning)
2013-06-17 20:07:37 -04:00
Cole Robinson ea9fadac78 config: Fix changing tick timeout on the fly 2013-06-14 16:22:33 -04:00
Cole Robinson 8914a61689 Fix exiting app if asyncjobs are running 2013-06-14 11:24:52 -04:00
Cole Robinson 1c22ea92df engine: Close packagekit dialog before connecting to libvirt
We are bunching up a slew of hefty operations, split things up a bit
so the UI has a change to catchup.
2013-06-13 17:35:48 -04:00
Cole Robinson e2435b6d02 asyncjob: Simplify registering a cancel callback 2013-06-13 17:05:33 -04:00
Cole Robinson 5a46e7420a libguestfs: Drop all version checks
Now that virt-manager requires very modern versions of gtk, it's
quite unlikely that we will even run on a system with an old
libguestfs version, so don't bother checking versions.
2013-06-13 16:04:16 -04:00
Cole Robinson ff297777cc details: Don't traceback if VM deleted with open details window
When a VM is undefined, whether explicitly through virt-manager or behind
our back, we close and cleanup any associated vmmDetails windows. However
there's a race here: if the details window is the last remaining top
level window, cleanup() is called twice which tracebacks.

Fix this by dispatching the exit_app routine in an idle callback, to
avoid racing with any window delete routines.

Reported-by: Leonardo Garcia <lagarcia@br.ibm.com>
2013-06-11 11:02:56 -04:00
Leonardo Garcia 6a1ad46978 Do not show manager window at startup if user requested to show any other window from command line. 2013-05-30 11:25:44 -04:00
Leonardo Garcia efd5401378 connect_to_uri is not a public method.
connect_to_uri is only called from engine.py.
2013-05-30 11:25:44 -04:00
Cole Robinson 978140b065 engine: Remove unneeded helper function 2013-04-23 20:00:12 -04:00
Cole Robinson 07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -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 8b31a10117 On first run, always make sure libvirtd is running
Even if it was already installed.
2013-04-16 15:21:18 -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 ff6fefeecc Use Gtk.Application for uniqueness
And drop all the legacy dbus stuff which isn't really interesting.

We could use gtk.application for more stuff, but for now it's not
too compelling.
2013-04-15 19:27:46 -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 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 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