]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
3 years agolibvirt: introduce virDomainRestoreParams public API
Claudio Fontana [Fri, 6 May 2022 13:10:52 +0000 (15:10 +0200)]
libvirt: introduce virDomainRestoreParams public API

add new API in order to be able to extend parameters to the domain
restore operation. We will use it to fit the existing arguments of
VirDomainRestoreFlags for now.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agolibvirt: introduce virDomainSaveParams public API
Claudio Fontana [Fri, 6 May 2022 13:10:51 +0000 (15:10 +0200)]
libvirt: introduce virDomainSaveParams public API

create an alternative to virDomainSaveFlags that is more
extendible via parameters.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agovirfile: add comment about the use of SEEK_END in virFileDiskCopy
Claudio Fontana [Fri, 6 May 2022 13:10:50 +0000 (15:10 +0200)]
virfile: add comment about the use of SEEK_END in virFileDiskCopy

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agovirfile: change virFileDiskCopy arguments to extend beyond stdin, stdout
Claudio Fontana [Fri, 6 May 2022 13:10:49 +0000 (15:10 +0200)]
virfile: change virFileDiskCopy arguments to extend beyond stdin, stdout

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Claudio Fontana <cfontana@suse.de>
3 years agovirfile: rename runIO to virFileDiskCopy
Claudio Fontana [Fri, 6 May 2022 13:10:48 +0000 (15:10 +0200)]
virfile: rename runIO to virFileDiskCopy

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Claudio Fontana <cfontana@suse.de>
3 years agoiohelper: move runIO function to virfile.c
Claudio Fontana [Fri, 6 May 2022 13:10:47 +0000 (15:10 +0200)]
iohelper: move runIO function to virfile.c

where it can be reused by other helpers.
No changes other than the move.

Note that this makes iohelper now dependent on -lutil and -lacl.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Claudio Fontana <cfontana@suse.de>
3 years agoiohelper: refactor copy operation as a separate function
Claudio Fontana [Fri, 6 May 2022 13:10:46 +0000 (15:10 +0200)]
iohelper: refactor copy operation as a separate function

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoiohelper: introduce new struct to carry copy operation parameters
Claudio Fontana [Fri, 6 May 2022 13:10:45 +0000 (15:10 +0200)]
iohelper: introduce new struct to carry copy operation parameters

this is in preparation for a minor refactoring of the copy
function itself out of runIO().

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoci: Move clang/asan/ubsan jobs to Ubuntu 22.04
Andrea Bolognani [Fri, 6 May 2022 09:16:36 +0000 (11:16 +0200)]
ci: Move clang/asan/ubsan jobs to Ubuntu 22.04

Using an updated toolchain means we're likely to catch more
issues.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotestutilsqemu: Write getter/setter for CPU def global variables
Michal Privoznik [Thu, 5 May 2022 14:27:55 +0000 (16:27 +0200)]
testutilsqemu: Write getter/setter for CPU def global variables

As of 47503cc859 we are statically linking libtest_utils_qemu.a
into qemuhotplugmock.so (see the original commit for reasoning).
However, this breaks ASAN on older clang because now
qemuhotplugtest has two instances of virCPUDef global variables
(cpuDefault, cpuHaswell, cpuPower8, cpuPower9). One that comes
from the binary itself (which also links with
libtest_utils_qemu.a) and the other from the mock. Resolve this
by making the variables static and introducing getter and setter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agotestutils: Write setter for virTestHostArch global variable
Michal Privoznik [Thu, 5 May 2022 13:27:14 +0000 (15:27 +0200)]
testutils: Write setter for virTestHostArch global variable

As of 47503cc859 we are statically linking libtest_utils.a into
qemuhotplugmock.so (see the original commit for reasoning).
However, this breaks ASAN on older clang because now
qemuhotplugtest has two instances of virTestHostArch global
variable. One that comes from the binary itself (which also links
with libtest_utils.a) and the other from the mock. Resolve this
by making the variable static and introducing getter and setter.
Well, the former already exists (as virArchFromHost()) so only
the latter is needed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoci: Add Ubuntu 22.04
Andrea Bolognani [Fri, 6 May 2022 07:13:41 +0000 (09:13 +0200)]
ci: Add Ubuntu 22.04

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoci: Refresh configuration
Andrea Bolognani [Fri, 6 May 2022 07:11:22 +0000 (09:11 +0200)]
ci: Refresh configuration

Notable changes:

  * use the most recent point release for FreeBSD 12.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agomeson: Drop support for -Wl,-M
Andrea Bolognani [Thu, 5 May 2022 13:48:53 +0000 (15:48 +0200)]
meson: Drop support for -Wl,-M

This was originally introduced in c2fb8bfee309, reportedly to
support symbol versioning on Solaris; more recently, 30b301c6eaa9
ported it to meson.

