Commit Graph

2097 Commits

Author SHA1 Message Date
Cole Robinson 306c6be12f uitests: Add connection tick failure testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:03:51 -04:00
Cole Robinson 14232e1aa7 connection: Don't process errors in tick_from_engine
We haven't shown error dialogs for failed connections for a long
while, so all this processing isn't accomplishing anything anymore

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:03:51 -04:00
Cole Robinson 29f866e6f3 uitests: add connection object blacklist testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-02 12:59:25 -04:00
Cole Robinson a10d746c41 gfxdetails: Update UI a bit
Refactor the internals to cleanly separate the pieces that fill in
the UI, and the pieces that react to UI state to dynamically show/hide
fields.

Improve spice GL warnings while he are here, and several other minor
fixes

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 20:10:34 -04:00
Cole Robinson bd4b53e7da netlist: Remove some leftover print debugging
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 18:04:29 -04:00
Cole Robinson ba33a6c99d details: Remove explicit video heads and ram reporting
RAM is rarely changed from the default
heads does not have any explicit virt-manager support
and both are viewable from the XML editor.
So remove the explicit fields for them

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 17:32:50 -04:00
Cole Robinson 9b5d9eb9eb systray: add a standalone window impl for uitests
This gives us as much coverage as possible without relying on too much
host desktop config

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 16:59:20 -04:00
Cole Robinson 4348d4b128 systray: Don't rebuild the menu on every change
This works fine for the StatusIcon backend, but for the appindicator
backend which communicates every menu changes over dbus this is
super slow. Instead update the menu in place when objects change
state or disappear

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 16:58:04 -04:00
Cole Robinson 408b3023bc viewers: Remove hidden grab-keyboard gsettings
This was added in 2014 per user request but we never exposed it in the
UI. This is fairly advanced needs from the console viewer IMO and is
better left to console specific tools like virt-viewer, per our
DESIGN.md

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 14:27:11 -04:00
Cole Robinson c40a9e3fed delete: Move show_instance to the proper class
It shouldn't be associated with the shared baseclass

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 14:27:11 -04:00
Cole Robinson e45a2228dc objects: Erase the notion of connkey
Make it explicit that all uses of this is actually the object
name. We already leaked this abstraction in several places so better
to make it explicit. This also communicates to users that this is a
field that is not immutable so it shouldn't be used as a unique key

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 14:27:11 -04:00
Cole Robinson 8ff0da7664 connection: Pass object in -added/-removed signals
And not connkey. connkey == name, and name can change with object
rename, so it's a bad pattern to propagate that connkey can be used
as a static lookup key for objects. This begins unwinding it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 14:27:11 -04:00
Cole Robinson e4c0191f83 createvm: Only check network selection on final page
Otherwise early 'change' signals can give inconsistent
behavior WRT default 'advanced' expander state

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 14:27:11 -04:00
Cole Robinson 1a3a89d949 uitests: finish delete.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 15:59:39 -04:00
Cole Robinson 30e021bd3d uitests: finish createvm.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 14:23:24 -04:00
Cole Robinson 5442b6a890 createvm: Fix checking for empty KVM caps
This code path was never hit because it came after caps.guest_lookup
which errors in this case. We need to check things earlier

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 14:23:24 -04:00
Cole Robinson af0162caa2 createvm: Remove the xen PV-only warning
Nowadays this should be rare or possibly not even exist

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 14:23:24 -04:00
Cole Robinson c36f232370 uitests: Finish console.py and viewers.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 10:34:44 -04:00
Cole Robinson e414fc3bdc viewers: Drop old style VNC socket handling
In all modern local cases we will be using openFD to get a direct
file descriptor from the VM, so this code should never be triggered
nowadays

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 16:49:52 -04:00
Cole Robinson 940bd3873e console: Replace auth-rejected with auth-error signal
Should be similar here. auth-rejected is hard to trigger anyways

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 16:17:45 -04:00
Cole Robinson d5f7089ef2 uitests: finish engine.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 16:17:45 -04:00
Cole Robinson b0294a1bc6 testmock: Split apart the first-run option
Break it into disable-libguestfs, fake-systemd-success, and
firstrun-uri suboptions, and adjust using code to match

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 15:04:49 -04:00
Cole Robinson 7769d9a1e4 engine: Move the first run systemd handling to connectauth.py
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 13:23:34 -04:00
Cole Robinson 64e3ff1d08 uitests: console/keyring/viewer coverage work
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 13:23:34 -04:00
Cole Robinson 2c86eefa5b virt-manager: Drop the DISPLAY error handling
Gtk nowadays doesn't raise an exception, it just exits directly

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 13:21:43 -04:00
Cole Robinson c8ed6534e5 connection: Remove some outdated pretty hv labels
And also the embedded label, our default behavior covers
this well enough for what is likely to be an obscure case

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 13:21:21 -04:00
Cole Robinson 87eb36dda1 uitests: Finish virtmanager.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 12:37:52 -04:00
Cole Robinson 687658832e uitests: details/domain/config coverage additions
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 12:37:52 -04:00
Cole Robinson 301892f6b9 serialcon: Modernize code style
* Privatize a bunch of stuff
* Make public API explicit
* Add a few minor public APIs to avoid accessing internal state

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 12:37:12 -04:00
Cole Robinson e9c937691d uitests: Finish serialcon.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 12:37:12 -04:00
Cole Robinson fa82508e53 virt-manager: drop libvirt 0.6.0 version check
This is comically old and completely unrealistic anyone would
attempt to use that nowadays.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 12:37:12 -04:00
Cole Robinson a2ad7b4f2f domain: Add test mocking for IP address APIs
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-28 08:47:20 -04:00
Cole Robinson f06cc11546 config: Move more password handling to keyring.py
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-28 08:47:20 -04:00
Cole Robinson ab903ef69b domain: Fix clearing topology when VM has dies= in XML
We need to use the topology.clear() helper to properly empty
out everything

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 19:41:28 -04:00
Cole Robinson 34c6d1c7ea virtinst: cpu: Move topology elements to their own class
This is a no-op but will help with a future bug fix

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 19:41:28 -04:00
Cole Robinson ade6c34a96 domain: Have test driver report fake job_info data
Helps us test more of the UI

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 19:41:28 -04:00
Cole Robinson b764773cfe domain: Remove qemu VNC SKIPAUTH bug workaround
This was added in cb182f7e3 in Mar 2017 to work around a bug in
qemu 2.9. This bug only affects the case of virt-manager running
locally with that version, which after three years should be rare
to non-existent. Remove the workaround

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 19:41:28 -04:00
Cole Robinson eda08f4c79 details: Big code modernization
* Privatize a lot of stuff
* Separate out many callbacks as thin wrappers around the real code
* Simplify registering EDIT_ handlers
* Organize things better

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 18:10:11 -04:00
Cole Robinson eea394b9d3 uitests: Increase details + domain + vmwindow coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 18:10:11 -04:00
Cole Robinson 701164c664 details: Don't blacklist machine 'none'
Libvirt has done this for us for a long time

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 18:10:11 -04:00
Cole Robinson 7d22f7b5dc details: Fix handling failed 'unapplied changes'
The return values from config_apply were not consistent

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 18:10:11 -04:00
Cole Robinson 4fd9255f9a details: Remove the threads warning for CPUs that don't support it
This is pretty obscure, and if it's problematic then libvirt
or qemu should be throwing an error or otherwise reporting it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 18:10:11 -04:00
Cole Robinson 70a5cb7b55 gfxdetails: Improve UI interaction with spice GL + rendernode
* Unset rendernode when spicegl is de-selected
* Set rendernode by default when spicegl is first selected

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 08:35:52 -04:00
Cole Robinson f74c061061 uitests: Finish asyncjob.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 16:24:39 -04:00
Cole Robinson cfd6d6ead4 uitests: Finish vmmenu.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 16:24:39 -04:00
Cole Robinson 4c1b35f7e7 uitests: Finish migrate.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 16:01:30 -04:00
Cole Robinson b06d7c47f3 domain: Fake jobinfo support for the test driver
This let's us test more code, including behavior that's closer to
standard QEMU driver behavior

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 16:01:30 -04:00
Cole Robinson 3425d514be migrate: Remove localhost hostname warning
Latest libvirt actually checks against UUID so this isn't accurate
anymore

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 16:01:30 -04:00
Cole Robinson 25d23b1d8b uitests: finish manager.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 16:01:30 -04:00
Cole Robinson e9ee0f6d4b uitests: add some mock inspection.py testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:26:12 -04:00
Cole Robinson 0af6bdb56f inspection: Fill in fake data for test:/// URIs
This helps with testing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson 48695199c5 inspection: Break out _perform_inspection
This clearly separates the pieces where we interact with
libguestfs, vs our internal wiring

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson b59a30ad77 uitests: Finish addhardware.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson 1684049fa3 virtManager: Misc coverage annotations
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson 627fa2f611 addhardware: Simplify input_pretty_name
Drop the 'Generic' prefix for all strings which isn't particularly
meaningful.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 147f918ffd addhardware: Use dictionary pattern for pretty labels
It's shorter and saves us the pain of adding coverage
for every option

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson ab92693a56 uitests: finish preferences.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson fd5216c184 uitests: Finish createconn.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson bb1180fb40 Move virtmanager test cli handling to testmock.py
We will be adding more stuff here, so let's move it out
of the main virt-manager script

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 5ccbcb898f uitests: Finish netlist.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson ea49c1d932 netlist: Rework the 'no network' case
Always force a network selection. If we have to fall back to
manual bridge UI because nothing else exists, show a warning.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 153dcba126 uitests: test createvm.py with an empty connection
Fix the 'No networking' createvm case that it shows was broken

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 463c42773c createvm: Drop explicit warning about no net + URL install
This case should be exceedingly rare, and we already show
a visual warning about 'no network'. So let's drop this

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson bc32852e17 connection: Remove unused 'vm-renamed' signal
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson f15cdd732d graphics: Remove spice GL/rendernode version support warnings
The versions we are warning about are all over 4 years old, and
these warnings were initially just informative to help users know
when the config wasn't going to work. Drop most of it. Still warn
in the UI when a VM misconfig will prevent spice GL from working

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson c2dbdbfab1 uitests: Finish snapshot.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 5ecacfdfed uitests: Finish error.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 4b4f2ddba3 uitests: Finish addstorage.py coverage
We need to wire up some craziness to make path permission
searching fail, but this is a critical area to get correct
so it is worth it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 95bf8bf6b9 uitests: Cover more createvm validation checks
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson e3be4b677e error: Remove some dead code
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 2f4aa652d3 error: Try not to split val_err over multiple lines
Helps grepping for val_err usage, and grepping for error strings

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson be2b308ae4 createvm: Break out _validate_oscontainer_bootstrap
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 57f916461f uitests: Finish fsdetails.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 7bfe8139c0 uitests: Add module_trace.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 5c10f4e394 storagebrowse: Fix set_browse_reason
We can't call this at init time, we need to do UI changes on demand

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson c323ecfd55 fsdetails: Rework xml builder APIs
Don't have the caller call a validate function, they all catch
errors anyways. Let the build step raise error if there's a problem

