Commit Graph

2185 Commits

Author SHA1 Message Date
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
Cole Robinson
2f09a3665c prefs: Remove distinction between local and remote sound
Remote sound works fine these days. If people want to turn the
preference off, they probably want to do it in all cases, and can
'customize before install' to alter the rest.
2013-04-23 14:21:46 -04:00
Cole Robinson
f84ccc0cf9 prefs: Remove preference for 'history length'
Also kinda pointless, and I've never heard of anyone actually
tweaking it.
2013-04-23 14:21:45 -04:00
Cole Robinson
c2aa6db6be manager: Fix weirdly changing row colors
Every launch was giving me different connection row colors, must be
some gtk/gobject bug.
2013-04-23 13:04:33 -04:00
Cole Robinson
4dbb2ee36d manager: Make creating list model more explicit 2013-04-23 12:42:41 -04:00
Cole Robinson
cd8dbad8b2 gsettings: Remove url-list-length
Kinda pointless, just default to 10
2013-04-23 12:42:22 -04:00
Cole Robinson
c6d5e5d267 config: Fix crash when launching create wizard
Caused by accessing invalid gsettings key
2013-04-23 12:28:21 -04:00
Cole Robinson
42bfb8fe19 console: s/console-vnc/console-gfx/g
Just for clarity
2013-04-21 12:10:14 -04:00
Guannan Ren
17f43e47fb add a checkbox for cpu host-model mode, remove 'copy' button
If the host-model is selected, disable the cpu model drop down
and features list. They still show what exact configuration the
host-model is using.
For the old libvirt which doesn't support <cpu mode='host-model'/>
virt-manager still copy cpu configs from caps XML to domain XML.

(crobinso: Fix some minor pylint)
2013-04-20 16:07:39 -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
3214cec085 manager: Remove duplicate function 2013-04-20 14:23:21 -04:00
Cole Robinson
76936272c7 manager: Fix connection row spacing when VMs are active
I guess the text ordering/expanding piece was causing some weirdness.
2013-04-20 14:14:15 -04:00
Cole Robinson
232c8608c2 manager: Add _build_conn_row function
More consistent with VM function names
2013-04-20 14:14:15 -04:00
Cole Robinson
f1a0b99a38 manager: Make connection rows a bit taller
Closer to what it was like with the gtk2 version
2013-04-20 14:14:15 -04:00
Cole Robinson
77441ea4d4 manager: Tweak VM row indentation 2013-04-20 14:14:15 -04:00
Cole Robinson
bd7c02ce63 manager: Remove unneeded style theming
Even fixing it doesn't really do anything useful.
2013-04-20 14:14:15 -04:00
Cole Robinson
f7d1338534 autodrawer: When first fullscreen, keep toolbar open longer
So it doesn't just disappear out of the user's site so quick that they
don't notice it. We want it to be obvious enough so they know how
to escape.
2013-04-20 11:39:52 -04:00
Cole Robinson
b23520483e autodrawer: Sync with code from vinagre
After all these changes, it fixes the invisible scrollbar issue. It
was some combination of do_style_set and something else, but I didn't
bother narrowing it down.
2013-04-20 11:35:15 -04:00
Cole Robinson
f6f55314cb Remove virt-manager-tui
Was originally added with hopes for being used in an ovirt related
product, but was more or less a code dump, and the author has been
allocated to other things. He confirmed it's okay to remove.

That, and it's currently broken, and we've had approximately 0 user
feedback since it was committed.
2013-04-18 16:12:03 -04:00
Cole Robinson
21768e7804 prefs: Fix launching grab-keys dialog 2013-04-18 12:45:00 -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
61369d252c details: Fixing viewing disk details in 'customize' page 2013-04-17 13:23:27 -04:00
Cole Robinson
7bb98c3be2 details: Fix listing static HW pages 2013-04-17 13:01:30 -04:00
Cole Robinson
8ce479f7f8 console: Re-enable accelerator handling
Seems to work fine with F18 gtk versions
2013-04-17 09:32:00 -04:00
Cole Robinson
07e0c92b4b Remove a bunch of outdates FIXME/XXX comments 2013-04-17 09:32:00 -04:00
Cole Robinson
2e4b5a21d4 Remove some pylint 2013-04-16 19:22:59 -04:00
Cole Robinson
2e66114cdf details: Fix crash when deleting a device 2013-04-16 19:22:31 -04:00
Cole Robinson
84f8131d97 details: Fix addhw popup menu mnemonics 2013-04-16 19:22:31 -04:00
Cole Robinson
006b129925 details: Fix weirdness with spinbuttons
Tweaking the adjustment directly doesn't work like it used to, but
thankfully the situation seems much simpler than it was with gtk2.
2013-04-16 18:38:08 -04:00
Cole Robinson
9f3b21c9a1 Shorten iotune names for simplicity
And refactor some of the virt-manager code for the same goal.
2013-04-16 18:37:42 -04:00
Cole Robinson
22c3bd62b3 keyring: Convert to Secrets DBUS API
This fixes keyring support since the gnome bindings are busted, while
also giving us a chance of working natively on KDE.

