Commit Graph

6649 Commits

Author SHA1 Message Date
Cole Robinson
b34800decd util: Move local_libvirt_version to VirtinstConnection
Make it private because we want people to use
conn.local_libvirt_version, and adjust the one other user
2019-06-07 17:15:10 -04:00
Cole Robinson
7d17d5d03b virtinst: Run register_libvirt_error_handler on import
We basically want this everywhere, and transparently, so run it on
import like we do for gettext setup
2019-06-07 16:56:57 -04:00
Cole Robinson
ca10e4094b util: move is_error_nosupport to SupportCache 2019-06-07 16:49:19 -04:00
Cole Robinson
ecc3e3d34e support: add is_libvirt_error_no_domain
Repurpose the generic util.exception_is_libvirt_error for the one
purpose that it's actually used, add it as a SupportCache staticmethod,
and test it
2019-06-07 16:44:14 -04:00
Cole Robinson
f85e6def55 support: Convert callers to the new format 2019-06-07 16:26:03 -04:00
Cole Robinson
566a4681a8 support: Rework support check invocations
SupportCache.check_support(SUPPORT_FOOBAR, args) becomes
SupportCache.foobar(args)

And SupportCache absorbs the caching infrastructure from
VirtinstConnection.

For now we add some hackery to hide the API change from callers, but
this will be undone in the next patch
2019-06-07 16:25:39 -04:00
Cole Robinson
3d2f678c0f support: Add a SupportCache class
For now it just contains all the SUPPORT ID numbers and public
functions.
2019-06-07 15:56:23 -04:00
Cole Robinson
281e796538 connection: Use weakref.proxy instead of weakref.ref
Works more like expected, let's us drop a hack in devicedisk
2019-06-07 15:53:36 -04:00
Cole Robinson
657c729f08 installertreemedia: Clarify scratchdir logic a bit 2019-06-07 14:13:25 -04:00
Cole Robinson
2a4a03e37a util: Move scratchdir helpers to InstallerTreeMedia
They are only really needed by the Installer handling
2019-06-07 14:00:00 -04:00
Fabiano Fidêncio
fd5bd5d90f installer: Prefer "cdrom" over "floppy"
Instead of using "floppy" as the way to perform unattended installations
for Windoes, let's prefer using "cdrom" instead.

The main reasons behind this change are:
- VMs using q35 may have floppy device disabled in some systems;
- We can drop mstools dependency;