Up until the previous commit this has resulted in passing

  -M .../libvirt/build/src/libvirt.syms

to the linker on macOS, but the implementation of the -M option
on that platform's linker is literally

  else if ( strcmp(arg, "-M") == 0 ) {
      // FIX FIX
  }

so in practice we've been providing an additional input file,
which the linker understandably ignores after printing a warning
since it's not in any format that it recognizes.

Considering that LLVM's linker, which is now used by default on
FreeBSD, supports the same --version-script option as the GNU
linker, that we have introduced special handling for macOS, and
that we don't target Solaris, we can simply drop the branch at
this point.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agomeson: Don't attempt to use version scripts on macOS
Andrea Bolognani [Thu, 5 May 2022 13:29:00 +0000 (15:29 +0200)]
meson: Don't attempt to use version scripts on macOS

macOS libraries don't support symbol versioning, so the only
result that we achieve by passing additional flags to the linker
is a bunch of messages like

  ld: warning: ignoring file .../libvirt/build/src/libvirt.syms,
  building for macOS-x86_64 but attempting to link with file built
  for unknown-unsupported file format ( 0x23 0x20 0x57 0x41 ... )

being produced during the build.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agomeson: Refactor handling of link_args and link_depends
Andrea Bolognani [Thu, 5 May 2022 13:06:47 +0000 (15:06 +0200)]
meson: Refactor handling of link_args and link_depends

This ensures variable names and the overall structure of the
code setting and using them is consistent. It will also make
upcoming changes less disruptive.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotests: Deduplicate some WITH_* checks
Michal Privoznik [Thu, 14 Apr 2022 10:44:31 +0000 (12:44 +0200)]
tests: Deduplicate some WITH_* checks

When constructing mock_libs array it is firstly initialized to a
static set of mocks followed by couple of WITH_* checks to append
driver specific mocks. These checks are then repeated when
filling some other variables (e.g. supplementary helpers,
libraries, tests, etc.). Dissolve the former in the latter since
we are already doing that, partially, for qemu (qemucapsprobemock
and qemuhotplugmock)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotest: Link qemuhotplugmock with test_utils_qemu and test_utils
Michal Privoznik [Mon, 4 Apr 2022 10:22:37 +0000 (12:22 +0200)]
test: Link qemuhotplugmock with test_utils_qemu and test_utils

As of ad81aa8ad07 the qemuhotplugmock.c calls
testQemuPrepareHostBackendChardevOne() which is implemented in
testutilsqemu.c. However, the mock is not linked with
testutilsqemu static library which makes some tools (valgrind
particularly) unhappy because the resulting mock library has
unresolved symbol.

The fix is simple, link mock library with test_utils_qemu_lib and
also with test_utils_lib since testutils.c calls some functions
from testutils.c.

Since these two libraries are declared only after mock_libs[], I
had to move the line that declares qemuhotplugmock after those
two.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirnetdev: Fix regression in setting VLAN tag
Michal Privoznik [Fri, 22 Apr 2022 12:15:47 +0000 (14:15 +0200)]
virnetdev: Fix regression in setting VLAN tag

In the past, we did set VLAN tag on <interface type='direct'/>.
However, during rewrite (v8.1.0-rc1~191) virNetDevSetVfConfig()
was changed and a condition that was responsible for calling
a function that sets VLAN tag was changed accidentally resulting
in VLAN tag not being set anymore.

However, because of other changes in the same patchset, it may
happen that @adminMac is NULL (this is to work around yet another
broken SRIOV driver), and thus we must refrain from setting MAC
and have to set VLAN tag only.

Fixes: 73961771a1cfec3c0f43caec9d117d2fbcc7af39
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075383
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirNetDevSetVfMac: Fix error message on invalid args
Michal Privoznik [Fri, 22 Apr 2022 12:15:46 +0000 (14:15 +0200)]
virNetDevSetVfMac: Fix error message on invalid args

If virNetDevSetVfMac() is called with either @macaddr or
@allowRetry arguments NULL an error is reported, because this is
considered invalid use. However, the error message is not
informative as it could be.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoSupport cpu0-id of Qemu QMP query-sev-capabilities
Niteesh Dubey [Wed, 27 Apr 2022 19:57:12 +0000 (19:57 +0000)]
Support cpu0-id of Qemu QMP query-sev-capabilities

It allows libvirt to provide the value of cpu0-id retuned by the Qemu QMP
 command query-sev-capabilities as implemented by the Qemu Patch [1] which
 is merged to Qemu master branch and should be available with Qemu 7.1.
 This is used to get the signed Chip Endorsement Key (CEK) of the CPU of AMD
 system from AMD's Key Distribution Service (KDS).

Similar to  cbitpos, reducedPhysBits, maxGuests & maxESGuests;
 the value of cpu0-id is also provided using 'virsh domcapability'.

