Commit Graph

7616 Commits

Author SHA1 Message Date
Cole Robinson
c0c704e1fa console: Move _change_title behavior to vmwindow
This is where it conceptually belongs

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 09:06:18 -04:00
Cole Robinson
95f363d634 vmwindow: Rename some functions for clarity
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 09:06:18 -04:00
Cole Robinson
518f230f76 vmwindow: Remove non-events XML refreshing on resource tick
This is an awkward place to put it, and I'm pretty sure it's not
even useful in the non-events case nowadays due to improved
libvirtobject.py infrastructure

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 09:06:18 -04:00
Cole Robinson
301577c2f6 details: Make disk_bus_index handling less hacky
In weird corner cases this can trigger tracebacks, if the boot
page is refreshed while the hardware list changed underneath us.
This is a step in the direction of unwinding it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 09:06:18 -04:00
Cole Robinson
05174f3719 uitests: More workaround for newvm wizard focus grab issues
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 19:48:22 -04:00
Cole Robinson
295c8a86dd details: Add host-passthrough as an explicit CPU UI choice
Historically we have not advertised host-passthrough because it was
not recommended for general usage. That stance is softening,
tools like gnome-boxes already set it as the default, and users
continue to ask about it.

We may change the default in virt-manager but it will take more
discussion. This is a tiny move in the direction of hiding it less
than we already do.

Drop the label for host-model and call it by its libvirt XML name,
since otherwise it's hard to tell which combo choice is for each
value

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 18:21:43 -04:00
Cole Robinson
2f7931da63 createvol: Drop Allocation field in favor of checkbox
Inspired by some discussion from here:
https://bugzilla.redhat.com/show_bug.cgi?id=1759454

Most libvirt storage volume creation doesn't actually do anything
with allocation, besides interpreting cap == alloc and cap != alloc.
The exceptions are zfs volumes, and raw file volumes. But it's unclear
what the usecase is for the latter at all.

This drops the allocation spinner and adds checkbox in its place
'Allocate entire volume now'. When enabled, it sets cap == alloc.

We only show this for file volumes. For qcow2 it defaults to unselected
(sparse), for all others it defaults to selected. If it's not showing,
it defaults to selected.

Bundled with this change is showing this field for qcow2, where
we previously only allowed nonsparse here. Libvirt and qemu-img
support non-sparse qcow2 these days.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 17:08:39 -04:00
Cole Robinson
5c1f4b2386 virtinst: storage: gluster pools don't support volume creation
Drop code that implies they do

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 16:44:24 -04:00
Cole Robinson
a010c49b8b cli: Fix --os-variant=help introspection
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 16:00:46 -04:00
Cole Robinson
81eae9b181 docs: Add github ISSUE_TEMPLATE
Adjust existing docs to better document running code from git

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 14:35:05 -04:00
Cole Robinson
092a62552c uitests: More work to drop sleeping and hacks
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 14:32:55 -04:00
Cole Robinson
ba08f84b34 addstorage: Return to using qcow2 sparse by default
https://bugzilla.redhat.com/show_bug.cgi?id=1759454

See 15a6a7e210

The idea behind virt-manager's sparse vs nonsparse default, is that if
the user selected 'raw' for as the default image format, assume they
want to maximize performance, so fully allocate the disk.

qcow2 didn't support anything except sparse, so the sparse=True vs
sparse=False made no difference. So we always set sparse=False

Then qcow2 grows non-sparse support, and virt-manager is suddenly
defaulting to it, which is not the intention.

Default to sparse when requested format isn't raw

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 10:11:36 -04:00
Cole Robinson
6f8b9c13a7 uitests: Test raw diskimage default via keyfile
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 10:11:36 -04:00
Cole Robinson
6a88f92fd0 preferences: Unconditionally add VM sound devices
This is another preference that was added before anyone ever asked
for it. I'm fine with suggesting users remove the device manually
if they don't want it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Cole Robinson
748639702e preferences: Unconditionally add usbredir devs for spice
Remove the preference option to disable this. This was added with
the initial usbredir support because I was afraid people would
complain. They did complain, but only about the auto redir behavior
of the spice client. We still have a toggle to disable that behavior

