Commit Graph

6246 Commits

Author SHA1 Message Date
Cole Robinson 314fb1a29a Prep for release 2.1.0 2019-02-03 16:26:44 -05:00
Cole Robinson f2baf4aeb7 tests: Skip another test if isoinfo is not installed 2019-02-03 16:18:50 -05:00
Cole Robinson 21465e2af7 create: Differentiate detection between cdrom and location
Behind the scenes there is a difference, like windows media won't
validate as a 'location' because it doesn't have a direct bootable
kernel/initrd.
2019-02-03 16:15:54 -05:00
Cole Robinson 921a604abe virt-install; Don't add os-variant storage for containers 2019-02-03 15:46:32 -05:00
Cole Robinson a391613b9f engine: More logging for --test-first-run 2019-02-03 15:46:32 -05:00
Cole Robinson 314ceab878 connectauth: Convert dialog to glade format 2019-02-03 15:23:05 -05:00
Cole Robinson 4b5cfe3cbb createvol: Fix showing backing store UI on first run (bz 1670266)
Whether we check for a vol-format value shouldn't be dependent
on whether the UI is on screen (is_visible), but whether the UI
is requested to be shown (get_visible)

https://bugzilla.redhat.com/show_bug.cgi?id=1670266
2019-02-03 12:37:41 -05:00
Cole Robinson 39bb8968d0 virt-install: add --location LOCATION,kernel=X,initrd=X
Add kernel= and initrd= --location suboptions. These can be
used to override the default kernel/initrd and specify new
paths, relative to LOCATION.

For example, if you have an ISO that libosinfo doesn't know
about called my-unknown.iso, with a kernel at 'kernel/fookernel'
and initrd at +'kernel/fooinitrd', you can make this work with:

--location my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd
2019-02-03 12:05:18 -05:00
Cole Robinson 27445527dc man: virt-install: Update --cdrom and --location docs
Drop a lot of outdated info and simplify things
2019-02-03 12:05:18 -05:00
Cole Robinson f55105180b urlfetcher: Don't print isoinfo errors to stderr
Like if passed an invalid --location iso file
2019-02-03 12:05:18 -05:00
Cole Robinson f035f313a4 osdict: Absorb get_kernel_url_arg from urldetect
Since nowadays it's entirely a function of the detected OS name
2019-02-03 12:05:18 -05:00
Cole Robinson 41b276ffcd installertreemedia: Don't carry around _Distro internally
Detect the distro, and pull out all the data we need into an internal
cache. This will simplify future improvements
2019-02-03 12:05:18 -05:00
Cole Robinson bcb13bfbfa tests: test_urls: Add some additional failure cases 2019-02-03 12:05:18 -05:00
Cole Robinson f7619cdcda tests: test_urls: Use installer, not _Distro directly 2019-02-03 12:05:18 -05:00
Cole Robinson 137be83232 cli: Use VirtCLIParser for --location
No-op change for now, just adds a default subopt location=. But
more subopts will be added in the future
2019-02-03 12:05:18 -05:00
Cole Robinson 71c9ff487a installer: Modernize the docstring 2019-02-03 12:05:18 -05:00
Cole Robinson c20e78926b installer: Drop check_location
detect_distro does it all already nowadays, so there's no
real reason to have a separate entry point.
2019-02-03 12:05:18 -05:00
Cole Robinson 4b54b281b9 setup: Remove vestiges of test_urls --path option 2019-02-03 12:05:18 -05:00
Cole Robinson b4cddb338b urldetect: Fix rhel8 detection
Internally rhel8 versions are now 8.0.0, so adjust our version check
2019-02-03 12:05:18 -05:00
Cole Robinson 665607fdc2 urldetect: Add a class for libosinfo detection
If an ISO path is used for --location, prioritize asking libosinfo
for the os_variant and kernel/initrd paths.

This fixes some instances that we lost when GenericDistro was dropped,
like using various netinst/boot.isos around