[1] https://lore.kernel.org/all/20220228093014.882288-1-dovmurik@linux.ibm.com/

Signed-off-by: Niteesh Dubey <niteesh@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoinclude: Fix unmatched parentheses in comment
Andrea Bolognani [Wed, 4 May 2022 16:59:41 +0000 (18:59 +0200)]
include: Fix unmatched parentheses in comment

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
3 years agoapibuild: remove 'v' from pattern matching
Victor Toso [Wed, 4 May 2022 11:11:24 +0000 (13:11 +0200)]
apibuild: remove 'v' from pattern matching

This makes it mandatory to *not* add 'v' to version numbers.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: remove 'v' from since metadata
Victor Toso [Wed, 4 May 2022 11:11:23 +0000 (13:11 +0200)]
docstring: remove 'v' from since metadata

  Since: v1.2.3 -> Since: 1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agotests: Add test for missing network attribute in graphics' listen element
Martin Kletzander [Wed, 4 May 2022 12:47:07 +0000 (14:47 +0200)]
tests: Add test for missing network attribute in graphics' listen element

This tests a change done in commit 871a071abb9c.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
3 years agoconf: virDomainGraphicsDefValidate: validate attribute 'network' for listen type...
Amneesh Singh [Wed, 13 Apr 2022 16:31:37 +0000 (22:01 +0530)]
conf: virDomainGraphicsDefValidate: validate attribute 'network' for listen type 'network'

Related: https://gitlab.com/libvirt/libvirt/-/issues/93
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
3 years agoqemu: do not use domain virt type to get default version
Liang Yan [Tue, 26 Apr 2022 20:38:26 +0000 (16:38 -0400)]
qemu: do not use domain virt type to get default version

We do not need VIR_DOMAIN_VIRT_QEMU to get qemu default
version. With the 'os_type' and 'arch'in capabilities,
we could identify 'emulator' which is enough to get the version.

Actually VIR_DOMAIN_VIRT_QEMU is not the only domain virt type for
qemu driver, there are VIR_DOMAIN_VIRT_KVM and VIR_DOMAIN_VIRT_HVF.
If TCG is disabled in qemu, it will cause the error that could not
find suitable emulater when access version.

Signed-off-by: Liang Yan <lyan@digtalocean.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agobuild-aux: remove duplicated syntax check filter for 'select'
Daniel P. Berrangé [Thu, 28 Apr 2022 12:46:10 +0000 (13:46 +0100)]
build-aux: remove duplicated syntax check filter for 'select'

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoPost-release version bump to 8.4.0
Jiri Denemark [Mon, 2 May 2022 11:37:43 +0000 (13:37 +0200)]
Post-release version bump to 8.4.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoRelease of libvirt-8.3.0
Jiri Denemark [Mon, 2 May 2022 11:33:03 +0000 (13:33 +0200)]
Release of libvirt-8.3.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoTranslated using Weblate (Polish)
Piotr Drąg [Sat, 30 Apr 2022 10:51:30 +0000 (12:51 +0200)]
Translated using Weblate (Polish)

