Commit Graph

110 Commits

Author SHA1 Message Date
Cole Robinson
1c8bf88db7 baseclass: Add unregister wrappers for idle and timeout
If an idle handler raises an exception, it isn't unregistered and loops
forever. This is a regression from previous pygobject and pygtk:

https://bugzilla.gnome.org/show_bug.cgi?id=702552

Work around this for now with our own wrappers.
2013-06-18 08:49:34 -04:00
Leonardo Garcia
660178abe1 Permit to delete a running VM.
The VM will be forced off before being deleted.

(crobinso: fix a minor pylint violation)
2013-06-18 08:49:18 -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
30d509feec delete: Tweak 'are you sure' message for storage deletion 2013-06-17 13:41:32 -04:00
Cole Robinson
b339295fb5 Sigh, fix previous commit. 2013-06-14 16:32:48 -04:00
Cole Robinson
ea9fadac78 config: Fix changing tick timeout on the fly 2013-06-14 16:22:33 -04:00
Cole Robinson
3889bc480b asyncjob: Fix dialog closing and progress bar pulsing
After the recent cleanups
2013-06-14 14:28:04 -04:00
Cole Robinson
8914a61689 Fix exiting app if asyncjobs are running 2013-06-14 11:24:52 -04:00
Cole Robinson
b5baebf24c asyncjob: Only close window if operation completes. 2013-06-14 11:19:22 -04:00
Cole Robinson
cdde7e1d9f asyncjob: Some code reorg
Privatize a bunch of things, move code around to be grouped consistently.
2013-06-14 11:18:12 -04:00
Cole Robinson
2b3604ceeb systray: Fix pylint from appindicators 2013-06-14 11:03:48 -04:00
Cole Robinson
8e0a181cc6 asyncjob: Explicitly pass callbacks to vmmCreateMeter 2013-06-14 10:45:20 -04:00
Eric Shattow
f2c0a77e3e AppIndicator3 required with Gtk3 usage
$ ./virt-manager --debug
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:53:
PyGIDeprecationWarning: threads_init longer needs to be called. See:
https://bugzilla.gnome.org/show_bug.cgi?id=686914
  PyGIDeprecationWarning)
2013-06-12 13:10:56,977 (cliutils:75): virt-manager startup
2013-06-12 13:10:56,978 (virt-manager:199): Launched as:
['./virt-manager', '--debug']
2013-06-12 13:10:56,978 (virt-manager:200): virt-manager version: 0.9.100
2013-06-12 13:10:56,978 (virt-manager:201): virtManager import:
<module 'virtManager' from
'/home/es/software/pubscm/virt-manager/virtManager/__init__.pyc'>
2013-06-12 13:10:57,167 (virt-manager:247): GTK version: 3.8.2
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning:
g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0'
failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning:
specified class size for type 'PyGtkGenericCellRenderer' is smaller
than the parent type's 'GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_type_get_qdata: assertion 'node != NULL' failed
  from gtk import _gtk
Segmentation fault (core dumped)
2013-06-14 09:09:08 -04:00
Cole Robinson
8a0bee44dc packagekit: Allow cancelling package search 2013-06-13 17:37:12 -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
04f0113c2d libguestfs: Work around a pylint error
Not sure why it's triggering a warning here, thinks the return result
is a dict()
2013-06-13 16:12:55 -04:00
Cole Robinson
cbe8665948 libguestfs: Don't try to create icon if none found 2013-06-13 16:10:44 -04:00
Cole Robinson
f3751e6fe9 libguestfs: Start the inspection thread earlier 2013-06-13 16:04:16 -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
91a97d439c manager: Fix loading libguestfs OS icons (bz 905238) 2013-06-13 15:54:12 -04:00
Cole Robinson
8804e59518 error: Minor improvement to error dialog logging 2013-06-13 14:12:19 -04:00
Cole Robinson
c3d54cbd20 manager: Only log 'Closing manager' if it's not already closed
Same with 'Showing manager'
2013-06-13 14:12:19 -04:00
Cole Robinson
b8d3bde4a2 autodrawer: Fix a gtk assertion at app shutdown 2013-06-13 14:10:59 -04:00
Cole Robinson
eeba8b6d0b autodrawer: Fix fullscreen toolbar centering on F19
child_get_property appears to be busted.
2013-06-13 13:55:43 -04:00
Cole Robinson
436a5bfc8b serialcon: Fix tracebacks when we get EOF on stream 2013-06-12 21:10:52 -04:00
Cole Robinson
4201ef9e68 details: Multiple screenshot improvements and fixes
- Fix screenshot after gtk3 conversion
- Report errors to the user if something goes wrong
- Drop the 'screenshot saved' success dialog
- Capture the screenshot data before asking for the file path, so things
  aren't out of date.
