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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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.
Right now we have:
* memory -> ./currentMemory
* maxmem -> ./memory
* hotplugmaxmem -> ./maxMemory
Which is just a mess to know what we might be really setting behind
the scenes. Rename the properties to match the XML element name, and
adjust all users to the new names. cli options aren't changed though
Rather than associate them per virt argument. It's less of a clean
fit this way, but I think it will make it less likely that aliases
are cargo culted around and added unnecessarily
- Put clearxml at the very top, because it's a bit special and I
don't like it mixed in with the interesting settings
- Put address.X at the top, after clearxml, because there's a lot of
settings and I'd like to keep them away from the users' visual field
Turns out propname is used for virt-xml device matching, even if we
have a cb, so it's useful to specify if the cliname truly maps to
a single propname. Add a programming error exception to try and
explain this situation so it doesn't slip in by accident.
Seems like a bad idea to define our own double underscore function,
incase a future python version wants to use that name.
Tweak some minor InitClass details while we are in the area
This is some extra validation to catch some char opt combos that
libvirt doesn't explicitly reject. It's not really interesting and
dropping it simplifies the cli parsing
Every add_arg call needs a cliname (the option name on the command
line), but not all calls need an attrname (the propery/method name
of the virtinst API object) because they rely on a callback for
less simple functionality.
So swap the ordering so that cliname is the first argument. Drop
redundant attrname=None arguments and validate that either attrname
or cb=X is passed.
The current code already prefers the "display name" over the "name" of
each application; hence, use "name" only if the "display name" is not
available.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Use the non-deprecated g.inspect_list_applications2() call to list the
installed applications. It is available since libguestfs >= 1.20, which
is lower than the current requirement (i.e. 1.22).
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Instead of passing around the raw results of
g.inspect_list_applications(), create an helper vmmInspectionApplication
object with the data of an inspected application that we use. This is
done for different reasons:
- when using the data, it is easier to use member variables instead of
looking up values in a dictionary
- we keep only the data needed, slightly lowering the memory/objects
used for the inspected applications
- it will be easier to switch from g.inspect_list_applications() to
g.inspect_list_applications2() without changing code outside the
inspection code
Reviewed-by: Cole Robinson <crobinso@redhat.com>
virt-manager can optionally use libguestfs for inspecting the guests, so
at least add it as suggestion.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Save the package format of a guest as part of its inspection data, so
later on it can be used to tweak other results (like the version of
installed packages).
Reviewed-by: Cole Robinson <crobinso@redhat.com>
The old code basically always set filesystems_mounted to True, even when
no filesystems were mounted successfully, unless
g.inspect_get_mountpoints() failed (very unlikely).
Instead, set it when at least one filesystem is mounted; considering
that the first filesystem to be mounted is usually /, then failing to
mount it will usually prevent the mounting of the others. In any case,
we can try to extract data even when only / is mounted, which can work
depending on the mount points of the guest.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Rely on the Python 3 sorting facilities to sort the mount points using
a key based on the length of the mount point, doing the same effect as
the old compare function.
As side change required by this, enable python_return_dict on the
GuestFS handle, so we get proper hashes instead of lists. This requires
libguestfs 1.22, which is 6 years old by now (and other virt-manager
requires are way more recent than that).
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This block only catches failures in g.inspect_get_mountpoints(), as the
g.mount_ro() calls are already within own try/catch blocks. Considering
that:
- g.inspect_get_mountpoints() is a simple API to query one of the
results of the inspection, it is very unlikely that it fails
- the whole _inspect_vm function (that contains the inspection code) is
already run within an own try/catch block, so even a failure in
g.inspect_get_mountpoints() will not crash virt-manager
then just remove this extra try/catch block.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
We pretty much require a referenced storage pool to be running if
it's intended to be used as a virt-install or virt-manager requested
disk. So add a helper to start a pool if needed and optionally refresh
it
Return the generated virtinst device up through the call chain.
Makes the flow a lot more sensible, and will be needed for separating
device building from extra UI validation/prompting