Drop some validation checks that libvirt should be performing for us

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 4c439cda21 uitests: Add vsockdetails full coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson bc9d6cf6d5 Drop some explicit openvz handling
I don't think many, if any, people are using virt-manager with
openvz. Drop the specific handling the filesystem UI, users can use
the raw XML editor if they need special behavior

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 7a63fb95ec object: Finish off non-domain code coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 9d34d1da0b libvirtobject: Centralize most tick() implementations
Basically all non-domain objects just need to check to see
if status changed, which will also refresh the XML if
a change occurs. This all works to ensure we are initializing
XML at tick time

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson f22e060190 Always assume objects support .isActive()
All drivers that support the listAll APIs, which we depend on,
also are new enough to support isActive, so stop checking support

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 9a9eb165ed uitests: Add host*.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 6f8c305d62 tests: uitests: Add createvol.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 0babd6b27f createnet: Add full uitest coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 886339e8dd virtManager: add coverage annotations and remove dead code
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 8f4341bee8 host: Move xmleditor init earlier
It can be triggered via callbacks which may fire early,
so initialize it first

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 543ddba9f2 hoststorage: Fix some UI issues with initial offline conn
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson d9b3108436 hostnets: Fix some UI issues with initial offline conn
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 760d98ba64 network: Rework dhcp_leases usage to avoid dead code
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 045c8c108d network: Drop dead code in pretty_format_mode
There isn't any XML that hits this case that I can find.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 766d7c47c3 hostnets: Remove route UI label
This is an uncommon configuration. Users can see
the details in the XML editor

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson d0e725f439 gfxdetails: Remove explicit SDL UI fields
Users can look at the device XML easy enough, and very few people
are using SDL with libvirt

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson deeda106c1 createpool: Remove pool-created callback
The intent is this would select the newly created pool in the
UI after the user creates it. With async events though this
is racy and doesn't tend to work as expected.