Generating the ISO depends on genisofs, tho. However, it's not a big
deal as genisofs is already a virt-manager dependency.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-06-07 13:41:57 -04:00
Fabiano Fidêncio
473f5c14d6 installer*.py: Remove temporary dirs
Together with the temporary files removal, let's also remove the
directories created to store those files.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-06-07 13:41:57 -04:00
Fabiano Fidêncio
2dd006d6f2 installer: Log when cleaning up the unattended files
Similarly to what's already done in installertreeinfo.py, let's log when
removing the files used during the unattended installation.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-06-07 13:41:57 -04:00
Fabiano Fidêncio
98bd275969 unattended: Do not create a "unattended" dir
Let's just use mktemp() as done in several other places and avoid the
risk of having the content of the folder overwritten in case of parallel
installations.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-06-07 13:41:57 -04:00
Cole Robinson
e58d765ae5 tests: xmlconfig: Add tests for real uuid and mac generation 2019-06-06 18:35:36 -04:00
Cole Robinson
2bd08bee64 util: Move generate_uuid to a Guest staticmethod 2019-06-06 18:24:23 -04:00
Cole Robinson
f4f8cfb33b util: Remove validate_macaddr
Libvirt does this for us
2019-06-06 18:11:01 -04:00
Cole Robinson
f47f6f3c7c util: Replace xml_indent with textwrap.indent 2019-06-06 18:11:01 -04:00
Cole Robinson
50addfebca nodedev: Drop the non-standard .parse() handling 2019-06-05 16:35:34 -04:00
Cole Robinson
ab0c99057b nodedev: Fold DRMDevice into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
87b2ea4672 nodedev: Fold SCSIBus into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
8d13125564 nodedev: Fold StorageDevice into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
eeb7babef7 nodedev: Fold SCSIDevice into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
cf3bc3eb3b nodedev: Remove unused USBBus parsing 2019-06-05 16:35:34 -04:00
Cole Robinson
b7ac99473d nodedev: Fold USBDevice into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
a0881bc6f2 nodedev: Fold PCIDevice into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
ca804c5b5e nodedev: Fold NetDevice into NodeDevice 2019-06-05 16:35:34 -04:00
Cole Robinson
966b0b5a6b nodedev: Drop cap 'system' parsing
We don't use it for anything internally
2019-06-05 16:35:34 -04:00
Cole Robinson
9e56169813 connection: Drop unused filter_nodedevs devcap value 2019-06-05 16:35:34 -04:00
Cole Robinson
8221061ec5 domain: Absorb conn.get_nodedev_count
It's the only user
2019-06-05 16:35:34 -04:00
Cole Robinson
d167021b0f osdict: Drop the solaris10 x2apic hack
The upstream kvm bug has never been resolved. I think this is
obscure enough nowadays that we don't need to track and test it
2019-06-05 16:35:34 -04:00
Cole Robinson
2510c299f5 Use shutil.which instead of distutils find_executable
The former is the more standard library method for this
with python3
2019-06-05 16:35:34 -04:00
Cole Robinson
d2462367ee virt-manager: Add --test-options
Will take a string of comma separated options which we can use to
tweak app behavior, for testing. Convert the existing --test-* options
to use the same abstraction internally. This will make it easier to
add new test options in the future
2019-06-05 16:28:05 -04:00
Cole Robinson
d65f54dc9d uitests: Enable accessibility if it's turned off 2019-06-05 16:28:05 -04:00
Cole Robinson
09b0caec42 uitests: More work to fix newvm.py flakiness 2019-06-05 16:22:41 -04:00
Cole Robinson
3734148b8c uitests: Improve click() onscreen handling 2019-06-05 12:27:03 -04:00
Cole Robinson
85f5b18a08 uitests: Improve mediachange assertion check 2019-06-05 12:26:35 -04:00
Cole Robinson
72dd4c8f83 config: Disable libguestfs inspection with --test-first-run
Adds some non-determinism to the active tests and pollutes the logs
2019-06-05 11:15:28 -04:00
Cole Robinson
f2304664d6 snapshots: Split out vmmSnapshotNew class
Simplifies code org
2019-06-05 11:15:28 -04:00
Cole Robinson
318e0c0a39 vmwindow: Clean up vmmDetails on window cleanup 2019-06-05 11:13:33 -04:00
Cole Robinson
87a73b07e2 installer: Remove cdrom by path, not device handle
The latter doesn't play well with Customize wizard XML editing, which
recreates objects
2019-06-05 11:13:33 -04:00
Cole Robinson
d6e241897f createpool: Fix a couple gtk stderr warnings 2019-06-05 11:13:33 -04:00
Cole Robinson
bc232eb8de devices: disk: Drop DIR+floppy validation
Libvirt already gives us a similar warning at parse time, this is
obscure enough that we don't need to catch it upfront
2019-06-05 11:13:33 -04:00
Cole Robinson
08b26e9b1c devices: disk: Add tests for missing _storage_backend 2019-06-05 11:13:33 -04:00
Cole Robinson
f22a0ec2e4 xmlbuilder: Add replace_child
This will be used for UI XML editing of devices
2019-06-05 11:13:33 -04:00
Cole Robinson
5e7322edca libvirtobject: Make _redefine overrides more clear 2019-06-05 11:13:33 -04:00
Cole Robinson
78526aea74 man: virt-install: mention <iothreadids> too 2019-06-04 14:17:45 -04:00
Athina Plaskasoviti
27a51b2210 cli: Add --iothreads iothreadids.iothread[0-9]*.id
XML Mapping:

<domain>
...
<iothreadids>
  <iothread id="X"/>
  ...
</iothreadids>
...
</domain>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-06-04 14:17:01 -04:00
Cole Robinson
fe20c4c96e man: virt-install: Document --iothreads 2019-06-04 10:58:31 -04:00
Athina Plaskasoviti
8c708210db cli: Add --iothreads
XML Mapping:

<domain>
...
  <iothreads>X</iothreads>
...
</domain>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-06-04 10:58:31 -04:00