Commit Graph

29 Commits

Author SHA1 Message Date
Cole Robinson
eee1caa946 domain: Drop most device list wrappers
There's lots of hacks stuffed into the domain device lists. Formalize
some of it, move some of the specific stuff to details.py, and drop
a lot of the needless API wrappers
2018-03-21 16:10:45 -04:00
Cole Robinson
b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Cole Robinson
a10fda6b5c uitests: console: Add live lxc serial test 2018-01-21 14:42:44 -05:00
Cédric Bosdonnat
0c6bcb0917 python3: fix bytes/string mess in serial console
Add a few encode() and decode() to convert between libvirt stream
functions expecting bytes arrays and Vte callbacks providing strings.
2017-12-20 16:09:35 -05:00
Radostin Stoyanov
b93cc3bbc9 pycodestyle: Do not use bare 'except:'
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].

[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
Cole Robinson
62feeb02a8 Switch to python3 style 'except X as Y' notation
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson
8b6c404305 serialcon: Add logging about what VTE version we are using 2016-05-07 20:44:22 -04:00
Cole Robinson
f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson
0d223e7008 serialcon: Drop the Vte version check
We can work with both the 2.90 and 2.91 APIs no problem, so drop the version
check. The pylint error seems to have disappeared anyways :/
2015-12-24 12:26:08 -05:00
Cole Robinson
f7ae826f0a Fix some gi version errors from pylint 2015-12-06 15:41:49 -05:00
Cole Robinson
9da74dc7ea serialcon: Fix error reporting for remote connections 2015-09-22 12:41:57 -04:00
Cole Robinson
0aeee5c449 serialcon: Fix opening with xen (bz 1215357)
Apparently xen doesn't set <serial> device alias names, and OpenConsole
just opens the first <console> device unconditionally.

Properly handling that would be to report it in the UI that we can
only open the first console, but for now just drop the alias check.
Apparently SUSE already does this as mentioned in the RH bug

https://bugzilla.redhat.com/show_bug.cgi?id=1215357
2015-04-26 11:54:55 -04:00
Cole Robinson
a3f8d73a9c libvirtobject: Unify internal status APIs and signals
Drop config-changes vs. status-changed and just use one signal, since they
are largely the same code paths for all users.
2015-04-10 15:00:34 -04:00
Cole Robinson
01bf07ba11 libvirtobject: Unify status signals
Dispatch them all from the actual object and not proxied through
the connection. Use the same signal name for all objects with the same
signature.
2015-04-10 15:00:33 -04:00
Cole Robinson
edf9bf0aad serialcon: Drop use of yet more removed API 2014-09-19 20:35:06 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
3c2dc15af7 serialcon: Remove some redundant VTE API calls
Latest VTE doesn't seem to provide set_emulation anymore, and the other
two seem to be the default anyways. This also avoids some VTE bindings
breakage on current rawhide:

https://bugzilla.redhat.com/show_bug.cgi?id=1114379
2014-07-02 09:20:17 -04:00
Cole Robinson
196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Cole Robinson
02f49be9e2 serialcon: Hide scrollbar until there's something to scroll 2014-04-29 10:28:06 -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
bcfa8d287f serialcon: Release the text console when the VM window is closed (bz 1016445) 2013-11-09 17:54:47 -05:00
Cole Robinson
e802eae07b VirtualCharDevice: Convert to new style XML props, rework API 2013-07-23 17:34:31 -04:00
Cole Robinson
d09bc39a2b serialcon: Fix copy+paste 2013-07-11 13:32:41 -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
436a5bfc8b serialcon: Fix tracebacks when we get EOF on stream 2013-06-12 21:10:52 -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
Cole Robinson
079835bfaf Fix other popup menus after gtk3 conversion 2013-04-14 13:16:02 -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