It's fixable but it would likely require hanging around for
a period of time waiting for the signal to fire, which
takes more work. Just drop it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson f61bf516df createpool: Remove 'build' checkbox
We only showed it for disk pools, and it determined whether we
partition the device or not. I don't think this gets much
usage and there are much better tools for that job. If users
aren't sure what they are doing they can lose data.

Drop the UI, which always defaults to build=False for disk
pools, and expect the user to partition the device themselves.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 8dd3b8ba20 virt-manager: Add --test-options gsettings-keyfile
This will let us test some difficult code paths in the uitests.
Rework the `--test-options first-run` behavior to use a temporary
keyfile rather than the memory backend, to unify the code paths

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Pavel Hrdina e8bf16b983 details: fix detection of firmware auto-selection
Commit <15a9502b7b7a263c4d66ff2b3f31c209f58fe0b4> fixed firmware
detection but incorrectly. It will always show only "UEFI" even if
the firmware auto-selection is not used because the function is_uefi()
checks both the old style and the new auto-selection.

We have to check only for the auto-selection option.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2020-08-13 16:40:53 +02:00
Jan-Marek Glogowski ce5aba6a36 Add USB cdrom and ramfb video
Both are needed to install Windows 10 Arm64 from ISO.

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-08-12 14:03:58 -04:00
Cole Robinson aa89a48371 xmlutil: Centralize all 'programming error' exceptions
Raise them directly instead of adding the hard to read conditional
into the function

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-17 19:08:27 -04:00
Pino Toscano 8a085bfea1 i18n: translate UI string
A visible UI string must be translatable.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-15 10:22:26 -04:00
Pino Toscano 2760b20c84 i18n: create single strings for texts/messages
Use single strings with proper placeholders for texts, so there is no
need to join together bits of translated texts.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-15 10:22:26 -04:00
Pino Toscano 392caac8b4 i18n: add missing placeholder name in string
Fixes commit 71f034d6b6.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-15 10:22:26 -04:00
Pino Toscano 22fe62be34 i18n: fold placeholder into string
There is not really anything to leave out of the string, simply
translate it as a whole.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:24:14 -04:00
Pino Toscano 494a453ee8 i18n: use single string for error/warning
Avoids few string puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:24:14 -04:00
Pino Toscano 6f30ab2437 i18n: use plural forms where needed
Use plural forms for strings that depend on a runtime value, like a
count. This way they will get the proper string for the actual value.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:24:14 -04:00
Pino Toscano 8872e1e962 i18n: show localized accelerators in Send key menu
Turn the menu labels into GTK accelerator strings, so we can parse them
to convert them into a proper user representation.

