Commit Graph

1929 Commits

Author SHA1 Message Date
Cole Robinson
c12327cbd1 Guest: Switch memory units to KB to match default XML 2013-07-13 23:07:01 -04:00
Cole Robinson
4ce1774d53 VirtualDisk: Rework provisioning and validation behavior
We separate all the provisioning bits to diskbackend.py. VirtualDisk
users now need to explicitly opt in to storage creation by using
set_create_storage().

validation is no longer done automatically, users must call the
validation() command.

__init__ drops all extra parameters.

This will eventually get us to a point where we can unify the manual
XML building and XML parsing machinery, and get consistent validation
behavior between devices.
2013-07-13 16:37:33 -04:00
Cole Robinson
38fa89fe9f uihelpers: Don't error checking host space if default pool is busy 2013-07-13 16:32:21 -04:00
Cole Robinson
0d5fe93048 Centralize XML helpers in virtinst/util.py 2013-07-12 13:10:23 -04:00
Cole Robinson
534e613d40 VirtualNetworkInterface: Absord MAC generating routines 2013-07-12 13:10:23 -04:00
Cole Robinson
f1b55090d2 VirtualDisk: Drop cache and io from __init__
They are barely used and can be specified separately.
2013-07-12 13:10:23 -04:00
Cole Robinson
fcc82e8f9d virt-manager: Fix --show-* options 2013-07-12 13:10:05 -04:00
Cole Robinson
d09bc39a2b serialcon: Fix copy+paste 2013-07-11 13:32:41 -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
5f497cba41 console: Don't double create spice display
I can't reproduce, but a couple gentoo users have issues that this
fixes:

https://bugzilla.redhat.com/show_bug.cgi?id=981975
2013-07-09 17:50: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
Martin Kletzander
f08313513b Use proper disk targets.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=968878

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-07-09 09:12:53 -04:00
Cole Robinson
bbf54d7a08 uihelpers: Fix error showing dialog if default pool isn't started 2013-07-09 09:12:26 -04:00
Cole Robinson
194cb715a3 console: A few tweaks to usbredir code
- Make sure to set menu item to unsensitive when console closes
- Avoid dep on latest spice-gtk git for channel_type_from_string
- Create usbwidget every time it's requested, like virt-viewer does
- Minor style fixes
2013-07-08 19:13:52 -04:00
Cole Robinson
e826de7c73 storagebrowse: Only tick if we actually have a pool 2013-07-08 14:20:15 -04:00
Cole Robinson
0ee5ddbf54 create: Drop host storage timer
It's kind of needy to be doing a pool.refresh every 3 seconds, and really
I'm fine with telling people they have to close and reopen the wizard to
get up2date host size reporting.
2013-07-07 19:00:57 -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
9f3e17d270 uihelpers: Don't do raw libvirt calls when checking if net is active 2013-07-07 16:57:00 -04:00
Cole Robinson
9d560f7d9a VirtualDisk: Always return VM names from is_conflict_disk 2013-07-07 16:34:46 -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
39a819c34b details: Fix error with usbredir if no viewer was created 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
d427800f11 Share default_uri function 2013-07-06 20:09:18 -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
c406a6433c VirtualConnection: cache version lookups 2013-07-06 15:39:00 -04:00
Cole Robinson
c0deb97dba Fix --trace-libvirt option 2013-07-06 14:33:02 -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
f5ef1edeea Drop a duplicated function 2013-07-06 12:48:20 -04:00
Cole Robinson
3005382e0d Make is_blktap_capable take a connection
So we don't perform the check if we're using a remote connection
2013-07-06 12:44:53 -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
57e86259d8 Make conn required for all virtinst objects
This was the way the API had been heading, this just formalizes it.
2013-07-05 20:28:21 -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
Cole Robinson
ea2a1331cf virtinst: Guest: Simplify passing in a connection 2013-07-03 13:37:00 -04:00
Cole Robinson
802ed1cba6 clone: Bunch of API cleanup
Simplify imports, drop back compat stuff, drop needless property handling.
2013-07-02 18:54:03 -04:00
Guannan Ren
88f2d1abe0 details: Add auto USB redirection support in console viewer
Add "Redirect USB device" option in console viewer. Initialize and
embed UsbDeviceWidget object from SpiceClientGtk into a dialog to
let user choose available USB devices for redirection.
Throw an error message if USB connection failed.
Auto-redirection is enable by default.