Currently translated at 22.3% (2331 of 10419 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/pl/

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Signed-off-by: Piotr Drąg <piotrdrag@gmail.com>
3 years agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Tue, 26 Apr 2022 14:28:19 +0000 (16:28 +0200)]
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10419 of 10419 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/uk/

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
3 years agoTranslated using Weblate (Korean)
김인수 [Tue, 26 Apr 2022 14:28:18 +0000 (16:28 +0200)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10419 of 10419 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
3 years agoUpdate translation files
Weblate [Tue, 26 Apr 2022 14:28:16 +0000 (16:28 +0200)]
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
3 years agotests: don't set G_DEBUG=fatal-warnings on macOS
Daniel P. Berrangé [Thu, 28 Apr 2022 10:37:59 +0000 (11:37 +0100)]
tests: don't set G_DEBUG=fatal-warnings on macOS

On macOS when BROKEN_POLL is set in GLib, our tests will periodically
trigger a warning:

  (process:50880): GLib-WARNING **: 02:54:15.272: poll(2) failed due to: Bad file descriptor.

Our code is inherantly racy, calling g_source_destroy which
removes the FD from the event thread poll asynchronously but
we close the FD immediately after g_source_destroy returns.

With poll() this results in POLLNVAL which we're ignoring, but
with select() it generates the BADF error on macOS.

We need to ignore the warnings on macOS to avoid abort()ing
our test programs.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/303
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoci: print stack traces on macOS if any tests fail
Daniel P. Berrangé [Thu, 28 Apr 2022 10:32:13 +0000 (11:32 +0100)]
ci: print stack traces on macOS if any tests fail

Mostly the tests should fail cleanly, but sometimes the test might crash
or abort. In this case we'll need to know the stack traces in order to
debug the problem. Fortunately on the Cirrus CI macOS instances, the
crash reporting service is active and saving crashes to the directory
~/Library/Logs/DiagnosticReports/

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoNEWS: Mention bump of minimum qemu version to qemu-3.1
Peter Krempa [Wed, 27 Apr 2022 11:01:10 +0000 (13:01 +0200)]
NEWS: Mention bump of minimum qemu version to qemu-3.1

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agocpu: Remove pointless check
Martin Kletzander [Wed, 27 Apr 2022 07:42:59 +0000 (09:42 +0200)]
cpu: Remove pointless check

These two pointers can never be NULL since they are initialised to a reference
of a struct.  This became apparent when commit 210a19539447 added a VIR_DEBUG
which used both pointers because due to the concise condition the compiler saw
that if the "and" part of the condition did short-circuit (and it assumed that
can happen) the second variable would not be initialised, but it is used in the
debugging message, so the build failed with:

  In file included from ../src/cpu/cpu_x86.c:27:
  ../src/cpu/cpu_x86.c: In function ‘virCPUx86DataIsIdentical’:
  ../src/util/virlog.h:79:5: error: ‘bdata’ may be used uninitialized in this
  function [-Werror=maybe-uninitialized]

Fix this by just assigning the helper pointers and remove the condition
altogether.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
3 years agoscripts: apibuild: add parsing variable's comments
Victor Toso [Fri, 22 Apr 2022 19:23:44 +0000 (21:23 +0200)]
scripts: apibuild: add parsing variable's comments

scripts/apibuild.py did not consider exporting external variable's
comments into the XML API. This commits fixes that.

Noe that the way that CParser is designed, it is currently possible to
lose a parsed comment when parsing other fields as self.comment in
several places. I've added a comment to highlight this.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoscripts: apibuild: factor out comment cleaning
Victor Toso [Fri, 22 Apr 2022 19:23:43 +0000 (21:23 +0200)]
scripts: apibuild: factor out comment cleaning

So we can use for comments that are being hold in helper variables.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoscripts: apibuild: parse 'Since' for functions
Victor Toso [Fri, 22 Apr 2022 19:23:42 +0000 (21:23 +0200)]
scripts: apibuild: parse 'Since' for functions

This patch adds 'version' parameter to generated XML API for functions
and functypes.

The 'version' metadata has been added with e0e0bf6628 by parsing .syms
files. This commit does not override that but it will warn if there is
not 'Since' metadata with new additions.

There is not clear benefit for keeping both. For now, I've added a
warning in case there is a mismatch between the version provided by
.syms and docstring.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoscripts: apibuild: parse 'Since' for macros
Victor Toso [Fri, 22 Apr 2022 19:23:41 +0000 (21:23 +0200)]
scripts: apibuild: parse 'Since' for macros

This patch adds 'version' parameter to the generated XML API for
macros

It'll require, for new additions, to add a comment with the version
that the macro was added. An example bellow of code diff and
the change in the generated XML.

Note that the Since tag is removed from the comment as there is a
proper field for it in the XML.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoscripts: apibuild: parse 'Since' for typedefs
Victor Toso [Fri, 22 Apr 2022 19:23:40 +0000 (21:23 +0200)]
scripts: apibuild: parse 'Since' for typedefs

This patch adds 'version' parameter to the generated XML API for
typedefs

It'll require, for new additions, to add a comment with the version
that the typedef value was added. An example bellow of code diff and
the change in the generated XML.

Note that the Since tag is removed from the comment as there is a
proper field for it in the XML.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoscripts: apibuild: fix parsing block comments from typedef enum
Victor Toso [Fri, 22 Apr 2022 19:23:39 +0000 (21:23 +0200)]
scripts: apibuild: fix parsing block comments from typedef enum

Removed the TODO as we can rely to the serialize_typedef() the job to
report missing comments.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoscripts: apibuild: parse 'Since' version for enums
Victor Toso [Fri, 22 Apr 2022 19:23:38 +0000 (21:23 +0200)]
scripts: apibuild: parse 'Since' version for enums

This patch adds 'version' parameter to the generated XML API for
enums.

It'll require, for new additions, to add a comment with the version
that the enum value was added.

Note that the Since tag is removed from the comment as there is a
proper field for it in the XML.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoinclude: Move version information
Andrea Bolognani [Tue, 26 Apr 2022 15:32:19 +0000 (17:32 +0200)]
include: Move version information

It belongs to the comment for VIR_DOMAIN_AFFECT_CONFIG, not to
the unrelated one immediately after it.

Fixes: 807cdbf75976f88e8a23b26951f263029cc9e5f4
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
3 years agoci: print test suite logs on failure for Cirrus jobs
Daniel P. Berrangé [Tue, 26 Apr 2022 08:40:07 +0000 (09:40 +0100)]
ci: print test suite logs on failure for Cirrus jobs

We don't have access to the 'testlog.txt' file, so we need meson to
print the failures for any broken tests directly.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agodocstring: function: admin: Add 'Since version' metadata
Victor Toso [Fri, 22 Apr 2022 19:23:37 +0000 (21:23 +0200)]
docstring: function: admin: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given function was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: function: libvirt: Add 'Since version' metadata
Victor Toso [Fri, 22 Apr 2022 19:23:36 +0000 (21:23 +0200)]
docstring: function: libvirt: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given function was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: typedef: admin: Add 'Since version' metadata
Victor Toso [Fri, 22 Apr 2022 19:23:35 +0000 (21:23 +0200)]
docstring: typedef: admin: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given typedef was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: macros: admin: Add 'Since version' metadata
Victor Toso [Fri, 22 Apr 2022 19:23:34 +0000 (21:23 +0200)]
docstring: macros: admin: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given macro was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: enums: admin: Add 'Since version' metadata
Victor Toso [Fri, 22 Apr 2022 19:23:33 +0000 (21:23 +0200)]
docstring: enums: admin: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given enum value was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: enums: libvirt: Add 'Since version' metadata
Victor Toso [Fri, 22 Apr 2022 19:23:32 +0000 (21:23 +0200)]
docstring: enums: libvirt: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given enum value was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agoinclude: Remove more comments between enum values
Andrea Bolognani [Tue, 26 Apr 2022 10:16:59 +0000 (12:16 +0200)]
include: Remove more comments between enum values

apibuild.py mistakes these as being a continuation of the
previous comment.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
3 years agoinclude: Fix docstring indentation
Andrea Bolognani [Tue, 26 Apr 2022 10:28:50 +0000 (12:28 +0200)]
include: Fix docstring indentation

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: avoid sc_prohibit_nonreentrant in a comment
Victor Toso [Fri, 22 Apr 2022 19:23:31 +0000 (21:23 +0200)]
docstring: avoid sc_prohibit_nonreentrant in a comment

Follow up patch will add Since metadata to enum values of
virStorageVolWipeAlgorithm.

This patch is necessary to avoid breaking the build with
syntax-check.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: remove comments between enum values
Victor Toso [Fri, 22 Apr 2022 19:23:30 +0000 (21:23 +0200)]
docstring: remove comments between enum values

scripts/apibuild.py does not handle well enum's with comments between
values. The outcome depends on whether the enum value has its own
docstring or not and if there is spaces between the enum values or
not.

This commit removes some generic comments that I have spotted.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agodocstring: typedef: fix a few version
Victor Toso [Fri, 22 Apr 2022 19:23:26 +0000 (21:23 +0200)]
docstring: typedef: fix a few version

Fixes: 034432e47b72cff45c905feadf7165af8bb50b7e
Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 years agopo: Refresh potfile for v8.3.0
Jiri Denemark [Tue, 26 Apr 2022 07:48:53 +0000 (09:48 +0200)]
po: Refresh potfile for v8.3.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agotests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64
Peter Krempa [Mon, 14 Mar 2022 15:55:43 +0000 (16:55 +0100)]
tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

Few minor changes in qemu since the last update:
    - 'cocoa' display and corresponding props (not present in this build)

Changes in build:
    - dbus display driver re-enabled
    - gtk display support re-disabled
    - xen support re-disabled

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirHostCPUGetCPUIDFilterVolatile: Filter out topology data on AMD
Peter Krempa [Mon, 25 Apr 2022 11:55:12 +0000 (13:55 +0200)]
virHostCPUGetCPUIDFilterVolatile: Filter out topology data on AMD

AMD cpus report Core (compute unit) identifiers of the cpu running the
instruction under leaf 0x8000001e. This data is not needed for libvirt
and actually breaks caching of the qemu capabilities where we check that
all of the CPU flags to be identical.

Mask out all of leaf 0x8000001e.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirHostCPUGetCPUID: Limit the buffer size ranges
Peter Krempa [Mon, 25 Apr 2022 11:37:52 +0000 (13:37 +0200)]
virHostCPUGetCPUID: Limit the buffer size ranges

Raise the lower bound to '64' as that seems to currently be the first
size that can fit the CPU data for a modern cpu.

Lower the upper bound to an arbitrary 65536. So many cpu features ougth
to be enough for everyone.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirHostCPUGetCPUID: Fix possible allocation of huge amount of memory
Peter Krempa [Mon, 25 Apr 2022 11:36:26 +0000 (13:36 +0200)]
virHostCPUGetCPUID: Fix possible allocation of huge amount of memory

In case when the 'KVM_GET_SUPPORTED_CPUID' ioctl on /dev/kvm would
fail for other reason than the documented E2BIG, our code would continue
looping and calling it while always increasing the memory buffer even
when that will not help.

Rewrite the function to allow another iteration only with the correct
errno.

Additionally rename the 'i' variable to 'alloc_size' as it's not a pure
iterator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoutil: virhostcpu: Extract filtering of the returned data from virHostCPUGetCPUID
Peter Krempa [Mon, 25 Apr 2022 11:20:14 +0000 (13:20 +0200)]
util: virhostcpu: Extract filtering of the returned data from virHostCPUGetCPUID

Move the filtering code into virHostCPUGetCPUIDFilterVolatile.

This also removes a safe but very questionable reuse of 'i' iterator in
the both the top level and nested loop. It's safe for now as the to
level loop will not iterate any more in the current state.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirHostCPUGetCPUID: Add comment on how KVM_GET_SUPPORTED_CPUID works
Peter Krempa [Mon, 25 Apr 2022 10:47:25 +0000 (12:47 +0200)]
virHostCPUGetCPUID: Add comment on how KVM_GET_SUPPORTED_CPUID works

The commit adding the code fetching host CPU flags via the
KVM_GET_SUPPORTED_CPUID didn't describe at all why such an alghorithm is
needed.

Add a comment from the documentation outlining how the userspace
function is expected to allocate memory here.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirCPUx86DataGetHost: Fix construction of the returned data
Peter Krempa [Mon, 25 Apr 2022 12:47:26 +0000 (14:47 +0200)]
virCPUx86DataGetHost: Fix construction of the returned data

The function returns 'virCPUData' but doesn't do two important steps
which other code takes:

1) leaves with all-zero data is stripped from the XML output
2) the data is expected to be sorted in the array

