Commit Graph

211 Commits

Author SHA1 Message Date
Fabiano Fidêncio
6c7d765c60 osdict: Add get_network_install_resources()
get_network_install_resources() is going to be used when performing a
network based installations where more RAM is needed during the
installation time than the recommended one, which is the case of some
distros as CentOS, RHEL, (some versions of) Silverblue and (some
versions of) Fedora.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-28 15:56:44 -04:00
Cole Robinson
97a5af1e43 urldetect: Use libosinfo for tree detection too
Ask libosinfo for tree detection, but still fall back to our
own implementation if libosinfo fails
2019-03-24 12:27:46 -04:00
Andrea Bolognani
708af01c14 osdict: Add supports_virtioinput()
We can use this function to figure out whether the guest OS
supports VirtIO input devices (virtio-tablet, virtio-keyboard
and virtio-mouse).

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-03-21 15:31:20 +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
Cole Robinson
049a735eb2 osdict: Prefix some errors messages with 'OS'
Otherwise it's not entirely clear what we are refering too
2019-03-08 17:26:46 -05:00
Fabiano Fidêncio
db6161c610 osdict: Deal with medias' installer scripts
As medias may also have installer scripts associates to themselves and,
in this case, those should be considered instead the OS ones.

More than that, Libosinfo.Media provides an API that tells whether that
specific media supports installer scripts or not and this must be
checked as the first thing. In case no installer script is supported,
let's just error out and abort the installation.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-08 17:11:30 -05:00
Fabiano Fidêncio
93d3223c87 unattended: Pass the media down to get_install_script()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-08 17:11:10 -05:00
Fabiano Fidêncio
fbcfc2147d osdict: Refactor get_install_script()
Let's refactor get_install_script() in a way that any addition done in
order to get the install scripts from the media would be cleaner.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-08 17:11:02 -05:00
Andrea Bolognani
c2bcb9e5a6 guest: Add supports_virtioscsi()
This is similar to the existing supports_virtio*() functions,
but for virtio-scsi.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-03-06 14:00:11 -05:00
Cole Robinson
49ae679702 osdict: Report available profile names on error 2019-03-05 16:38:22 -05:00
Cole Robinson
9dd758dee8 osdict: Add a helper for iterating over osinfo lists 2019-03-05 16:38:22 -05:00
Cole Robinson
402a95bb31 osdict: Improve some errors for OS 'generic' 2019-03-05 16:38:22 -05:00
Cole Robinson
0031d15098 virtinst: move OSInstallScript to unattended
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-05 16:38:22 -05:00
Cole Robinson
a8d0fb5a38 osdict: Don't lowercase gi imports
It's a pointless divergence
2019-03-05 16:38:22 -05:00
Cole Robinson
cb9d610a05 osdict: Move OSDB definition closer to _OSDB class 2019-03-05 16:38:22 -05:00
Cole Robinson
6537659ea6 osdict: Add OSInstallScript class
To wrap Libosinfo.InstallScript interactions
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
3f942f7385 osdict: Add methods for generating the script and its cmdline
generate_install_script_output() generates the install script,
accordingly to the config passed, in a specific directory.

generate_install_script_cmdline() generates the kernel command line that
has to be used in order to perform the unattended installation.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
72d93ee7d8 osdict: Add set_install_script_installation_source()
As some of the install scripts may act differently depending on whether
the installation is going to be done via the OS media or via network
let's have a wrapper around set_installation_source(), from
Libosinfo.InstallScript, in order to be able to properly set which is
going to be the used installation source.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
68640f3401 osdict: Add set_install_script_preferred_injection_method()
As not all unattended installations will be done by the same method,
let's have a wrapper around set_preferred_injection_method(), from
Libosinfo.InstallSript, in order to be able to properly set which is
going to be the preferred injection method for a script.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
929adeb654 osdict: Properly set language and kbd layout for install script config
Let's try to guess the language and keyboard layout from the system's
language.

In case we can't do the guess, let's just let it be and libosinfo will
use the 'en_US' default for both language and keyboard layout.