Example: https://github.com/virt-manager/virt-manager/pull/39
2019-02-03 12:05:18 -05:00
Cole Robinson 2b4e1cadf3 osdict: Rename lookup_os_by_media to guess_os_by_iso
And have it return the media object up to the caller
2019-02-03 12:05:18 -05:00
Cole Robinson 3d8b41c7bb urldetect: Renaming Distro to _DistroTree
And all child distros to match. 'Distro' is too generic, and
now they can be made private
2019-02-03 12:05:18 -05:00
Cole Robinson 7f5a969afc clitest: Replace skip_check with skip_cb
So we can return a message to help debug why tests were skipped
2019-02-03 12:05:18 -05:00
Cole Robinson 5df6bc2ba5 test_urls: Drop comparison against _Distro class
Future changes to use libosinfo more are going to break
this. Comparing against detected os_variant should be
mostly sufficient
2019-02-03 12:05:18 -05:00
Cole Robinson 9e4287321f urlfetcher: Drop explicit prepare/cleanup calls
We can do this automatically easily enough. The downsides of
not cleaning up are pretty minor these days anyways without
the 'mount' handling
2019-02-03 12:05:18 -05:00
Cole Robinson 9995ebc86b urldetect: Kill acquireKernel
Decompose it into a helper to probe for available kernel paths, but leave
the actual file fetching up to the installer class
2019-02-03 12:05:18 -05:00
Cole Robinson e2edcc559d urldetect: Fix comment typo 2019-02-03 12:05:18 -05:00
Cole Robinson e1568e39a3 urlfetcher: Simplify make_full_url 2019-02-03 12:05:18 -05:00
Cole Robinson 012a4e8ef5 urldetect: Centralize _get_kernel_url_arg implementation
Future changes will make more use of libosinfo, which means we
won't end up in some of the *Distro classes. So move the
get_kernel_url_arg logic into the parent Distro class, so it's
more easily shared.
2019-02-03 12:05:18 -05:00
Cole Robinson 66e89f020b urldetect: rename _set_kernel_paths to _set_manual_kernel_paths 2019-02-03 12:05:18 -05:00
Cole Robinson a7be538003 urldetect: Centralize setting _kernel_paths from treeinfo 2019-02-03 12:05:18 -05:00
Cole Robinson 79345369a7 urldetect: Add _set_kernel_paths class override
All __init__ calls essentially are just filling in _kernel_paths.
Make it explicit
2019-02-03 12:05:18 -05:00
Pino Toscano bce4cc4ef8 inspection: fix check of null icon
Recently the Python binding of libguestfs was adapted to properly use
bytes in APIs that return data, instead of (ab)using strings [1].
This change was done only when built for Python 3, which has this
distinct bytes and strings.

Because of that, now the 'icon == ""' (empty string) checks fail, using
whatever inspect_get_icon() returns, including empty arrays of bytes.
Hence, change the checks to use the length of the data as condition, as
also the libguestfs Python API documentation says.  Leave also the
checks for None, in the remote case the API will return None in the
future for no data.

[1] 0ee02e0117
2019-01-30 18:06:26 -05:00
Cole Robinson e79143f3a6 setup.cfg: Drop unicode, it upsets CI 2019-01-30 18:01:20 -05:00
Cole Robinson a9f818b44b pycodestyle: Only use format=pylint from setup.py
Don't force it on users who are running the tool manually
2019-01-30 17:25:14 -05:00
Cole Robinson 8502b84dbd Move tests.pycodestyle.cfg to setup.cfg
This makes manual pycodestyle calls pick up our project config
2019-01-30 17:25:14 -05:00
Cole Robinson 90603cdc6e Move tests/pylint.cfg to pylintrc
This makes manual pylint calls pick up our project config
2019-01-30 17:25:14 -05:00
Ken Dreyer fe2564530a doc: update Fedora versions
Fedora 20 and 25 are end-of-life. Update to a modern Fedora version.
2019-01-29 10:37:59 -05: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
Cole Robinson 9b2e6886d0 disk: Fix virt-xml --add-device --disk size=X 2019-01-22 10:32:23 -05:00
Christian Borntraeger c82042245b virt-install: fix SLES11 installation on s390x
self._os_variant returns sles11sp4 sles11sp3 and so on.
Lets match those as well to pickup the right kernels.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2019-01-21 15:41:24 -05:00
Kenyon Ralph 957815397d virt-install.pod: make example command match commentary
The example commentary says Fedora 20, so make the command line match that.
2019-01-21 16:01:02 +01:00
Lin Ma eadb5b6193 vsockdetails: Show CID for active VM if the attribute auto is set to yes
Signed-off-by: Lin Ma <lma@suse.com>
2019-01-21 13:49:56 +01:00
Slavomir Kaslev 63db4de0b5 Remove Author lines from files
Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
2019-01-15 13:55:53 -05:00
Pavel Hrdina ad77f4fe83 createnet: fix typo introduced by commit dae8642bb
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-01-15 15:55:44 +01:00
Pavel Hrdina 14033113a4 cli: fix typos in virt-install --help output
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1533015

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-01-15 14:47:01 +01:00
Lin Ma bbe4866127 cli: Add function cli_flag_name and use it
It can convert the underscore to minus for cli_arg_name in help
output or error message.

Signed-off-by: Lin Ma <lma@suse.com>
2019-01-14 10:40:54 -05:00
Cole Robinson 7228867480 diskbackend: Fix backtrace cloning with block storage (bz #1661986)
https://bugzilla.redhat.com/show_bug.cgi?id=1661986
2019-01-10 12:58:43 -05:00
Marc Hartmayer a7ee1b3801 cli: Fix __init_class__
For Python versions < 3.6 it's not possible for the metaclass to call
a method in the defined class that uses super() before it is done with
its __new__ and __init__. Therefore let's workaround this by using
hard coded class names instead of super() in __init_class__. See
https://stackoverflow.com/a/28605694 for more details.

In addition, add missing __init_class__ call to the __init_class__
implementation of _ParserChar.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
2019-01-09 10:04:14 -05:00
Cole Robinson 069653b744 osdict: Drop -unknown mapping for ISO media detection
This was originally added for fedora to give better names in the UI,
but that's a loose reasoning IMO. The pattern was extended to
other -unknown distros but instead of maintaining that going
forward I'd rather just remove the magic for it.
2019-01-08 16:02:34 -05:00