Now the 'virHostCPUGetCPUID' helper returns both all 0 leaves and
doesn't order them as we expect.

If this is then used in conjunction with 'virCPUx86DataIsIdentical'
together with data which made a roundtrip to XML and back the result
will be always false even if the data itself is identical.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirCPUx86DataIsIdentical: Add debug output
Peter Krempa [Mon, 25 Apr 2022 12:38:08 +0000 (14:38 +0200)]
virCPUx86DataIsIdentical: Add debug output

Without this it's impossible to debug scenarios when this function
returns a mismatch but the formatted data looks identical.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: cmdBlockcopy: Fix generator of block copy disk XML
Peter Krempa [Mon, 25 Apr 2022 08:16:13 +0000 (10:16 +0200)]
virsh: cmdBlockcopy: Fix generator of block copy disk XML

In a recent commit I've attempted to rewrite the XML generator to use
virXMLFormatElement instead of manual steps. Unfortunately the commit
had multiple problems resulting in a garbled XML:

1) in certain cases the wrong buffer was used resulting in misplaced
   snippets
2) the child element buffer was improperly set up so sub-elements were
   not indented

This resulted in following XML being generated:

 $ virsh blockcopy cd vda /tmp/test.copy --raw --print-xml
 type='file''/tmp/test.copy'/>
 <driver type='raw'/>
 <disk>
 <source file=</disk>