There is a small behaviour change: the menu items do not have mnemonics
anymore by default.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:24:14 -04:00
Pino Toscano 36b3f9bee1 i18n: further improve label for controller
It seems that the index is optional, so use a proper string for this
case.

Fixes commit 00fa636682 in this file.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:24:14 -04:00
Pino Toscano bceeb23967 i18n: do not translate regexp
There is no point to translate an internal regular expression; worse,
a wrong translation can break the regular expression.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Pino Toscano 15a2354559 i18n: use single strings for connection/uri
Create single strings for connection/uri hints & tooltips, so it is
easier to translate them, and there are not glued like puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Pino Toscano 6a39f2bb8b i18n: use single strings for network list in clone dialog
Create single strings for the networks in the clone dialog, including
all the available information at once instead of join pieces together.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Pino Toscano 71f034d6b6 i18n: fix string puzzles in error messages
Do not split the error messages and the error details, but rather use a
single string with proper placeholders. This avoids string puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Pino Toscano ed836c7138 i18n: avoid string puzzle
Create the complete sentence as single message, instead of joining an
existing message with few words more.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Pino Toscano e300dd5da8 i18n: improve labels for disk
Use whole strings for the labels of disks, including the bus (if
available), and the index.

There are still generic fallbacks for the disk types not explicitly
handled.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Pino Toscano 9c7df6a7cd i18n: translate "device on address" string
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-14 11:23:57 -04:00
Cole Robinson 00fa636682 tests: uitests: Fix after string changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 7b46ee1947 i18n: improve label for floppy
Shortcut all the checks, and directly return the whole string (index
included) to show for floppies.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 664197bcc7 i18n: improve label for filesystem
Use a single string with a placeholder for the path to avoid a string
puzzle.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 5609a7f083 i18n: improve vmmAddHardware.disk_pretty_bus
Use a static mapping of translated strings, instead of manipulating the
string.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 224bb91afc i18n: improve label for redirector
Use placeholders for the bus name, and the index; the latter is part of
the string, to avoid a string puzzle.
Also use vmmAddHardware.disk_pretty_bus() to get the proper translated
string of a bus.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 90e2bdcb3e i18n: improve translatability of vmmAddHardware.input_pretty_name
A single "Generic" message glued together with capitalized names of bus
and type is a really bad string puzzle:
a) the parts cannot be moved around, while they could depending on the
   language
b) the type cannot be translated, and things like mouse/keyboard/tablet
   are usually translated
c) "generic" as adjective must get the proper gender depending on the
   name it refers to

Hence, unroll 6 more whole strings for the most common combinations of
type and bus. Otherwise, use strings with the type, as it is needed
because of (c) above. At last, fallback to a generic string, still
allowing (a) above. In both cases of fallback, the bus is still properly
translated.