There's a big issue here, though, that quite often users will *not* have
their keyboard layout matching with the language of their systems and,
unfortunately, I don't see any easy way to detect that unless we totally
rely on GLib.Settings (which, according to my understanding, we can't).

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
35da347e6d osdict: Properly set the timezone for the install script config
Let's try to guess the timezone from '/etc/localtime' and use it, if
possible. Otherwise, let's just let it be and libosinfo will use the
default 'America/New_York' one.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
5a17c04208 osdict: Add get_install_script_config()
get_install_script_config() method returns an OsinfoInstallScriptConfig
object that's tied to an OsinfoInstallScript object, already configured
based in the info provided by the user and it's ready to be used.

For now, the config will always set the timezome to 'America/New_York'
and the language and keyboard layout to 'en_US'.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Fabiano Fidêncio
8f991e3ea2 osdict: Add get_install_script()
get_install_script() method returns an installer script of a specific
profile type for a specific OS.

In case no OS is defined, None is returned.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-03-05 16:38:22 -05:00
Pino Toscano
9cd405b6ef osinfo: deal with rolling distros for EOL status
If a distribution has no EOL date set, always consider it supported if
its release status is "rolling".

(crobinso: reformat a bit, appease pylint)

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2019-02-19 15:57:21 -05:00
Cole Robinson
8139b3839e osdict: Raise exception on get_location failure
It's better to error immediately if we know this won't work
2019-02-18 10:56:38 -05:00
Fabiano Fidêncio
08d3a5786c osdict: add get_location()
get_location() is a new method that returns the osinfo-db tree URL of an
OS, according to the passed architecture.

This method will need some improvement later on once we start having a
specific set of definitions on osinfo-db about what's the type of the OS
we're dealing with (like Server, Desktop, ...).

For now, the new method returns the first URL found without taking into
the consideration the types speficied above.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-02-14 13:33:48 -05:00
Fabiano Fidêncio
071c885e84 osdict: Use identify_media() instead of guess_os_from_media()
guess_os_from_media() has been deprecated for a while and
identify_media() should be used instead.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-02-07 11:50:45 -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
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
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
Cole Robinson
2f89ecf4a9 Remove Author lines from file headers
Similar to what was done in libvirt. See these commits:

600462834f
c99e954973
2019-01-08 11:45:35 -05: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
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
Cole Robinson
edab908f42 guest: Use q35 chipset by default for new qemu + supported OS
There's been various discussions about changing the x86 default
from 'pc' to 'q35' over the years, but it's unlikely to happen
at the qemu or libvirt level for compatibility reasons. So
let's start using it for new enough OS that support it.
2018-10-13 14:58:57 -04:00
Cole Robinson
046a242bd4 guest: Use USB3 for x86 qemu if OS supports it
Using new annotations in osinfo-db
2018-10-03 19:02:07 -04:00
Pino Toscano
8227b820ee osinfo: warn when using deprecated osinfo IDs
At some point in the future it could be a good idea to drop the _aliases
mapping altogether; it will be hard to do so, in case the users are not
informed that they are using a deprecated ID.

(crobinso: Tweak format and message)

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2018-10-02 11:41:34 -04:00
Cole Robinson
760dc32bac osdict: Clarify comment about rhel virtio-serial hack 2018-10-01 11:39:58 -04:00
Cole Robinson
ff3d6c65d8 Fix some pep8 warnings 2018-10-01 11:37:28 -04:00
Cole Robinson
b2e7986c7b osdict: Switch device lookups to be ID based
I'm not positive device names will never change, but presumably the IDs
won't, so use them instead
2018-10-01 11:24:45 -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
65e1187c10 osdict: Add a helpful __repr__ 2018-09-30 09:37:14 -04:00
Cole Robinson
31e4b72a8b osdict: Drop Glib.Date API usage
Use python datetime instead, it's more python friendly
2018-09-29 15:22:44 -04:00
Cole Robinson
7356afcca7 osdict: Use USB tablet if no OS specified
Most OS users will be installing benefit from it, so make it the
default
2018-09-29 13:36:42 -04:00
Cole Robinson
86ef998023 guest: Lookup osinfo object from libosinfo metadata XML 2018-09-13 15:03:36 -04:00
Cole Robinson
2549e60698 guest: Add an entry point for setting machine=q35 default
We will want this at some point, but it's dependent on libosinfo
work
2018-09-12 15:35:49 -04:00
Cole Robinson
242844fefa osdict: Make the broken uefi+hyperv bit more explicit
And add links to the relevant bug reports
2018-09-04 14:55:40 -04:00
Cole Robinson
d5638eb140 osdict: Make qemu_ga support solely dependent on virtio-serial support
We shouldn't concern ourselves with whether the OS supports qemu_ga
out of the box, just set up the channel regardless, as long as
virtio-serial is supported.

This adds the channel for some aarch64 cases which didn't have OS
specified, but that's desired IMO
2018-09-01 13:23:01 -04:00
Cole Robinson
0f3b7fcc26 osdict: Make sure virtio1.0 matches virtio lookups
Right now this doesn't matter, but possibly a future OS will only
support virtio1.0, and osdict metadata might break us in that case
2018-09-01 13:23:01 -04:00
Cole Robinson
8a87c91888 osdict: Move default_netmodel logic to Guest
Make the entry point just return a list of libosinfo device names,
and have Guest choose the preference. This is more future proof
2018-09-01 13:23:01 -04:00
Cole Robinson
b902fbd54f osdict: Move default_videomodel to guest
It's not really osdict specific
2018-09-01 13:23:01 -04:00
Cole Robinson
717cd87b16 osdict: Add helpers for device filtering 2018-09-01 13:23:01 -04:00
Cole Robinson
4e63267a4f urldetect: Rename urldistro to matching_distros
Allow store classes to track multiple matching types, and use this
to ditch the custom urldistro logic in osdict altogether
2018-09-01 13:23:01 -04:00
Cole Robinson
9330548c3c osdict: Move EOL calculation to its own function 2018-09-01 13:23:01 -04:00
Cole Robinson
6ae8e51901 osdict: Remove unused functions 2018-09-01 13:23:01 -04:00
Cole Robinson
d8514e19c8 guest: Drop arm vexpress virtio-mmio support
This case will still work, but be a bit slower, which is fine. Nowadays
-M virt is much better for virt usage and nearly everyone is using that,
so save us the complication. This was really only useful when
bootstrapping arm virt support
2018-08-31 17:31:09 -04:00
Cole Robinson
e59c3d969e guest: Remove old xen acpi disabling
This is only for rhel5 vintage xen which is long out of support,
so drop it
2018-08-21 16:35:34 -04:00
Daniel P. Berrangé
d52d9885c8 Redesign OS distro selection UI to be faster to use
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)
2018-05-01 11:31:39 -04:00
Daniel P. Berrangé
48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
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>
2018-04-04 16:51:37 -04:00
Cole Robinson
fb9b82e02d urldetect: Clean up Fedora version checking a bit 2018-04-02 16:47:21 -04:00
Cole Robinson
b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Radostin Stoyanov
978fb25ac7 Wrap keys(), values() in a list
In Python 3 dict.values() [1] , dict.keys() [2] and dict.items() [3]
return a view [4] of the dictionary’s values, keys and items.