I haven't added an explicit dep on libsecret in the spec, since this is
such minor functionality it's not worth pulling the dep, which should
be there on all modern desktops anyways.
2013-04-16 16:20:58 -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
1078facce2 console: Fix keycombo menu location in fullscreen mode 2013-04-15 12:38:53 -04:00
Cole Robinson
2d110816d6 autodrawer: Fix centering
child_get_property bindings need a wrapper to make them useful
2013-04-15 12:38:53 -04:00
Cole Robinson
e7fb33e32d autodrawer: Enable a bit that pygtk didn't support 2013-04-15 12:38:21 -04:00
Cole Robinson
fce6d4a6ea autodrawer: Fix drawer from being stuck open on initial fullscreen 2013-04-15 12:38:20 -04:00
Cole Robinson
a102edaa89 console: Fix broken size-allocate signal 2013-04-15 12:37:37 -04:00
Cole Robinson
dd45270ba1 autodrawer: Drop use of cairo bindings
We can use Gdk instead
2013-04-15 12:37:37 -04:00
Cole Robinson
d440ec4d0d console: Fix size_allocate arguments 2013-04-15 12:37:37 -04:00
Cole Robinson
079835bfaf Fix other popup menus after gtk3 conversion 2013-04-14 13:16:02 -04:00
Guannan Ren
0a9f58a064 fix argument error when right-clicking hw list to popup menu
Traceback (most recent call last):
  File "../virt-manager/virtManager/details.py", line 1072, in popup_addhw_menu
    self.addhwmenu.popup(None, None, None, 0, event.time)
TypeError: popup() takes exactly 7 arguments (6 given)
2013-04-14 13:10:19 -04:00
Cole Robinson
02733ecff4 virtinst: util: Simplify randomUUID 2013-04-13 15:48:06 -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
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
b8f1bbd3de asyncjob: Rename function that collides with gtk method 2013-04-13 13:42:39 -04:00
Cole Robinson
baf531f710 virtinst: Guest: Remove back compat static device lists 2013-04-13 13:40:45 -04:00
Cole Robinson
9359ad2bb6 virtinst: Remove ParaVirt and FullVirtGuest
They were just around for back compat at this point, the tools
have moved on.
2013-04-13 13:40:45 -04:00
Cole Robinson
ae471007fc Tons of misc pylint fixes 2013-04-13 13:40:29 -04:00
Cole Robinson
e03f84ac7f autodrawer: Disable pylint warnings caused by gobject introspection 2013-04-12 08:27:45 -04:00
Cole Robinson
c1e0bec220 graphwidgets: Drop cairo import
We only use it for one constant, so just hardcode it.
2013-04-12 08:27:45 -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
a386186c74 Remove most map() and filter() usage
They aren't available on python3 so pylint complains, and list
comprehensions are usually better.
2013-04-12 08:27:44 -04:00
Cole Robinson
c5e45ae448 Remove all relative imports
We also drop VirtualDevice from the 'public' virtinst API, since there
are better ways to get its info.
2013-04-12 08:27:44 -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
Gene Czarcinski
61f8e39700 IPv6 support v2: update the create network wizard
With this patch, basic IPv6 support has been added to
the network creation wizard.  It includes changes to
both the glade-3 ui and the related python code.  There
have been some significant changes made to both files for
IPv6 support and some additional capabilities.

This update includes the fix so color will work in the
network creation wizard.

Besides basic IPv6 support, this includes optionally
specifying a DNS domain name and enabling IPv6 internal
routing if no IPv6 address is specified.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-03 21:32:57 -04:00
Gene Czarcinski
73629b76b2 IPv6 support v2: update gui python and ui
The purpose of this update is:

1. replace use of IPy with ipaddr since ipaddr has needed
functionality and IPy does not.
2. Update the glade-3 ui (vmm-host.ui) to provide
for IPv6 as well as IPv4.  If either IPv4 or IPv6
is not defined, its respective frame is hidden.
3. The DNS Domain Name is added to the basic frame.
4. IPv4 forwarding is moved to the basic frame and ipv6
forwarding is added.
5. If an IPv4 address is not defined then the IPv4
is set to Isolated network, internal rout only.
6. IPv6 network has three values for Forwarding:
Isolated network, Isolated network with internal forwarding,
and Routed network.
7. Add network definitions to tests/testdriver.xml which
include IPv6 and other new parameters now being handled.

This patch includes the fix for getting a KeyError exception
when deleting a network definition.

In this update, createnet.py has been changed to use
ipaddr but it still only handles IPv4 network creation.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>

(crobinso: Add Gene to AUTHORS)
2013-04-03 21:32:42 -04:00
Eric Blake
4c10a627ab migrate: use correct grammar
According to http://grammar.quickanddirtytips.com/a-while-awhile.aspx,
you can tell whether to use 'awhile' or 'a while' by substituting
'quietly' or 'a year' and seeing if the resulting sentence still makes
sense.  During migration, we used an adverb, but want the noun form.

* src/virtManager/migrate.py (vmmMigrateDialog.finish): Use
correct grammar.

(crobinso: Add Eric to AUTHORS)
2013-04-03 20:44:04 -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