In all the cases, use constants instead of explicit identifier strings.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano e391489b49 i18n: translate custom URI string in new conn dialog
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 106d6b5478 i18n: improve items in destination combo
Translate as a whole the UI description of a URI along with the detail
for it, if available. This way there is no string puzzle, and it is
possible to tune the detail string according to the language.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 839b5501cf i18n: translate whole title in migration dialog
Translate the whole string of a title in the migration dialog, including
the markup, so there is no string puzzle.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano deb6462843 i18n: avoid string puzzle in display autoport string
When updating the checkbox aobut the automatic port, set a full string
(without or with the port) instead of "cutting" an existing label.
Not only it avoids to manipulate a UI string, it also allows translators
to properly translate the whole string that includes a port.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano d58b3fedaa i18n: improve label for controller
Use a proper string with placeholders for the controller name and index,
to avoid string puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano d5fc02c6ae i18n: improve labels for TPM
Use separate strings for the path case, and for the generic case (i.e.
the version), to avoid string puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 9d81aae894 i18n: improve labels for RNG
Use a separate string in case it has an associated device to avoid a
string puzzle.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano aa369e7a8d i18n: improve labels for serial/parallel/console
Split the handling of serial, parallel, and console in their own cases,
as the common code is less than the non-common one.

Use separate strings in case the port number is available to avoid
string puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 864fbfbbcf i18n: translate labels for NICs
Translate the labels for a NIC, both when a MAC address is available and
when it is not.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 42463cde9c i18n: simplify vmmAddHardware.controller_pretty_desc
Shortcut the specific cases, avoiding string puzzles; keep using
vmmAddHardware.controller_pretty_type() otherwise.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 838c8524d2 i18n: translate all controller types
Translate all the types of controllers (e.g. USB, PCI, etc), so they can
be translated/translitterated in case they need to be.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 2927299411 i18n: improve labels for channels
Use separate string in case we have the channel name, and in case we
have the channel type.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Pino Toscano 0145d9838b i18n: fix few spellings
"iSCSI", "KVM", "QEMU", "UNIX", "UUID", "VirtIO", "XML", "vCPU".

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-07-13 15:37:00 -04:00
Cole Robinson fec9f0b136 po: Fix message format warnings printed from xgettext
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-11 19:18:38 -04:00
Cole Robinson a8d2438d5a devices: interface: Rename is_conflict_net -> check_mac_in_use
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-06 10:17:10 -04:00
Cole Robinson f27e203732 cli: Skip MAC collision error with --check mac_in_use=
There's valid cases where a VM can be defined with a conflicting MAC
address. Prior to  ebd6091cc8 and related refactorings we were more
lax here if the conflicting VM wasn't running, but now we are blocking
some valid usage.

Hoist the validation check up to cli.py and add --check mac_in_use=off
to skip the validation. Advertise it like we do for other checks, so
now a collision error will look something like:

The MAC address '22:11:11:11:11:11' is in use by another virtual
machine. (Use --check mac_in_use=off or --check all=off to override)

