Commit Graph

71 Commits

Author SHA1 Message Date
Cole Robinson
d66b691035 virt-manager: Allow mixing --connect and --test-first-run
To run with just the passed connection, but skip the first run logic.
Useful for UI testing
2015-09-06 18:15:16 -04:00
Pavel Hrdina
0fbe8e7a1f translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the
formated and translated string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-05 16:33:51 -04:00
Cole Robinson
62ad0e91ee migrate: Big reworking of the dialog
It's largely the same, but now

- The code is better organized
- The UI is much more streamlined, only showing relevant fields when
  required.
- We warn about the hostname/URI cases that we know libvirt will error on
- Drop some of the attempts at being smart, and just mimic what libvirt
  will do.
2015-04-21 17:15:58 -04:00
Cole Robinson
10ad151d4b connection: Clarify tick functions and who should use them 2015-04-13 16:56:46 -04:00
Cole Robinson
80c2dde350 virt-manager: Fix connection to domain from cli
Need to tweak our signal handling here with the recent connection changes.
2015-04-12 09:34:55 -04:00
Cole Robinson
d7a7d00e9e engine: Don't raise conn poll errors if only systray visible (bz 1082685) 2015-04-11 14:41:02 -04:00
Cole Robinson
f7b05912f0 engine: Before launching any error, try to find a parent dialog 2015-04-11 14:39:52 -04:00
Cole Robinson
839ce682b1 Drop support for non-managed save/restore
All major drivers either support it, or don't support save at all,
so I think we can safely drop it. If people still need it they can
get by with virsh.
2015-04-11 13:52:48 -04:00
Cole Robinson
fc171fc31d connection: Bunch of minor tweaks handling TCP URIs 2015-04-11 12:08:57 -04:00
Cole Robinson
20cd7f86ca domain: Remove manual_reboot
qemu has provided this feature for a long time, and every other driver
we care about provides a reboot implementation as well, so drop our
handling of it.
2015-04-11 11:13:05 -04:00
Cole Robinson
abbc781cab connect: Expand check for qemu binaries
And drop dead handling of qemu:///session
2015-04-06 16:43:44 -04:00
Cole Robinson
c25bb28db8 engine: On connection error, try and set dialog parent
Avoids a GTK stderr warning
2015-04-04 19:40:22 -04:00
Giuseppe Scrivano
1cdd10ce34 virt-manager: show the manager when using a wrong domain id
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1164691

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-17 16:50:04 +01:00
Guido Günther
1726505fd6 s/gconf/gsettings/
GConf got replaced by GSettings but some methods kept the old name
2014-09-29 08:56:37 -04:00
Cole Robinson
69b131f81f engine: Clarify a debug message 2014-09-25 10:13:20 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
df32f9331d baseclass: Add helper for launching daemon thread
And use it in a few spots
2014-09-12 16:28:37 -04:00
Cole Robinson
bd5e57dbdc connection: Simplify state management 2014-09-12 16:28:37 -04:00
Cole Robinson
b398a46e9b domain: Cache has_managed_save value
Otherwise we call it every time a domain row is selected, which makes
things choppy on remote connections.
2014-09-12 16:28:37 -04:00
Giuseppe Scrivano
32b9653f5b virt-manager: select the initial connection
Automatically select the connection in this order:

- URI specified via command line --connect
- First active connection
- First connection

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-02 15:31:41 +02:00
Cole Robinson
aefd4c4824 connection: Use name instead of uuid for object keys
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.

Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.
2014-06-02 17:48:32 -04:00
Cole Robinson
f35438a01b engine: Show error if launching delete dialog fails 2014-04-30 15:54:00 -04:00
Cole Robinson
1f7604b241 engine: More work to fix cascading error dialogs
If a remote network connection stalls, the tick queue becomes backed
up while we wait for the hung connection to continue. While this
happens, the queue is filled up with other requests to poll the hung
connection.

When the connection finally times out, the tick thread closes the
connection via an idle callback. However before that callback gets
a chance to run, all the other poll requests for the dead connection
are processed, all launching their own error dialog.

Mark the connection as 'closing' before conn.close is scheduled, and
use it to short circuit the tick() routine.
2014-04-16 12:29:24 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Cole Robinson
ce64d037bf engine: Fix closing connection when tick() fails (bz 1069351) 2014-02-25 15:17:34 -05:00
Cole Robinson
fa6fedd959 engine: Serialize connection autostart (bz 749750)
So polkit/openssh-askpass doesn't spam us
2014-02-01 10:44:45 -05:00
Cole Robinson
ea1b6ae819 virt-manager: Allow domain name or ID for cli options 2014-01-30 11:37:01 -05:00
Cole Robinson
2a34b353da uihelpers: Move browse_local to error.py
It doesn't fit any better, but now it's accessible to all UI classes
more easily.
2014-01-26 18:01:10 -05:00
Cole Robinson
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
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