To fix this we'll generate the '<source>' element in one go and use the
proper buffer for it and other places.

Fixes: 1cd95f858ab83f2baab0e35070d00766bb06ce3a
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2078274
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: cmdBlockcopy: Add '--print-xml' flag
Peter Krempa [Mon, 25 Apr 2022 07:47:26 +0000 (09:47 +0200)]
virsh: cmdBlockcopy: Add '--print-xml' flag

Useful for knowing how to construct the XML and debugging.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotests: qemuxml2*: Add testing of authenticated http/ftp disks
Peter Krempa [Wed, 20 Apr 2022 07:26:57 +0000 (09:26 +0200)]
tests: qemuxml2*: Add testing of authenticated http/ftp disks

Extend the 'disk-cdrom-network' to cover this instance. This also
validates that the parameters of -blockdev conform to the QAPI schema.

Also add the xml2xml variant of this test case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoconf: schema: Allow authentication for FTP(S) and HTTP(S) disks
Peter Krempa [Wed, 20 Apr 2022 08:27:42 +0000 (10:27 +0200)]
conf: schema: Allow authentication for FTP(S) and HTTP(S) disks

The code already handles this so we just need to allow it in the schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoconf: schemas: Split out definition for 'ftp' protocol
Peter Krempa [Fri, 22 Apr 2022 15:04:43 +0000 (17:04 +0200)]
conf: schemas: Split out definition for 'ftp' protocol

Separate it so that further addition can target 'ftp' only.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: domain: Inline qemuDomainStorageSourceHasAuth
Peter Krempa [Fri, 22 Apr 2022 15:15:33 +0000 (17:15 +0200)]
qemu: domain: Inline qemuDomainStorageSourceHasAuth