- Give a default recommended screenshot path to save.

First bit fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=969410
2013-06-12 21:00:11 -04:00
Martin Kletzander
77fb38e602 serialcon: Close the console at the end of the stream
When LXC guest was shut down while its console was open, virt-manager
got stuck in a loop due to the fact that the readable event was not
properly removed from the callback.  Mimicking the behavior from
libvirt's tolls/console.c file, this patch properly closes the console
in case stream.recv() returns empty string.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=968896

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-06-12 11:10:30 +02:00
Martin Kletzander
1ca9d6ebd2 Update supported models (bz 959888) 2013-06-12 10:49:30 +02: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
Cole Robinson
0f8ea6eaa6 baseclass: Clean up non-standard __init__
Only used by console.py, make it more explicit.
2013-06-08 19:25:36 -04:00
Martin Kletzander
e407c2eac9 Make pylint a bit happier
Various fixes for some pylint and pep8 warnings/errors which are
fixable and cleanup few lines with that.
2013-06-05 10:19:54 +02: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
a5a9f8e3bd Fix a couple more typos pointed out by translator 2013-05-27 20:04:55 -04:00
Cole Robinson
14578fc2c3 details: Fix changing cirrus->QXL for active VM (bz 928882) 2013-05-27 18:50:25 -04:00
Cole Robinson
7f621db08f Fix a few wordings recommended by a translator 2013-05-27 13:41:45 -04:00
Gene Czarcinski
41c782a37e static route support
The syntax for static route support is defined by the
new <route> subelement which has the form:
  <route family='xx' address='xx' prefix='n' gateway='gg' metric='m'/>
This patch builds on the previous patches for adding IPv6 support and
extending the virtual network support.

The static route support code has been recently added to libvirt and will
be included in libvirt 1.0.6.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-05-21 15:45:34 -04:00
Cole Robinson
070e19eab9 Drop 'avahi-tools' package list used during dev (bz 963472) 2013-05-15 17:35:14 -04:00
Guannan Ren
a4e736a7cb domain: add 'pre-startup' signal and do nodedevs checking
This patch introduces 'pre-start' signal and registers
nodedev checking handler to check duplicate USB devices.
If virt-manager can not identify unique usb device any more
before domain startup, it will throw a tip error to tell it
is time to reattach host USB devices to get updated bus/addr info.
2013-05-13 16:43:33 -04:00
Cole Robinson
b68faac8e8 Fix crash when creating guest from ISO media (bz 958641)
Accessing another unknown gsettings key. Should be the last one
though...
2013-05-09 20:07:29 -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
Tadej Janež
e8e6278c65 manager: show guest machine stats under Details -> Performance.
This fixes rhbz #878425.
2013-04-29 12:20:44 -04:00
Cole Robinson
40cbc39a98 Revert "add a checkbox for cpu host-model mode, remove 'copy' button"
host-model is a bit more scary then previous behavior, since the
model of an existing VM can transparently change across libvirt
upgrade or HW upgrade. This will probably be improved at the libvirt
level, but for now revert.

This reverts commit 17f43e47fb.
2013-04-27 09:28:15 -04:00
Guannan Ren
5a316b9a51 details: the bus, device values of USB device is decimal rather than hex
Although the code in lookup_nodedev() is general to deal with
hostdev, it has to seperate USB device from PCI device there.
For PCI device, the domain/bus/slot/function is hex.
For USB device, the bus/device is decimal.

This fix makes the label use hostdev pretty_name:

 +------------------------------------------------------+
 | Physical USB Device                                  |
 |   Device: 006:032 RSA RSA SecureID (R) Authenticator |

(crobinso: fix some pylint)
2013-04-27 09:28:15 -04:00
Cole Robinson
b15e51e73b baseclass: Privatize refcount debug helper 2013-04-25 12:07:57 -04:00
Cole Robinson
978140b065 engine: Remove unneeded helper function 2013-04-23 20:00:12 -04:00
Cole Robinson
a63a83684b manager: Fix a pep8 warning 2013-04-23 14:24:52 -04:00
Cole Robinson
1b18ddea3a gsettings: Simplify remembering last used paths 2013-04-23 14:21:46 -04:00