In Python 2 these functions return a list. [5] [6] [7]

To resolve this we can convert the result of these function to a list.

[1] https://docs.python.org/3/library/stdtypes.html#dict.values
[2] https://docs.python.org/3/library/stdtypes.html#dict.keys
[3] https://docs.python.org/3/library/stdtypes.html#dict.items
[4] https://docs.python.org/3/library/stdtypes.html#dict-views
[5] https://docs.python.org/2/library/stdtypes.html#dict.items
[6] https://docs.python.org/2/library/stdtypes.html#dict.keys
[7] https://docs.python.org/2/library/stdtypes.html#dict.values
2018-02-06 18:49:17 -05:00
Chen Hanxiao
7f1b4cee82 pycodestyle: fix all E125 warnings
Fix all E125:
     Continuation line with same indent as next logical line

   Also remove ignore options of E125

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-10-21 23:26:16 +08:00
Chen Hanxiao
c92aade081 pycodestyle: fix all E203 warnings
Fix all E203 whitespace before ':'
   Also remove E203 ignore option of pycodestyle

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-08-11 00:01:38 +08:00
Radostin Stoyanov
b93cc3bbc9 pycodestyle: Do not use bare 'except:'
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].

[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
Pino Toscano
7866cfec1b osdict: add "macos" type
Give macOS OSes an own type, so they have their own entry in the list of
OS types.
2017-04-27 15:57:40 -04:00
Pino Toscano
fa9ee6cd94 osdict: rename "unix" type to "bsd"
It really holds BSD OSes, so rename it to match the reality.
2017-04-27 15:57:40 -04:00
Pino Toscano
03c9a4ff41 osdict: expose the distro from OsVariant
This is used already internally a couple of times, and will be useful
outside as well.
2017-04-27 15:57:40 -04:00
Bryan Quigley
984ba6b33e osdict: Remove ubuntu vmvga usage
This is now removed in patches on Ubuntu, so seems no longer necessary.

virt-manager-1.3.2/debian/patches/virtinst/use_qxl_for_ubuntu.patch

That patch is also from Marc Deslauriers on 2016-01-28
2017-04-19 10:03:17 -04:00
Pino Toscano
6b23810733 virtinst: tweak distros in the 'supported' workaround
- pick only the latest version for centos6.x, centos7.x, and
  freebsd11.x; the latter two have only one element each currently,
  so this is preparing for future versions
- bump the minimum supported version of Fedora to 24
- enable also mageia >= 5, and centos >= 7.0, since they are supported

Hopefully in the future we can reduce these checks (maybe accepting
directly some families), but for now improve our hacks.
2017-04-13 14:20:02 -04:00
Cole Robinson
d62e975568 guest: Add default virtio-rng /dev/urandom (bz 1212082)
For guests that support it, per libosinfo, and new enough libvirt
to handle /dev/urandom. See the bug for discussion

https://bugzilla.redhat.com/show_bug.cgi?id=1212082
2017-03-08 17:26:19 -05:00
Cole Robinson
617b92710f osdict: Don't return virtio1.0-net as a valid device name (bug 1399083)
We can't depend on libosinfo device names being valid libvirt network
model names, so use a whitelist

https://bugzilla.redhat.com/show_bug.cgi?id=1399083
2016-12-13 12:58:14 -05:00
Guido Günther
a26c656d5c osdict: Debian8 onwards has qemu-ga 2016-10-31 09:07:33 -04:00
Cole Robinson
f55772845a osdict: Remove some pylint 2016-08-09 11:53:44 -04:00
Cole Robinson
1d2cd30677 osdict: Fix incorrect usage of virtio input
Regression reported with latest libosinfo, when the OS reports
virtio-input support:

http://www.redhat.com/archives/virt-tools-list/2016-July/msg00109.html

Really our code presently only cares about the USB tablet, so adjust
our libosinfo lookup to explicitly check for it
2016-07-29 13:17:36 -04:00
Andrew Cook
1421772e4e Disable x2apic for solaris 11
Same hack that 10 needs
2016-03-24 14:15:49 -04:00
Marc-André Lureau
ea1bd169c1 virtinst: use virtio if spice+gl
Use virtio+accel3d by default whenever spice+gl is chosen. This allows
to easily set up accelerated gpu VM.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-09 20:25:37 -05:00
Cole Robinson
8700fda757 urlfetcher: Fix ubuntu url detection with latest libosinfo 2015-11-24 21:59:23 -05:00
Cole Robinson
ac6c1df1ac osdict: Remove redundant os name lookup 2015-11-03 16:00:52 -05:00
Cole Robinson
b7e073a407 osdict: Disable x2apic for solaris10 (bz 1262093)
It breaks networking:
https://bugzilla.redhat.com/show_bug.cgi?id=1262093
https://bugs.launchpad.net/bugs/1395217
2015-11-03 16:00:52 -05:00
Cole Robinson
4057de13f2 osdict: Use qxl for newer ubuntu
Works better in my testing as explained in the comment
2015-09-23 18:10:40 -04:00
Cole Robinson
a538b69356 guest: Remove code for default virtio console
It's been disabled for a while and we don't plan on re-enabling it
2015-09-22 12:41:57 -04:00
Cole Robinson
cde2f0ef67 Suppress gi warnings about lack of require_version 2015-09-03 17:31:43 -04:00
Cole Robinson
55b43dcbb8 osdict: Fix unix alias
Needs to point to proper libosinfo name freebsd9.0
2015-08-10 13:01:04 -04:00
Pavel Hrdina
1590490fa3 capabilities: detect ACPI and APIC capabilites properly
Instead of hard-coding that ACPI and APIC are enabled by default, detect
their presence from libvirt capabilities and use it.

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

(crobinso: Adjust for recently added test case)

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:26:42 -04:00
Lin Ma
bbc4f83bd3 virtinst: enable qemu_ga for sles-11-sp4 and newer
Qemu guest agent becomes available since sles 11 sp4 distro,
So enable qemu_ga while installing sles11sp4 and newer sles.

Signed-off-by: Lin Ma <lma@suse.com>
2015-05-20 14:01:50 -04:00
Cole Robinson
dcfce5585a osdict: If detecting fedora-unknown, convert to latest fedora
That's basically what it is internally for libosinfo, and it helps
us generate better names in virt-manager
2015-04-13 17:07:16 -04:00
Cole Robinson
cc3a522455 Use is_pseries() helper more consistently 2015-04-08 09:31:01 -04:00
Cole Robinson
af64b79679 osdict: Use is_related_to for support check
Simplifies our whitelist maintenance
2015-04-04 16:08:00 -04:00
Cole Robinson
d0c65b30a4 osdict: Simplify a bunch of the checks, drop some legacy stuff 2015-04-04 15:32:35 -04:00
Cole Robinson
a7dbc5e250 tests: Add more osdict.py coverage 2015-04-04 14:43:12 -04:00
Cole Robinson
ce73272c7e create: Drop hardcoded STABLE_OS_SUPPORT list
It's out of date, and doesn't even seem to work with current RHEL versions
and no one is complaining.

If we want to add it back, it should be an explicit setup.py configure
option.
2015-04-04 13:48:15 -04:00
Cole Robinson
595b5b4bdf osdict: Drop explicit 'type' class
create.py is the only thing that cares about this nowadays, so we can
work with things to make it all simpler.
2015-04-04 12:48:50 -04:00
Cole Robinson
bd9ab2d5b5 osdict: Add toplevel OSDB as API entry point
Makes code more readable, and lazy loading simpler.
2015-04-04 12:06:41 -04:00
Cole Robinson
f644b0997d osdict: Have users call functions, rather than access properties
Gives us more future flexibility, and simplifies the flow quite a bit.
2015-04-04 11:24:18 -04:00
Cole Robinson
710c588eaf guest: Use cached osdict object for all lookups
Rather than have lookup_osdict_key constantly do the dictionary lookup.

This is step one towards simplifying the osdict lazy loading
2015-04-04 11:23:54 -04:00
Cole Robinson
67b36a086c osdict: Remove unused diskbus field 2014-11-20 10:58:15 -05:00
Cole Robinson
60e62e2676 osdict: Add back compat 'virtio26' entry
We used to have that in the old osdict. Map it to fedora10 which gives
virtio net/block but nothing else, which matches the old behavior.
2014-11-17 10:22:37 -05:00
Cole Robinson
310f65273f osdict: Restrict n-cpus to 1 for machvirt
It fails to boot otherwise
2014-09-23 17:09:36 -04:00