There is race between creating usbredir channel and calling
has_usb_redirection() when initializing spice session like
happening on virt-viwer. So adding a new signal handler
on_details_menu_virtual_manager_activate() to recheck the
status of usbredir channel, set "Redirect USB device" option
sensitive if it is availiable.
2013-07-01 14:33:59 -04:00
Guannan Ren
d6fc079ae8 error: use helper function to embed customized widget into dialog 2013-07-01 14:33:32 -04:00
Guannan Ren
dbdf6c0f43 add new "spice-disable-usbredir" option to disable autoredir feature
The value is stored in gsettings. By default, we use spice autoredir
feature for usb redirection.
2013-07-01 14:32:21 -04:00
Cole Robinson
22f9928a54 Fix some pylint 2013-06-30 14:33:33 -04:00
Cole Robinson
80e6389b75 Fix a spelling error 2013-06-30 14:33:01 -04:00
Cole Robinson
eec74f1346 Don't show libvirt created nics/taps in net device list 2013-06-30 14:29:49 -04:00
Cole Robinson
0b2aa07480 host: Don't keep items in list when conn closes. 2013-06-30 12:49:48 -04:00
Cole Robinson
cafaea8999 error: Don't append empty tb to details 2013-06-30 12:42:32 -04:00
Cole Robinson
bc13c302de console: Warn if qemu+tcp URI and listen == 127.0.0.1 2013-06-30 11:44:58 -04:00
Cole Robinson
a6d3b0ca14 createinterface: bridge delay is a float 2013-06-30 11:12:45 -04:00
Richard W.M. Jones
9d5c1cdb1c inspection: Check can_set_row_none before setting icon to None.
Previously one could set the icon field of a tree model to None, but
with Gtk3 and older versions of pygobject3 this would fail.

Use can_set_row_none to test for this condition and work around it.

The previous traceback was:

Traceback (most recent call last):
  File "/home/rjones/d/virt-manager/virtManager/manager.py", line 981, in vm_inspection_changed
    self.get_inspection_icon_pixbuf(vm, 16, 16)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 1152, in __setitem__
    self.model.set_value(self.iter, key, value)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 1298, in set_value
    Gtk.TreeStore.set_value(self, treeiter, column, value)
  File "/usr/lib64/python2.7/site-packages/gi/types.py", line 47, in function
    return info.invoke(*args, **kwargs)
TypeError: Argument 3 does not allow None as a value
2013-06-28 13:46:49 -04:00
Richard W.M. Jones
ab312910f2 inspection: Don't recursively try to inspect guestfs-* temporary VMs.
This is a hack.  Should libvirt have a way to mark these VMs?

Note you'll only come across this problem if you run virt-manager as
root with libguestfs >= 1.20 on Fedora >= 18 (libguestfs using libvirt).
2013-06-28 13:05:16 -04:00
Cole Robinson
367041a8d7 Revert "details: Add USB redirection support in console viewer"
This reverts commit 7e1e21a26a.

Was accidentally applied while patch was still in review.
2013-06-28 11:12:23 -04:00
Cole Robinson
555b2d960d Revert "error: new helper function to embed customized widget into dialog"
This reverts commit ee7794a616.

Was accidentally applied while patches are still in review.
2013-06-28 11:11:28 -04:00
Cole Robinson
771707fb9c Minor TPM UI fixups 2013-06-26 20:20:12 -04:00
Stefan Berger
4453305d64 Add GUI elements for adding a TPM device to a guest
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2013-06-26 19:45:20 -04:00
Stefan Berger
2766dd5c6a Add GUI elements for TPM passthrough details
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2013-06-26 19:45:16 -04:00
Guannan Ren
7e1e21a26a details: Add USB redirection support in console viewer
Add "Select USB devices to redirect" option in console viewer
Initialize and embed UsbDeviceWidget object from SpiceClientGtk into
a dialog to let use choose available USB devices for redirection.
Throw an error message if USB connection failed.
2013-06-24 12:39:11 -04:00
Guannan Ren
ee7794a616 error: new helper function to embed customized widget into dialog
helper function: show_info_with_widget()
Widget argument has to be type of Gtk.VBox
2013-06-24 12:39:11 -04:00
Cole Robinson
57345cd61a Tweak 'libvirt needs to be started' first run message 2013-06-24 12:15:28 -04:00
Martin Kletzander
c457363f5a Don't duplicate SCSI controller IDs and assign proper addresses
When Virtio SCSI disk was added to machine with default-model SCSI
controller, the new Virtio SCSI controller had the same index as the
default one (so the domain wouldn't start or with newer libvirt even
define).

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-06-19 18:18:33 -04:00
Cole Robinson
ae3ed8db03 async: Revive timer unregistering, unintentionally dropped. 2013-06-18 10:59:19 -04:00
Cole Robinson
f3e061da36 asyncjob: Fix tracebacks if main loop exits early
Our use of nested mainloops is still kinda wonky and a proper solution
will take some decent effort. Deal with the fact that a main loop
might exit before the thread completes, and the thread will try to
talk to resources that no longer exist.
2013-06-18 09:01:45 -04:00
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
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