This type of validation should really be done at the libvirt level,
particularly for a non-mandatory feature like cpuset. Otherwise
it's just more code for us to test which will rarely be hit by users
Remove the PRETTY_NAME for SuseDistro so it isn't included in the allstores.
Add appropriate identifiers to the other Suse classes so that they
are included in allstores.
If cache.treeinfo_family_regex fails to find the family but there is
a .treeinfo file, self.cache.suse_content is set to -1 when a failed
attempt is made to find a content file. Check for -1 in the __init__
function so we will pull the kernel from the location in .treeinfo file.
Signed-off-by: Charles Arnold <carnold@suse.com>
Old versions of the string from the content file end with just "openSUSE".
openSUSE 42.x has a string of "openSUSE Leap ". Cleanup extra whitespace
for old versions of openSUSE.
Signed-off-by: Charles Arnold <carnold@suse.com>
The while loop that follows is similar to rhel code but because the osinfo-db
short id for sles doesn't contain a '.0' for first time releases (eg, sles11,
sles12) we check sle with no update and don't add a '.0' to the string.
Signed-off-by: Charles Arnold <carnold@suse.com>
The current OS distro selection UI is fairly cumbersome to use. First
you need to decide on a variant, then decide a distro and then look for
the version you want. The list is filtered by default so only a subset
of OS are displayed. So for less common distros you'll then need to
start again and tell it to show all OS to try to find the one you want.
The core problem is that we have an incredibly large list and want to
make it easy for the user to find a specific entry. The modern UI
paradigm for this problem is to provide interactive search with
live updated results. The current UI does provide an interactive search
facility on the OS version results, but you still have to first select a
variant to be able to use the search which is unhelpful.
This patch attempts to better apply the search UI design to the OS selection
problem. We get rid of the notion of variants, distros and version, and
provide a single text entry box in which the user can type a few letters
of the OS name. As they type, a popover displays the matching results
filtered on OS name. By default end of life OS will be hidden, so in
general there will only be a small handful of results left after just
typing a few characters. This makes it very quick to find and select the
desired OS, without needing to provide a mutli-step navigation hierarchy.
https://bugzilla.redhat.com/show_bug.cgi?id=1464306
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(crobinso: fix some pylint)
If --location is an ftp url with a username and password
then virt-install fails to install with an error:
ERROR Error validating install location: Opening URL u failed: 530 Login
incorrect..
SUSE distros will be growing treeinfo support soon and trying to handle
this logic through class inheritance is difficult, so separate the
logic into its own function
The copyright headers in every file were chjanged in this previous commit
commit b6dcee8eb7
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Mar 20 15:00:02 2018 -0400
Use consistent and minimal license header for every file
Where before this they said "
"either version 2 of the License, or (at your option) any later version."
Now they just say
"GNU GPLv2"
This fixes it to say "GNU GPLv2 or later" again.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Lookup the domain capabilities CPU model and compare with
the host capabilities CPU model and if they are not equal
set the guest's CPU model to None.
(crobinso: compare against 'custom' list not 'host-model', move
to separate function)
Add functionality to acquire the CPU model from the
libvirt domain capabilities. This is used to compare
with the host CPU model.
(crobinso: add test coverage, rework domcaps layout a bit)
Add an external caching layer that handles tracking all data we
need as part of distro URL detection that is also needed during
distro __init__. This way we can make is_valid() static and quick,
and move all the variant hackery cleary into __init__ routines.
This makes the code logic much easier to follow
It's not wired up to anything which looks like it got dropped in
an older refactoring. I can't find from the mailing list what
media case this was required for, and my local test suite doesn't
need it, so it might not even be required anymore.
Just have one kernel path list, and if type=="xen" and we think
xen might have its own kernel path, prepend that to the list of
pairs to check.
Nowadays xen kernel == hvm kernel for new distros, so we shouldn't
force having a specific xen whitelist
non-treeinfo redhat only applies to pre RHEL5.4 and very old
Fedora. It's not worth it anymore to slow down all URL lookups
and maintain code complexity to handle such long out of date
distros.
GenericDistro doesn't actually apply to any public trees that I
can find, except for some with TreeInfo. So turn it into
GenericTreeinfoDistro. If random URL trees want to work with
virt-install, add a treeinfo file
There's lots of hacks stuffed into the domain device lists. Formalize
some of it, move some of the specific stuff to details.py, and drop
a lot of the needless API wrappers