The iSCSI hostdev code doesn't require the check for the empty drive
and the check for the protocol because those are already guaranteed at
that point.

In qemuDomainSecretStorageSourcePrepare we don't need to check the
network disk type either as it's now guaranteed by the definition
validator.

Thus both callers can simply check whether src->auth is present and the
helper can be removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: domain: Inline qemuDomainDiskHasEncryptionSecret
Peter Krempa [Fri, 22 Apr 2022 15:11:39 +0000 (17:11 +0200)]
qemu: domain: Inline qemuDomainDiskHasEncryptionSecret

Since we are already checking that the encryption format can be only
_LUKS and _LUKS2 this wrapper function doesn't make much sense any more.

The only one caller can do this internally.

The move of virStorageSourceIsEmpty is correct as there are no secrets
to setup if the disk is empty anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainStorageSourceHasAuth: Don't decide based on protocol
Peter Krempa [Wed, 20 Apr 2022 07:31:47 +0000 (09:31 +0200)]
qemuDomainStorageSourceHasAuth: Don't decide based on protocol

The validation should be the only point to decide whether authentication
is supported for a disk backing protocol. The rest of the code can then
simply always enable it.

This also fixes a crash when authentication is requested e.g. for a HTTP
backed disk as the blockdev props formatter expects that it was already
set up.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainDiskDefValidateSourceChainOne: Reject authentication for protocols which...
Peter Krempa [Fri, 22 Apr 2022 14:59:37 +0000 (16:59 +0200)]
virDomainDiskDefValidateSourceChainOne: Reject authentication for protocols which don't support it

Only certain disk protocols support authentication. Add validation for
this field.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuBlockStorageSourceGetRBDProps: Simplify handling of encryption format
Peter Krempa [Fri, 22 Apr 2022 14:16:18 +0000 (16:16 +0200)]
qemuBlockStorageSourceGetRBDProps: Simplify handling of encryption format

Remove the impossible error message about the 'qcow2' encryption format
not being supported. We validated before that it can't happen.

Additionally the code can be simplified by removing error handling from
impossible code paths as the last resort is virJSONValueCreate not
allowing NULL argument with the 's:' modifier.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainValidateStorageSource: Add validation of 'encryption' support
Peter Krempa [Fri, 22 Apr 2022 14:33:28 +0000 (16:33 +0200)]
qemuDomainValidateStorageSource: Add validation of 'encryption' support

Reject encryption requests for unsupported image format types.

Add negative test for the rejected cases as well as modify
'disk-network-rbd-encryption' case to validate that with librbd
encryption the format doesn't matter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainValidateStorageSource: Reorganize encryption config validation
Peter Krempa [Fri, 22 Apr 2022 14:25:18 +0000 (16:25 +0200)]
qemuDomainValidateStorageSource: Reorganize encryption config validation

Move the two ad-hoc checks below into the block which already tests
whether encryption is requested.

If we first disallow the old-style qcow2 encryption we can remove a
whole block of validation later on.

Also the capability check for qcow2+luks can be simplified by moving it
into the same block.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoconf: schema: Fix alignment in 'diskSourceNetworkProtocolHTTPS' schema definition
Peter Krempa [Wed, 20 Apr 2022 07:45:06 +0000 (09:45 +0200)]
conf: schema: Fix alignment in 'diskSourceNetworkProtocolHTTPS' schema definition

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agodocs: formatdomain: Remove old unreferenced HTML anchors
Peter Krempa [Thu, 14 Apr 2022 08:24:16 +0000 (10:24 +0200)]
docs: formatdomain: Remove old unreferenced HTML anchors

Most of the anchors that were forward ported to formatdomain.rst when it
was converted are not actually referenced by our documentation. Since
it's now quite some time after the conversion was done we can remove
them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: bugs: Remove raw HTML anchor 'quality'
Peter Krempa [Thu, 14 Apr 2022 07:42:58 +0000 (09:42 +0200)]
docs: bugs: Remove raw HTML anchor 'quality'

Modify the gitlab templates linking to it and remove the raw HTML.

Note that also the default template needs to be changed directly in
gitlab.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: contact: Remove HTML anchors and adjust documents using them
Peter Krempa [Thu, 14 Apr 2022 07:39:02 +0000 (09:39 +0200)]
docs: contact: Remove HTML anchors and adjust documents using them

Modify the name of the 'IRC discussion' paragraph to just 'IRC' so that
the links keep working and remove the raw HTML anchors.

Adjustment is needed for documents which were using the '#email' anchor
which has now become '#mailing-lists'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: governance: Remove unused HTML anchors
Peter Krempa [Thu, 14 Apr 2022 07:34:25 +0000 (09:34 +0200)]
docs: governance: Remove unused HTML anchors

