Commit Graph

360 Commits

Author SHA1 Message Date
Cole Robinson a5f4033493 details: add xmleditor UI
Handling this is a bit different from other bits, because:

1) the <device> editing paradigm is unique. We need to replace the
   device in line in the XML which is a new operation
2) the New VM customize pattern is tricky and needs lots of
   special handling
2019-06-13 07:15:46 -04:00
Cole Robinson b5a664bd1b virtinst: move UI only functions into virtManager
These throw off code coverage testing. They are mostly:

* pretty* device helpers
* network + snapshot validation + creation routines
2019-06-09 18:33:45 -04:00
Cole Robinson 6f5cd58ead util: Move pretty_* into virtManager code 2019-06-07 17:21:25 -04:00
Cole Robinson 9e56169813 connection: Drop unused filter_nodedevs devcap value 2019-06-05 16:35:34 -04:00
Cole Robinson 9d78759ac5 devices: redirdev: Use CharSource
redirdev does the same internally for libvirt, so let's follow that
pattern, and fix the fallout
2019-05-14 11:57:50 -04:00
Cole Robinson 6d46e37e09 devices: rng: Use CharSource
Re-use CharSource, just like libvirt does internally. Adjust all
callers to match. Rename type -> backend_model while we are here,
because type is ambiguous
2019-05-14 11:57:50 -04:00
Cole Robinson b2b9d7d366 devices: char: Add CharSource
Move all ./source handling into CharSource, which will be reused by
other device classes as well. This requires us to add ../ handling
into our xmlapi xpath engine
2019-05-14 11:57:50 -04:00
Cole Robinson bd6f751657 details: Drop char supports_property usage
Whether we show something in the UI should be more dependent on
whether it's actually set in the XML, not some internal hardcoded
list which can go out of date.
2019-05-13 13:38:46 -04:00
Cole Robinson e6eb1d447b devices: char: Rename some properties to better match XML
* bind_port -> bind_service
* source_host -> connect_host
* source_port -> connect_service
2019-05-13 12:35:55 -04:00
Cole Robinson a54b83072a addhardware: Remove unused is_customize_dialog 2019-05-13 12:09:39 -04:00
Cole Robinson 583dae7af5 details: Clarify config_apply variable names 2019-05-13 12:08:55 -04:00
Cole Robinson a506e3c108 details: Have a separate hw column for unique key
Right now we overload the DEVICE column for non-device pages
like overview or memory. Add a separate column for KEY, and have
DEVICE==None for non-device pages
2019-05-13 12:08:55 -04:00
Cole Robinson 491da67cbf details: Add _make_hw_list_entry helper 2019-05-13 12:08:55 -04:00
Cole Robinson 03bddaaeb3 details: Hardcode list icon size
We use the same value everywhere, so don't include it in the model
2019-05-13 12:08:55 -04:00
Cole Robinson f947afc3df details: split out a top level vmwindow
vmmVMWindow handles all the menuing, and coordinating between the
console, snapshots, and details panel. Simplifies the details
code a bit which will help when we add xmlediting
2019-05-13 12:08:55 -04:00
Pino Toscano 23b87295fc details: avoid extra check when showing application names
The current code already prefers the "display name" over the "name" of
each application; hence, use "name" only if the "display name" is not
available.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-18 13:44:34 -04:00
Pino Toscano 83f1544d32 inspection: create and use a separate vmmInspectionApplication
Instead of passing around the raw results of
g.inspect_list_applications(), create an helper vmmInspectionApplication
object with the data of an inspected application that we use.  This is
done for different reasons:
- when using the data, it is easier to use member variables instead of
  looking up values in a dictionary
- we keep only the data needed, slightly lowering the memory/objects
  used for the inspected applications
- it will be easier to switch from g.inspect_list_applications() to
  g.inspect_list_applications2() without changing code outside the
  inspection code

Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-18 13:44:34 -04:00
Cole Robinson f7ba2f2f99 error: Add helper confirm_unapplied_changes
For the common dialog we use to confirm changes
2019-04-14 18:24:04 -04:00
Cole Robinson 3784864e10 baseclass: Add is_visible
Remove the duplicated implementations everywhere
2019-04-14 17:05:14 -04:00
Cole Robinson 5367f3343a details: Clean up vsockdetails on window cleanup 2019-04-13 16:45:26 -04:00
Cole Robinson 927d668215 virtManager: Use popup_at_pointer
Added in gtk 3.22 to fix some wayland ambiguity. Needed for sway wm
multimonitor apparently:

https://bugzilla.redhat.com/show_bug.cgi?id=1694379
2019-04-07 13:54:00 -04:00
Pavel Hrdina 8720637cff virt-manager: add new checkbox to control CPU security features
By default we copy CPU security features to the guest if specific CPU
model is selected.  However, this may break migration and will affect
performance of the guest.  This adds an option to disable this default
behavior.