If people don't want usbredir devices, I'm comfortable telling
them to remove them manually, or use virt-install

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Cole Robinson
8ce83dbc53 uitests: big mess of work
* Convert to pytest style functions
* Move lots of shared code to our App class
* Reduce dogtail sleep amounts to speed up the whole testsuite
* Improve robustness in a lot of areas

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Cole Robinson
799c82584c virt-manager: Stop suppressing all warnings
This is hiding useful stuff. It was enabled once upon a time because
it was too noisy but let's see if it gets bad like the past

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 14:28:05 -04:00
Cole Robinson
7f310b32c4 uitests: More use of check_onscreen
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:47:36 -04:00
Cole Robinson
64eb8663a1 uitests: test_cli improvements
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:47:30 -04:00
Cole Robinson
4193aa2bb0 app: Slight rework of wait_for_exit
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:47:04 -04:00
Cole Robinson
fa322588b4 tests: Drop most unittest usage from virtinst tests
Kill usage of the TestCase class, move more to pytest standard
style

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:46 -04:00
Cole Robinson
b79ee9565f tests: Rename test_xmlconfig.py to test_misc.py
That's what it is now, just a collection of misc virtinst tests

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:33 -04:00
Cole Robinson
4c4753d910 tests: break out test_disk.py
Move a bunch of misc disk/diskbackend tests to this file

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:22 -04:00
Cole Robinson
0ac9ff3488 tests: Drop a bunch of redundant xmlparse/xmlconfig tests
For the few bits we are hitting specific code paths, break them
out or fold them into other test cases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:08 -04:00
Cole Robinson
1b93c17564 cli: Add --controller vectors=X
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:45:07 -04:00
Cole Robinson
71ac3ee044 tests: Convert to use pytest style 'assert'
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:44:50 -04:00
Cole Robinson
2d8c1c5ab9 tests: capabilities: Fix coverage after string changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
748bb7d774 i18n: fix string puzzles in capabilities lookup error msgs
Create complete sentences with all the details available; there are not
many combinations, so this makes it possible to properly translate them.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
a74f22c49a i18n: use a single string for error message
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
adeabb6e40 i18n: use plural forms where needed
In particular, when the number of objects depends on a variable.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
fb8a31ba76 i18n: translate UI messages
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
76593f8a08 virtinst: use fail_conflicting
Make use of the new helper for showing a standard error message for two
conflicting cli options. This also catches one untranslatable message.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
8501206cb3 cli: add fail helper for 2 conflicting cli options
It will avoid repeating the same message in different places.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
924d766112 i18n: fix string puzzles in virt-xml hotplug/hotunplug/update
Do not use the action string (which is an identifer) as replaced
placeholder in messages for device hotplug/hotunplug/update.
Instead, use complete strings for all the actions, and also for all the
usages (confirmation message, success message, error message).

Since the action is the same for all the devices, create the messages
outside the iteration to avoid translating them more than once.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
8fbb985a8c i18n: improve title of connection dialog
Instead of using the title of the dialog and prepending the connection
label, create a new title as a single string. This way it is possible to
translate this title as single sentence.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
519d409718 i18n: fix string puzzle in volume creation dialog
Use a single label to show the single sentence describing the available
space on the storage pool. This avoids the use of 3 different labels,
partially translated separately, and whose content cannot be moved.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 14:25:59 -04:00
Cole Robinson
c7ce770170 Prep for release 3.0.0 2020-09-15 17:14:00 -04:00
Cole Robinson
282f9cf91c domain: Switch to non-deprecated thread.is_alive
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-15 16:27:00 -04:00
Cole Robinson
83fcab0177 connectauth: Drop systemd libvirtd service startup
Latest libvirt uses socket activation, so libvirtd.service in
offline state does not indicate a problem necessarily.

Also on Fedora nowadays we have a weak RPM dependency on
libvirt-daemon which we didn't in the past.

Both things combine to make this code less useful and less accurate,
so let's remove most of it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-15 14:46:36 -04:00
Cole Robinson
54ae6f2723 tests: uitests: Try to fix some clone flakiness
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-15 13:50:58 -04:00
Cole Robinson
9fdbccec2b Fix pylint raise-missing-from
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-15 12:36:27 -04:00
Chen Hanxiao
3238594028 fix some pylint
virtManager/createvm.py:982:8: W0128: Redeclared variable 'ignore' in assignment (redeclared-assigned-name)

tests/uitests/lib/app.py:12:0: C0411: third party import "from gi.repository import Gio" should be placed before "import dogtail.rawinput" (wrong-import-order)

Signed-off-by: Chen Hanxiao <chenhx.fnst@cn.fujitsu.com>
2020-09-15 12:20:18 -04:00
Cole Robinson
a242894182 cli: Add --os-variant require=on|off
If specified, this errors if no OS name was detected or manually set.
So --os-variant detect=on,require=on will error if no OS is detected.

name= can be used as a fallback, so test and document this case

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 20:36:12 -04:00
Cole Robinson
17f47a44c5 cli: --os-variant: add explicit suboptions
This adds the following --os-variant suboptions

* name=, short-id=
* id=
* detect=on|off

Functionally this does not change behavior, just adds explicit
sub options for behavior we already support

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 20:15:20 -04:00
Cole Robinson
67703ec7a5 cli: Add --osinfo as alternate name for --os-variant
The --os-variant option naming is pretty crappy and mostly a historical
artifact. Ideally this would be named just `--os` but I'm afraid that
would cause confusion with libvirt's <os> XML

Add --osinfo as an alternate commandline naming. If we ever want to
transition documented use of --os-variant it will help to have the
alternative around for a few releases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 18:12:41 -04:00
Cole Robinson
9e8a72537e hoststorage: Fix variable reference in error path
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 14:40:47 -04:00
Göran Uddeborg
a8aec2da33 Translated using Weblate (Swedish)
Currently translated at 88.6% (1247 of 1407 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/sv/
2020-09-14 11:34:36 -04:00
Cole Robinson
080e84517e tests: test_dist: filter out harmless xgettext warning
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 09:57:23 -04:00
Cole Robinson
e513422166 po/ru.po: Fix msgfmt string error
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 09:55:36 -04:00
Cole Robinson
b60403d65b po: Fill in Project-Id-Version to not produce msgfmt errors
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 09:54:43 -04:00