The 'codeofconduct' anchor is unused as of 523f2de82e0f523bd552947 .

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: uri: Rewrite section about transport protocols and extra parameters
Peter Krempa [Wed, 20 Apr 2022 16:04:36 +0000 (18:04 +0200)]
docs: uri: Rewrite section about transport protocols and extra parameters

Avoid the table and add a brief description of the transport protocol.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: uri: Move the 'test' hypervisor under a 'local hypervisors heading
Peter Krempa [Tue, 19 Apr 2022 15:15:03 +0000 (17:15 +0200)]
docs: uri: Move the 'test' hypervisor under a 'local hypervisors heading

Add a new heading 'Local hypervisor URIs' and move the sections about
'qemu', 'xen' and 'test' under it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: uri: Consolidate paragraphs on Xen URIs
Peter Krempa [Tue, 19 Apr 2022 15:12:07 +0000 (17:12 +0200)]
docs: uri: Consolidate paragraphs on Xen URIs

Mention the legacy 'xen' string usage under the Xen hypervisor uri
section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: uri: Remove old 'NULL URI' section
Peter Krempa [Tue, 19 Apr 2022 15:02:35 +0000 (17:02 +0200)]
docs: uri: Remove old 'NULL URI' section

We now have an paragraph about default URI choice if the passed pointer
is NULL. Add the two related bits from the 'NULL and empty string URIs'
from the legacy section to the current one and remove the old stuff.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: Convert 'uri' page to rst
Peter Krempa [Thu, 14 Apr 2022 12:30:30 +0000 (14:30 +0200)]
docs: Convert 'uri' page to rst

Adjust links in the process.

Note that the conversion to the table is temporary and upcoming patch
will modify it for better readability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: remote: Remove 'Limitations' paragraph
Peter Krempa [Thu, 14 Apr 2022 11:36:11 +0000 (13:36 +0200)]
docs: remote: Remove 'Limitations' paragraph

The paragraph talks about lack of fine grained access control which was
already added a long time ago.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: Convert 'remote' page to rst
Peter Krempa [Fri, 8 Apr 2022 08:25:27 +0000 (10:25 +0200)]
docs: Convert 'remote' page to rst

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: Convert 'storage' page to rst
Pavel Hrdina [Mon, 29 Mar 2021 20:24:40 +0000 (22:24 +0200)]
docs: Convert 'storage' page to rst

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: storage: rename headers to remove duplicate names
Pavel Hrdina [Mon, 29 Mar 2021 20:24:13 +0000 (22:24 +0200)]
docs: storage: rename headers to remove duplicate names

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoCorrect links to TLS certificate setup page
Peter Krempa [Thu, 14 Apr 2022 12:20:09 +0000 (14:20 +0200)]
Correct links to TLS certificate setup page

When the setup of TLS certs was originally split out of
'docs/remote.html' ( df99aa311a33e87d4 ) links refering to it were not
fixed.

Adjust them to point to the correct document.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodocs: formatsecret: Correct link to storage volume XML definition
Peter Krempa [Thu, 14 Apr 2022 11:48:43 +0000 (13:48 +0200)]
docs: formatsecret: Correct link to storage volume XML definition

The anchor name was not fixed when the 'formatstorage' document was
converted to rst.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoinclude: Fix vertical spacing between comments and symbols
Andrea Bolognani [Fri, 22 Apr 2022 12:12:07 +0000 (14:12 +0200)]
include: Fix vertical spacing between comments and symbols

There should be no empty lines between a docstring comment and
the symbol it documents.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agoinclude: Fix vertical spacing inside comments
Andrea Bolognani [Fri, 22 Apr 2022 12:05:12 +0000 (14:05 +0200)]
include: Fix vertical spacing inside comments

There should be no empty lines between the Since tag in a
docstring comment and the end marker.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agodocstring: Fix generated documentation of virStorageVolInfoFlags
Victor Toso [Wed, 20 Apr 2022 19:08:07 +0000 (21:08 +0200)]
docstring: Fix generated documentation of virStorageVolInfoFlags

The API xml description file generator doesn't properly handle cases
when there's either a single comment or mixed use of pre- and post-
comments explaining the values.

Modify the comments to avoid the problem and also append version
information for the exposed values.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agodocstring: libvirt-common: Add 'Since version' metadata
Victor Toso [Wed, 20 Apr 2022 19:08:06 +0000 (21:08 +0200)]
docstring: libvirt-common: Add 'Since version' metadata

Similarly to previous commits but with the targeting libvirt-common
in a batch.

Either create or append to existing docstring, the version (git tag)
that a given typedef, enum value, macro or function was introduced
in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agodocstring: function: lxc: Add 'Since version' metadata
Victor Toso [Wed, 20 Apr 2022 19:08:04 +0000 (21:08 +0200)]
docstring: function: lxc: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given function was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>