The checkbox is clickable only on x86 and only on host where we can
detect any CPU security features, otherwise a tooltip is set to notify
users that there is nothing to copy.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-04 15:32:42 +02:00
Pavel Hrdina 95d1275f57 domcapabilities: get list of CPU models from domcapabilities
Currently we just call libvirt API which will return all CPU models for
specific architecture known to libvirt and we offer all of them to users
in GUI.  Let's switch to domain capabilities where we have more details
about these CPUs such as whether each model is usable with current QEMU
binary.  If libvirt can detect the usability we will offer only CPU
models that QEMU can actually run.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-19 13:41:53 +01:00
Erik Skultety 67acebc2b3 Fix a few issues reported by codespell
There were a few minor typos across the codebase which codespell pointed
out.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2019-03-18 13:04:53 -04:00
Pavel Hrdina 943b2a400e details: allow to remove video device if it's not the last one
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1659354

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-01-28 17:55:38 +01:00
Slavomir Kaslev a9092b6abe virt-manager: Add support for vsock device to Hardware Details UI
Add support for vsock devices to Hardware Details UI so that vsock devices can
be configured or removed.

Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
2019-01-06 18:27:17 -05:00
Cole Robinson d39b7d1079 details: Fix launching wrong window for duplicate VM name (bz 1630220)
https://bugzilla.redhat.com/show_bug.cgi?id=1630220
2018-10-13 17:16:21 -04:00
Lin Ma 280b78c96a details: Add SCSI persistent reservation support for LUN Passthrough
It's a common requirement for VMs to send SCSI PR commands in VM cluster
environment. This patch adds the managed mode support of scsi persistent
reservation in details page.

Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Cole Robinson 0638e72f1f Remove 'Choose CD', rework details and create media change
The new UI is handled in mediacombo. It's a combobox+entry. The
combobox is prepopulated with host cdrom/floppy devices, and
previously used media paths from gsettings

The new VM wizard no longer has separate UI for cdrom device vs
ISO media. The choosecd dialog is gone all together, and media
is changed with the 'apply' button like all other details changes
2018-10-06 19:37:16 -04:00
Cole Robinson 9edca3486a virt-manager: Wire up support for default mode=host-model
Simplify things a long the way
2018-10-04 14:43:44 -04:00
Cole Robinson b807cfa744 details: Handle qemu-xhci as USB3
And fix it in addhardware too
2018-10-04 09:53:36 -04:00
Cole Robinson b19f94299b details: Add OS name view/edit, + oslist rework
This is just a big nasty commit.

Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
2018-09-30 20:55:32 -04:00
Cole Robinson 7baa296aed details: Update IP addr UI after refresh_ip call 2018-09-06 14:04:00 -04:00
Lin Ma 838822b242 Fix error while refreshing ip if the virtual nic only has ipv6
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-06 13:49:12 -04:00
Lin Ma f2679df719 addhardware: Use consistent combo init for disk io mode option
Signed-off-by: Lin Ma <lma@suse.com>
2018-09-06 13:28:21 -04:00
Cole Robinson f499bc9638 details: Use browse mode for hw-list
Meaning a row can never be unselected. Drop some redundant code
afterwards
2018-09-05 19:37:55 -04:00
Cole Robinson a4d0d49d88 details: Centralize device row lookup 2018-09-05 19:20:23 -04:00
Cole Robinson b4b7c7b520 details: IP address fixes/improvements
* Tweak the UI
* Add accelerator for the refresh button
* Make the IP labels selectable
* Drop the IP prefix from the UI, it's not the important bit
* Call DHCPLeases on the network instead to support this for more
  drivers, like LXC
* Cache the IP results in the domain/network object wrappers
* Catch and log errors
* Poll for IP address when first visiting the interface page
2018-09-05 14:58:32 -04:00
Lin Ma 3bd582331e details: Show ipv4 and ipv6 address in details page of interface
If the interface's type is 'network', then code uses lease as one of
parameters of interface_addresses to get ipv4 and ipv6 address.
If the result is negative, then uses agent to try again, If the result
is still negative, uses arp for final try.

Signed-off-by: Lin Ma <lma@suse.com>
2018-09-05 12:33:11 -04:00
Cole Robinson 8aa01dab78 details: Remove UI display fields for egd RNG
In practice no one is using this, so it's not worth maintaining
specific UI to show its details
2018-09-04 14:55:04 -04:00
Povilas Kanapickas e6c7e46a54 details: Add support for disk detect zeroes option 2018-09-04 11:39:50 -04:00
Povilas Kanapickas d13b793bfa details: Add support for disk discard option 2018-09-04 11:39:50 -04:00
Cole Robinson fb1bb26373 support: Drop lots more checks
- Remove anything for less than qemu 0.12 or libvirt 0.10, basically
  rhel6 vintage stuff
- Open code some simple checks
- Remove some that are only used for unnecessary error reporting
2018-08-31 22:21:15 -04:00
Simon Kobyda ef4e0dbc4f details: ADD checkbox to plug/unplug network interface
Hardware Details -> NIC of every VM should now contain checkbox for
interface's link state. This checkbox edits domain's XML by changing
<link state='up/down'/>. If XML doesn't contain this tag, virt manager
assumes state "up".

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

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
2018-08-17 10:49:26 +02:00
Lin Ma a55761c593 details: Use _disable_device_remove helper to set the remove tooltip
Signed-off-by: Lin Ma <lma@suse.com>
2018-08-08 10:25:41 -04:00
Lin Ma 0c1fff2494 details: Disallow removing virtio-serial controller if devices attach to it
Signed-off-by: Lin Ma <lma@suse.com>
2018-07-31 10:57:56 -04:00
Cole Robinson 6099ca674e details: Add _disable_device_remove helper 2018-07-31 10:49:42 -04:00
Cole Robinson 5212ab992e details: Reset Remove tooltip on hardware selection
Otherwise it can be out of date

Reported-by: Lin Ma <lma@suse.com>
2018-07-31 10:37:50 -04:00
Lin Ma cacf2abe6b details: Show attached disk info in sata, ide and floppy controller page
Reflect controllers <-> disks mapping relationship for not only scsi,
But other storage controllers.

As a bonus, These controllers are not allowed to be removed if there are
disks attached to them.

Signed-off-by: Lin Ma <lma@suse.com>
2018-07-31 10:16:45 -04:00
Lin Ma 4484f473cd char: Track/Show the state of virtio channels in channel details
crobinso: Add a test case

Signed-off-by: Lin Ma <lma@suse.com>
2018-07-12 15:25:23 -04:00