Reported-by: Pino Toscano <ptoscano@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-06 10:17:10 -04:00
Cole Robinson 5733d8941c addhardware: Fix invoking netlist validate()
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-06 10:17:10 -04:00
Cole Robinson 3ea9a96961 tests: pylint: Silence some false positives
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-04 18:05:27 -04:00
Daniel Henrique Barboza 721108002d netlist.py: remove the extra 'None' return in get_network_selection()
Commit v2.2.1-200-g4c3c53f7 ("virtManager: Remove network portgroup
UI") removed 'portgroup', the fourth value of the returned tuple in
get_network_selection(), and all related code that was using this
extra value.

That change forgot to change the line where, if no rows are found, a
tuple with "None" values is returned. The "None" tuple is still
returning 4 "None" values. Since no remaining code is checking for
a fourth value, this is benign and has no impact in the logic.

'pylint' does not seem to care though, and it is complaining about
'unbalanced-tuple-unpacking' because, in the condition mentioned above,
a fourth "None" value is returned and no one is bothering checking for
it.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza 97eda595d3 virtManager/clone.py: codespell fix
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Han Han f34f73622d rng: add builtin rng backend model
The builtin rng backend uses getrandom syscall to generate random, no
external rng source needed, introduced from libvirt v6.1.0.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2020-04-21 13:05:42 -04:00
Cole Robinson f6eee380a2 preferences: Fix dialog when invalid keygrab is set
https://bugzilla.redhat.com/show_bug.cgi?id=1810106

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-04-13 12:44:47 -04:00
Cole Robinson e79b550419 Fix pylint with latest pylint version
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-30 16:04:12 -04:00
Stefan Berger cd1713c6f2 tpm: add SPAPR (ppc64) device model
Add support for the tpm-spapr device model for pSeries VMs.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-03-30 15:59:37 -04:00
Cole Robinson 1afdc7ae32 createvm: Rework to track all Guest/Installer params explicitly
Rather than build a guest and installer instance depending on where
we are in the UI, track each input property in an explicit class, so
we can rebuild the guest/installer on demand with data accumulated
up to that point.

This makes the flow easier to follow and simplifies a lot of hacks we
have to do when backing up through the wizard, because we are trying
to unwind changes from an existing object, rather than just blowing
it away and easily reassembling it with updated info.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson eb605cccd8 tests: uitests: More createvm testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson bea5e56c26 virtinst: connection: Add is_privileged
Replace the is_session and is_system distinction with variants
of is_privileged. This matches what libvirt uses internally, and
will help with supporting qemu:///embed at some point

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 67ef81895e virtManager: Convert to CSS for most color usage
* Add CSS data in config.py and install it
* Strip out all hardcoded colors and use style class annotations
* Fix colors to be more theme appropriate to fix dark theme look

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 1ad470c021 inspection: Some cleanups
* Simplify the queue data, just push in VM data to refresh
* Do less work in threads
* Slight rework of updating inspection data in the VM

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-01 22:02:59 -05:00
Cole Robinson 53aba9204d connection: Fix stats polling
Commit 419f8cd31b messed up the dopoll rework, which meant we
never called stats polling on the master object list. Fix it, but
do so by unwinding the redundant internal _update routines

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-01 21:28:07 -05:00
Cole Robinson 5573aeb441 createnet: Fix XML editor error when dhcp fields are empty
We need to handle the case when ip == None

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:53:31 -05:00
Cole Robinson 635073eef5 createnet: Drop row coloring validation
Because we are a single screen now, just let libvirt perform
the validation for us

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:53:31 -05:00
Cole Robinson 140a1f3b15 cloner: Drop ability to clone a paused VM
Generally this doesn't work with qemu metadata locking nowadays,
and it was never a safe idea to begin with, because disk contents
could be in an inconsistent state.

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:38 -05:00
Cole Robinson 3859725739 createvm: Fix showing 'Import' disk UI
We were triggering the wrong install page number, after adding
the Manual Install option

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:38 -05:00
Cole Robinson b671c7cf41 libvirtobject: Always define even if XML isn't different
This should be a rare occurence, and it ensures that the UI reflects
the latest XML

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:28 -05:00
Cole Robinson 519fed3b91 addhardware: Remove dead virtio-scsi collision code
The way we set controller_model earlier, means all the virtio-scsi
allocation code is essentially never set. That code does still fix
a valid case of when trying to add a scsi device when there isn't
any remaining slots open, but that should be rare enough that I'm
fine telling the user to edit manually set up a controller themselves
first.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:52:29 -05:00
Cole Robinson bd4b841b10 addhardware: Remove IO and scsi reservation options
These were removed from the Details dialog previously, but I forgot
to remove them from addhardware too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:41 -05:00
Cole Robinson 4cb775773f devices: disk: Add change_bus()
Taken from virt-manager code. Move it here because it is strictly
an XML operation, and it will be easier to unit test

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:33 -05:00
Cole Robinson 0f295ec5dc devices: disk: Add more test coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:40:43 -05:00
Cole Robinson d9d5caad0d virtinst: connection: Drop is_closed() helper
We have is_open, just use that

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:42:33 -05:00
Cole Robinson 0e355b218a delete: Improve text for storage deletion
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Cole Robinson e48ce4a31e delete: Default to not removing storage for disk removal
This is the old default we've always used, so better to stick with it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Cole Robinson 03a6272f81 delete: Code cleanups
* Comment the individual classes
* Move abstract methods to their own logical section
* Simplify some shared code calls

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Cole Robinson 1a9e2f4f76 delete: Don't run UI routines from a thread
Pull the remove_devobj_internal call outside of the async job,
otherwise we can have X11 threading issues

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Lily Nie 3ab35320a1 Use remove_devobj_internal function instead of vm.remove_device
remove_devobj_internal function handles more things than vm.remove_device.
We should call it first before performing the storage deletion.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Lily Nie 1e36ce05e3 Change remove_devobj_internal to a static method,and move it to vmmDeleteStorage
So that the callback doesn't need to be passed into the init function,
and vmmDetails can call that function directly

Reviewed-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Lily Nie af59cd9825 details: remove all usage of 'self' in remove_devobj_internal function
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Lily Nie 71befc0f5d details: add a remove_devobj_internal function
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Cole Robinson 6f95ebc7fd devices: controller: Add get_attached_devices
Move the opencoded impl out of virt-manager details.py and into
virtinst, since this is entirely about XML comparison. Add tests for
it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-27 13:08:12 -05:00
Cole Robinson eb5e087366 tests: Add full coverage for pollhelpers and VirtinstConnection
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-27 06:57:37 -05:00
Cole Robinson 8fe0a208db Move virt-* code into their modules
This layout is closer to what most python modules have nowadays.
It also simplifies testing and static analysis setup.

Keep virt-* wrappers locally, for ease of running these commands
from a git checkout.

Adjust the wrapper binaries we install on via packaging to be
pure python, which makes things like running gdb easier.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 18:27:20 -05:00
Cole Robinson 3538a8df79 details: Fix perf icon with adwaita-icon-theme
We need to fallback to a more generic value if the
preferred icon is not around

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 15:41:21 -05:00
Cole Robinson 1002128c7b oslist: Only handle 'activate' if the oslist is visible
Otherwise when we press enter for an already selected OS, it chooses
the first alphabetic entry in the list, overwriting our selection

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson c6e85295e8 createvm: Grab OS list focus for manual install page
Since the page requires input and can't progress until the user enters
some value here, grab focus for the OS list

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson ba24d877bf createvm: Remove 'Network boot (PXE)', add 'Manual install'
For the dialog flow, these options are the same, the only effect
is that there's no longer an initial network boot phase.

PXE is dependent on an external server setup that is not common
in the scheme of things, so giving it a first class option on the
front of the new VM wizard isn't really sensible. Users that want
to PXE boot can easily do so via the 'customize before install'
option, or just manually create a VM and edit the boot device as
they see fit.

Explicitly advertising a Manual option is nicer for users that
just want to create a VM and deal with install later, among many
other minor use cases.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson f073ad6fb6 createvm: Remove kernel/initrd/dtb/kernel args UI
Add an info message that these can be set via the
'Customize before install' option. Duplicating this doesn't add a ton
of value here IMO

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 0bf65e6ce8 preferences: Remove old Interface confirm option
This hasn't been relevant since that UI was removed

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson d410773af8 virtManager: Remove virInterface polling
There are no more users of interface objects in the code. Remove
all the polling support, and all the remaining references to
interface objects throughout the code base

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 212c5f813d createnet: Add field for specifying forward device
And drop the explicit forward device listing. Similar to what
we did with bridge/macvtap domain <interface>

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson c92c454fde virtManager: Drop interface list for bridge and macvtap
Some related bits were discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

macvtap is problematic for inexperienced users so we shouldn't
be broadly advertising it, plus our device listing was incomplete
anyways.

Both bridge and macvtap device listing are largely dependent on
the libvirt virInterface APIs, which have varying degrees of
completeness across distros and are not particularly reliable to
begin with.

Drop both of these in favor of the available support for manually
specifying a device name

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 8ed9eef905 netlist: Use same default policy as virt-install
virt-manager's logic is hard to follow, and gives weird results
by just choosing the first bridge device it finds more or less.

Use virt-install's logic: bridge if it is the default route,
otherwise network 'default' if it exists

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 66e1eb7324 netlist: Add 'Macvtap device...' manual entry
Similar to the bridge option. We will be removing the explicit
device listing support soon, so this will be required for specifying
a macvtap device

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 00da972b14 netlist: Rename 'Specify shared device' to 'Bridge device...'
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 227d6982ae virtManager: Drop macvtap 'source mode' UI
Some related bits were discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
  * macvtap is kinda problematic in general because it doesn't provide
    out of the box host<->guest communication, and it requires a
    special XML option just to get working ipv6. Users that know they
    want it usually know this distinction, but if someone chooses it
    without understanding the implications it can cause confusion.
    This puts it hovering the intermediate/advanced user line which
    makes me want to not advertise it as prominently as we currently do,
    with an explicit list of host interfaces
"""

Part of this is that the only source_mode that will work in a useful
way for the vast majority of users is mode=bridge. Any of the other
modes either require special hardware, permissions, or other
configuration. Default to bridge mode. The XML editor is there for
anyone that knows they need something different

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 4c3c53f773 virtManager: Remove network portgroup UI
portgroups are a way to group logical chunks of settings inside
a <network> object. They are a quite advanced feature that I expect
many few users are using, and the ones that are using it are certainly
advanced enough to edit the XML directly.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 8263d5c705 netlist: Reorganize row building a bit
This should be a no-op.

* Remove unused is_active field
* Access row indexes with named fields
* Move the row building outside the main class, to make it clear
    these are just helper methods

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson a18117ae30 createvm: Remove the PXE install network warning
This is pretty obscure, and PXE installs will likely be reworked
in the near future. Drop it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 4fce7dde9a virtManager: Remove LXC idmap UI
This is pretty obscure, and requires a large amount of UI surface
to handle correctly. Users can use the XML editor if they know they
need or want this.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:32 -05:00
Cole Robinson 137b73df75 virtManager: Only allow editing disk bus for new VM
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: bus editing: maybe keep this for the customize wizard, but
it should go away for existing disks, changing it for an existing VM is
definitely a 'shoot yourself in the foot' type of thing for most users
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:18 -05:00
Cole Robinson 7547905d79 virtManager: Remove max memory UI and memory hotplug support
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug
operations. These have been in the UI forever but I'm not sure people
actually use them. cpu hotplug has always been a mess, and unless the
user plans ahead by setting a high maxmem value ballooning is only good
for reducing memory. These all sound like advanced usage to me that
just confuses the typical usecase of adding more mem or vcpus to an
offline VM. And the hotplug operations with virsh are simple to invoke.
So I'd like to drop this from the UI
"""

The remaining field sets both max and current memory in the
inactive XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:24:22 -05:00
Cole Robinson 0335c9ce62 virtManager: Remove maximum VCPUS API and VCPU hotplug
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug
operations. These have been in the UI forever but I'm not sure people
actually use them. cpu hotplug has always been a mess, and unless the
user plans ahead by setting a high maxmem value ballooning is only good
for reducing memory. These all sound like advanced usage to me that
just confuses the typical usecase of adding more mem or vcpus to an
offline VM. And the hotplug operations with virsh are simple to invoke.
So I'd like to drop this from the UI
"""

The remaining UI field now sets both maximum and current VCPU
allocation.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:24:20 -05:00
Cole Robinson b4b497e28f virtManager: Remove network virtualport UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* network virtualport configuration: this is some really obscure
stuff for configuring VEPA for macvtap devices. I don't think it gets
any usage in practice. I think a smaller subset of this UI is shared
with openswitch config but I believe it's just a single field, we
could keep that even though I don't think many people use it either
"""

This removes it all. The openvswitch piece was not properly wired
up anyways, since it requires setting virtualport type for a bridge.
For users that know they need that, they can add it via the XML
editor.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:22:18 -05:00
Cole Robinson 3c861131dd virtManager: error: Break long lines in error dialogs
Errors from libvirt can be super long, and stretch out the dialog like
crazy.

This causes some changes in test suite output, so adjust tests to
match

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:21:59 -05:00
Cole Robinson a162a3b845 virtManager: Remove disk driver_io UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

The default driver_io value we use seems to be sufficient. It's very
rare to hear that users need to change the value to something
different, and if they do, they are advanced enough users that can
edit the XML directly IMO.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson 2367e70efa virtManager: Remove magic spapr-* device handling
We have lots of spapr-* pretty printing and some magic handling
spread around the codebase. These devices have fallen out of favor
and are rarely used, so drop the special handling

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson b583ea7e66 virtManager: Remove disk SCSI reservations UI
This is another advanced feature with a limited appeal. Users that
know they need this can set it directly with the XML editor

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson d9c0384607 virtManager: Remove disk SGIO UI
This is a very advanced field that is only shown for a quite
advanced disk device='lun' config. Users that know they need this
can easily set the value via the XML editor

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson 79fe886ac8 virtManager: Remove disk format/driver_type UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: storage format: this was from before the days when we
storage-ified everything and we could get the disk format wrong, telling
qemu it has a raw image when it's qcow2. shouldn't be needed anymore for
normal virt usage
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson 1066867583 virtManager: Remove disk serial UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: serial: I know this is useful in some cases but seems quite
obscure. I think the XML editor is fine unless there's some common
usecase I'm missing
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 13:45:43 -05:00
Cole Robinson bd82ef6529 virtManager: Remove spice tlsport UI
This was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

tlsPort is an advanced config feature. With the XML editing support,
it's less important to have this as a first class UI element. Users
that know they need this setting can set it directly in the XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson 7251ea25c2 virtManager: Remove graphics keymap UI
Removing this was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

For a decade, qemu and xen and virt-manager work together to
make setting a manual keymap redundant. Advertising it in the UI does
more harm than good, because users may think they need to specify
one when in the vast majority of cases it will give worse behavior.

With the XML editing UI, users still have a way to do this by hand
if they really know what they are doing.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00