Commit Graph

6106 Commits

Author SHA1 Message Date
Lin Ma e7e6f873cc virt-convert: Add auto complete support for the general options
Signed-off-by: Lin Ma <lma@suse.com>
2018-12-18 11:20:35 -05:00
Lin Ma 4b09a26578 virt-xml: Add auto complete support for the general options
Signed-off-by: Lin Ma <lma@suse.com>
2018-12-18 11:20:35 -05:00
Lin Ma 38f375cf27 virt-clone: Add auto complete support for the general options
Signed-off-by: Lin Ma <lma@suse.com>
2018-12-18 11:20:35 -05:00
Lin Ma f6076a0eb0 virt-install: Add auto complete support for the general options
With this patchset, the general options completion is available. ex:

$ virt-install -<TAB><TAB>
...
--arch      --check     --cpu       --dry-run   -h
--autostart --clock     --cputune   --events    --help
...

$ virt-install --a<TAB><TAB>
--arch       --autostart

Signed-off-by: Lin Ma <lma@suse.com>
2018-12-18 11:20:35 -05:00
Lin Ma d68f0f8867 cli: Add the generic completer function and validator function
The patch adds the generic completer and validator, Further patches use
them as completer/validator. The completer won't add already specified
options to the list.

Signed-off-by: Lin Ma <lma@suse.com>
2018-12-18 11:20:35 -05:00
Cole Robinson a8d4c7cb79 cli: Fix --security baselabel=X 2018-12-17 09:06:03 -05:00
Cole Robinson b91393e6c3 cli: s390x+graphics specified, use video=virtio (bz #1654994)
s390x doesn't support any of the PCI graphics cards

https://bugzilla.redhat.com/show_bug.cgi?id=1654994
2018-12-13 16:39:43 -05:00
Slavomir Kaslev 0889c7c7e4 virt-manager: Fix misspelling caught by codespell
Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
2018-12-10 10:43:55 +08:00
Fabiano Fidêncio ee0ac5f2c7 osdict: adapt latest_os_version() to ignore "-unknown" distros
As some enterprise distros adopted the "unknown" approach in osinfo-db,
and those usually support different versions at the same time, there may
be different "unknown" entries (like rhel-unknown, rhel-8-unknown,
rhel-7-unknown, and so on) for the very same distro.

This situation can easily happen when some ISO matches, for exmaple,
"rhel-unknown" and then the latest one selected would be
"rhel-8-unknown".

In order to avoid this situation from happening, let's just ignore the
"unknown" entries when calling latest_regex().

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-12-05 15:04:59 +01:00
Fabiano Fidêncio fbcea0b63c osdict: adapt latest_regex() to openSUSE's versioning
Due to OpenSUSE's decision of versioning their OS as 11.x, 12.x, 42.x,
15.x, we have to add a specific check in latest_regex() in order to make
sure we skip the 42.x series in the sorted list of OSes when returning
the OS name to the user.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-12-05 15:04:59 +01:00
Fabiano Fidêncio 7612c5bdcd osdict: expand the "unknown" check for any distro
Currently osinfo-db has "unknown" entries for fedora, opensuse and
asianux. Considering this list may grow even more at some point, let's
just make the check more generic and use it for all of them instead of
keeping it for fedora only.

Changes have also been done in urldetect and tests_url, as those also
used latest_fedora_version().

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2018-12-05 15:04:59 +01:00
Miro Hrončok 5f5b49f289 https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 2018-11-15 13:28:45 -05:00
kalebskeithley c30b3bc611 Update create.py
100 is a bit too short for managing/creating vms over the corporate VPN. About half the time it times out and I have to exit the virtmgr app and restart it to see the new vm.
2018-11-15 12:05:36 -05:00
Lukáš Doktor 30b7c33c6d virt-install: Fix guest-os deprecation msg
Arguments to logging needs to be individual args, otherwise it
fails with "not enough arguments for format string"                             

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2018-11-14 18:25:06 +01:00
Andrea Bolognani d2d103a334 virt-xml: Start using --os-variant
The option only works with --add-device for the time being,
so we prevent its use in all other cases.

It would be nice to have it work with --build-xml too, but
in that case the user would have to provide some extra
information that in the case of --add-device we can figure
out from the existing guest, and it's not entirely clear
whether that would even be that useful, so for now we're
not considering that case at all.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-13 12:15:50 +01:00
Andrea Bolognani b882dbde9c tests: Add some tests for virt-xml with KVM
We're mostly interested in how the default bus/model for
devices are influenced by knowledge about the guest OS, but
since the whole thing requires to be connected to the QEMU
driver we might as well create a new category and leave room
for more QEMU-specific tests being added down the line.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-13 12:11:09 +01:00
Andrea Bolognani ade53764fc virt-xml: Accept --os-variant option
We're not doing anything with it yet, but having the
parser accept it means we can write tests and see how
their output changes once we wire it up in earnest.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-13 12:08:46 +01:00
Andrea Bolognani 751fb88c58 virt-install: Add "Guest OS" options group
The --os-variant option doesn't quite fit perfectly into
its current "Installation method" group, plus we want to
add the same option to virt-xml which can't have that
group for obvious reasons.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-12 16:15:33 +01:00
Andrea Bolognani a550a95727 virt-install: Fix description for --os-variant
Since we're messing with it either way, might as well use
modern OS names as examples.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-12 16:15:33 +01:00
Radostin Stoyanov f53e5b024d progress: Remove commented out code
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 45d76ccadd progress: Resolve protected-access
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 0505f2be3d progress: Resolve E226
E226: missing whitespace around arithmetic operator

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 48255ea584 progress: Don't use black-listed name 'bar'
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 6a66d8cce0 progress: Resolve E502
E502: the backslash is redundant between brackets

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 5e6b73d439 progress: Resolve E501 and E305
E501: line too long (82 > 79 characters)
E305: expected 2 blank lines after end of function or class

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov e7a3a55f2d progress: Resolve E231
E231: missing whitespace after ‘,’, ‘;’, or ‘:’

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov a7254aa006 progress: Resolve E129
E129: visually indented line with same indent as next logical line

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 19b3d2ac66 progress: Resolve E714
E714: test for object identity should be ‘is not’

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 6d125cca72 progress: Resolve E265
E265: block comment should start with ‘# ‘

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 3468a2ec1f progress: Resolve E722
E722: do not use bare except, specify exception instead

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov c3453422f2 progress: Resolve E261
E261: at least two spaces before inline comment

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov cd1a46c2ae progress: Resolve E701
E701: multiple statements on one line (colon)

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 9a472f506d progress: Resolve E221
E221: multiple spaces before operator

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov ed98a29dda progress: Resolve E302
E302: expected 2 blank lines

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov b7c7c27f7c progress: Resolve W0201
W0201: Attribute %r defined outside __init__

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Radostin Stoyanov 5b1f6ad2b8 pylint: Don't exclude progress.py
Currently progress.py file was excluded from pylint/pycodestyle check
because the code was straight from python-urlgrabber and it was not
PEP8 compliant. The following patched resolve the code style issues.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2018-11-12 08:34:55 -05:00
Martin Kletzander 9308bae310 util: Fix typo vpcu -> vcpu
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2018-10-22 15:05:30 +01:00
Cole Robinson 25b8873340 urldetect: Don't overload suse_content variable
Use an explicit check_for_suse_content variable rather than
stuffing -1 into suse_content
2018-10-18 17:16:14 -04:00
Cole Robinson 49f469a034 test_urls: Always check for distro value 2018-10-18 13:43:12 -04:00
Cole Robinson cd122b9387 test_urls: Drop dead code
This is solved by the "testsuite-fedora-rawhide" hack
2018-10-18 13:36:16 -04:00
Cole Robinson fe9aa7085b test_urls: Add kernelregex= option
For verifying detected kernel paths. Add a few basic examples. I
will use this in my local iso test suite for checking debian
iso vs http-iso case
2018-10-18 13:21:44 -04:00
Johannes Tiefenbacher b8aff28087 virtinst: quickfix ubuntu net-preseed insert cdrom error
the proper kernel/initrd pair for booting from an http server is found in install/netboot/... on a mounted ubuntu iso.
this last worked in v1.4.2

Discussion: https://github.com/virt-manager/virt-manager/pull/34

(crobinso: add the fetcher.is_iso handling and add a comment)
2018-10-18 13:21:41 -04:00
Cole Robinson 943f1d4bc2 Prep for release 2.0.0 2018-10-15 08:34:18 -04:00
Cole Robinson e127d5e269 tests: inject: use qemu system, not session
system will give us vol upload coverage
2018-10-14 19:06:06 -04:00
Cole Robinson 1b24ce455c tests: urls: Update for latest osinfo data 2018-10-14 17:09:48 -04:00
Cole Robinson 369cf6774b guest: Don't add spicevmc channel if virtio not supported
Not that big of a deal for linux guests, but will add ?
devices on windows
2018-10-14 12:29:33 -04:00
Cole Robinson 9be5fec593 tests: inject: fix some pylint 2018-10-13 17:54:07 -04:00
Cole Robinson b051b6c95d cpu: Have host-copy use domcaps if qemu is new enough (bz 1637767)
capabilities is known problematic. Use domcaps if libvirt+qemu
reports working host-model

https://bugzilla.redhat.com/show_bug.cgi?id=1637767
2018-10-13 17:48:25 -04:00
Cole Robinson 535e34481d libvirtobject: Add is_X object type helpers 2018-10-13 17:23:18 -04: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