IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Init a shared log instance in virtinst/logger.py, and use that
throughout the code base, so we aren't calling directly into
'logging'. This helps protect our logging output from being
cluttered with other library output, as happens with some
'requests' usage
Not sure I want to go down that route if we can avoid it. Instead
just fold the full_id support into the existing option handling.
Streamline the OSVariantData usage throughout the cli tools
Replace the unreleased --os-variant OSNAME,install=location with just
--install OSNAME
Unwind the --unattended dependency on upfront --os-variant while
we are at it, since they are all intertwined. Now we can just do:
virt-install --install OSNAME
and
virt-install --install OSNAME --unattended
* Make all API calls go through the _OsMedia object
* Move most of the unattended specific processing to unattended.py
* Rename requires_internet to is_netinst to clarify what it is checking
If an OS has a <minimum> resources section, and a <recommended>
resources section, but there's a field in the former that isn't in
the latter, currently we throw out the former field entirely. This
is the case for n-cpus for a few OS. Instead we should be using
the <minimum> ncpus value. This changes the default <vcpu> value
for a quite a few test cases.
In case there's no self.osinfo_media, it means the installation won't
happen from the media itself, so it should return "True" (as in, it
requires internet).
Returning "False", though, should be done when no "netinst" variant was
found (but we do have a media).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Consequently, let's:
- rename urldetect::get_osinfo_media() to get_os_media()
- rename the installertreemedia::_LocationData::osinfo_media to os_media
- rename unattended::prepare_install_script's media argument to os_media
- and also rename media to os_media on its internal
_get_installation_source() method
- rename osdict::get_install_script's media argument to os_media
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
In order to properly do a unattended installation of some medias (as net
installers), we have to check whether the media requires or not
internet. Doing so by checking its variant is not the most beautiful way
(as variants do not have a set of predefined names), but that's the best
that can be done with the current state of osinfo-db.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
The OsMedia class is a wrapper around OsinfoMedia and will help us
to keep the logic of dealing with media related stuff from inside
osdict.py
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>