[libvirt] [PATCH] docs: Use <code> inside <dt> for symbols
by Andrea Bolognani
Most of the time, the <dt> tag is used when providing
documentation for a symbol; enclose symbols in <code> tags to
style them appropriately.
---
docs/auditlog.html.in | 142 +++++++++++++++++++++---------------------
docs/drvlxc.html.in | 16 ++---
docs/formatcaps.html.in | 26 ++++----
docs/formatdomain.html.in | 18 +++---
docs/formatdomaincaps.html.in | 32 +++++-----
docs/locking.html.in | 6 +-
docs/remote.html.in | 12 ++--
7 files changed, 126 insertions(+), 126 deletions(-)
diff --git a/docs/auditlog.html.in b/docs/auditlog.html.in
index 8a007ca..012d068 100644
--- a/docs/auditlog.html.in
+++ b/docs/auditlog.html.in
@@ -57,13 +57,13 @@
</p>
<dl>
- <dt>pid</dt>
+ <dt><code>pid</code></dt>
<dd>Process ID of the libvirtd daemon generating the audit record.</dd>
- <dt>uid</dt>
+ <dt><code>uid</code></dt>
<dd>User ID of the libvirtd daemon process generating the audit record.</dd>
- <dt>subj</dt>
+ <dt><code>subj</code></dt>
<dd>Security context of the libvirtd daemon process generating the audit record.</dd>
- <dt>msg</dt>
+ <dt><code>msg</code></dt>
<dd>String containing a list of key=value pairs specific to the type of audit record being reported.</dd>
</dl>
@@ -72,21 +72,21 @@
</p>
<dl>
- <dt>virt</dt>
+ <dt><code>virt</code></dt>
<dd>Type of virtualization driver used. One of <code>qemu</code> or <code>lxc</code></dd>
- <dt>vm</dt>
+ <dt><code>vm</code></dt>
<dd>Host driver unique name of the guest</dd>
- <dt>uuid</dt>
+ <dt><code>uuid</code></dt>
<dd>Globally unique identifier for the guest</dd>
- <dt>exe</dt>
+ <dt><code>exe</code></dt>
<dd>Path of the libvirtd daemon</dd>
- <dt>hostname</dt>
+ <dt><code>hostname</code></dt>
<dd>Currently unused</dd>
- <dt>addr</dt>
+ <dt><code>addr</code></dt>
<dd>Currently unused</dd>
- <dt>terminal</dt>
+ <dt><code>terminal</code></dt>
<dd>Currently unused</dd>
- <dt>res</dt>
+ <dt><code>res</code></dt>
<dd>Result of the action, either <code>success</code> or <code>failed</code></dd>
</dl>
@@ -98,15 +98,15 @@
</p>
<dl>
- <dt>op</dt>
+ <dt><code>op</code></dt>
<dd>Type of operation performed. One of <code>start</code>, <code>stop</code> or <code>init</code></dd>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the operation to happen</dd>
- <dt>vm-pid</dt>
+ <dt><code>vm-pid</code></dt>
<dd>ID of the primary/leading process associated with the guest</dd>
- <dt>init-pid</dt>
+ <dt><code>init-pid</code></dt>
<dd>ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
- <dt>pid-ns</dt>
+ <dt><code>pid-ns</code></dt>
<dd>Namespace ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
</dl>
@@ -118,11 +118,11 @@
</p>
<dl>
- <dt>model</dt>
+ <dt><code>model</code></dt>
<dd>The security driver type. One of <code>selinux</code> or <code>apparmor</code></dd>
- <dt>vm-ctx</dt>
+ <dt><code>vm-ctx</code></dt>
<dd>Security context for the guest process</dd>
- <dt>img-ctx</dt>
+ <dt><code>img-ctx</code></dt>
<dd>Security context for the guest disk images and other assigned host resources</dd>
</dl>
@@ -144,13 +144,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>vcpu</code></dd>
- <dt>old-vcpu</dt>
+ <dt><code>old-vcpu</code></dt>
<dd>Original vCPU count, or 0</dd>
- <dt>new-vcpu</dt>
+ <dt><code>new-vcpu</code></dt>
<dd>Updated vCPU count</dd>
</dl>
@@ -162,13 +162,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>mem</code></dd>
- <dt>old-mem</dt>
+ <dt><code>old-mem</code></dt>
<dd>Original memory size in bytes, or 0</dd>
- <dt>new-mem</dt>
+ <dt><code>new-mem</code></dt>
<dd>Updated memory size in bytes</dd>
</dl>
@@ -178,13 +178,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>disk</code></dd>
- <dt>old-disk</dt>
+ <dt><code>old-disk</code></dt>
<dd>Original host file or device path acting as the disk backing file</dd>
- <dt>new-disk</dt>
+ <dt><code>new-disk</code></dt>
<dd>Updated host file or device path acting as the disk backing file</dd>
</dl>
@@ -195,13 +195,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>net</code></dd>
- <dt>old-net</dt>
+ <dt><code>old-net</code></dt>
<dd>Original MAC address of the guest network interface</dd>
- <dt>new-net</dt>
+ <dt><code>new-net</code></dt>
<dd>Updated MAC address of the guest network interface</dd>
</dl>
@@ -211,13 +211,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>net</code></dd>
- <dt>net</dt>
+ <dt><code>net</code></dt>
<dd>MAC address of the host network interface</dd>
- <dt>rdev</dt>
+ <dt><code>rdev</code></dt>
<dd>Name of the host network interface</dd>
</dl>
@@ -227,13 +227,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>fs</code></dd>
- <dt>old-fs</dt>
+ <dt><code>old-fs</code></dt>
<dd>Original host directory, file or device path backing the filesystem </dd>
- <dt>new-fs</dt>
+ <dt><code>new-fs</code></dt>
<dd>Updated host directory, file or device path backing the filesystem</dd>
</dl>
@@ -243,15 +243,15 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>hostdev</code> or <code>dev</code></dd>
- <dt>dev</dt>
+ <dt><code>dev</code></dt>
<dd>The unique bus identifier of the USB, PCI or SCSI device, if <code>resrc=dev</code></dd>
- <dt>disk</dt>
+ <dt><code>disk</code></dt>
<dd>The path of the block device assigned to the guest, if <code>resrc=hostdev</code></dd>
- <dt>chardev</dt>
+ <dt><code>chardev</code></dt>
<dd>The path of the character device assigned to the guest, if <code>resrc=hostdev</code></dd>
</dl>
@@ -261,11 +261,11 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>tpm</code></dd>
- <dt>device</dt>
+ <dt><code>device</code></dt>
<dd>The path of the host TPM device assigned to the guest</dd>
</dl>
@@ -275,13 +275,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>rng</code></dd>
- <dt>old-rng</dt>
+ <dt><code>old-rng</code></dt>
<dd>Original path of the host entropy source for the RNG</dd>
- <dt>new-rng</dt>
+ <dt><code>new-rng</code></dt>
<dd>Updated path of the host entropy source for the RNG</dd>
</dl>
@@ -291,13 +291,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>chardev</code></dd>
- <dt>old-chardev</dt>
+ <dt><code>old-chardev</code></dt>
<dd>Original path of the backing character device for given emulated device</dd>
- <dt>new-chardev</dt>
+ <dt><code>new-chardev</code></dt>
<dd>Updated path of the backing character device for given emulated device</dd>
</dl>
@@ -307,15 +307,15 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>smartcard</code></dd>
- <dt>old-smartcard</dt>
+ <dt><code>old-smartcard</code></dt>
<dd>Original path of the backing character device, certificate store or
"nss-smartcard-device" for host smartcard passthrough.
</dd>
- <dt>new-smartcard</dt>
+ <dt><code>new-smartcard</code></dt>
<dd>Updated path of the backing character device, certificate store or
"nss-smartcard-device" for host smartcard passthrough.
</dd>
@@ -327,13 +327,13 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>redir</code></dd>
- <dt>bus</dt>
+ <dt><code>bus</code></dt>
<dd>The bus type, only <code>usb</code> allowed</dd>
- <dt>device</dt>
+ <dt><code>device</code></dt>
<dd>The device type, only <code>USB redir</code> allowed</dd>
</dl>
@@ -344,11 +344,11 @@
</p>
<dl>
- <dt>reason</dt>
+ <dt><code>reason</code></dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
- <dt>resrc</dt>
+ <dt><code>resrc</code></dt>
<dd>The type of resource assigned. Set to <code>cgroup</code></dd>
- <dt>cgroup</dt>
+ <dt><code>cgroup</code></dt>
<dd>The name of the cgroup controller</dd>
</dl>
diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in
index d6c57c4..3dc9d59 100644
--- a/docs/drvlxc.html.in
+++ b/docs/drvlxc.html.in
@@ -80,15 +80,15 @@ to be provided by all container technologies on Linux.
</p>
<dl>
-<dt>container</dt>
+<dt><code>container</code></dt>
<dd>The fixed string <code>libvirt-lxc</code> to identify libvirt as the creator</dd>
-<dt>container_uuid</dt>
+<dt><code>container_uuid</code></dt>
<dd>The UUID assigned to the container by libvirt</dd>
-<dt>PATH</dt>
+<dt><code>PATH</code></dt>
<dd>The fixed string <code>/bin:/usr/bin</code></dd>
-<dt>TERM</dt>
+<dt><code>TERM</code></dt>
<dd>The fixed string <code>linux</code></dd>
-<dt>HOME</dt>
+<dt><code>HOME</code></dt>
<dd>The fixed string <code>/</code></dd>
</dl>
@@ -98,11 +98,11 @@ environment variables are also provided
</p>
<dl>
-<dt>LIBVIRT_LXC_NAME</dt>
+<dt><code>LIBVIRT_LXC_NAME</code></dt>
<dd>The name assigned to the container by libvirt</dd>
-<dt>LIBVIRT_LXC_UUID</dt>
+<dt><code>LIBVIRT_LXC_UUID</code></dt>
<dd>The UUID assigned to the container by libvirt</dd>
-<dt>LIBVIRT_LXC_CMDLINE</dt>
+<dt><code>LIBVIRT_LXC_CMDLINE</code></dt>
<dd>The unparsed command line arguments specified in the container configuration.
Use of this is discouraged, in favour of passing arguments directly to the
container init process via the <code>initarg</code> config element.</dd>
diff --git a/docs/formatcaps.html.in b/docs/formatcaps.html.in
index c187187..0ba567c 100644
--- a/docs/formatcaps.html.in
+++ b/docs/formatcaps.html.in
@@ -73,19 +73,19 @@
<dd>This expresses what kind of operating system the hypervisor
is able to run. Possible values are:
<dl>
- <dt>xen</dt>
+ <dt><code>xen</code></dt>
<dd>for XEN</dd>
- <dt>linux</dt>
+ <dt><code>linux</code></dt>
<dd>legacy alias for <code>xen</code></dd>
- <dt>hvm</dt>
+ <dt><code>hvm</code></dt>
<dd>Unmodified operating system</dd>
- <dt>exe</dt>
+ <dt><code>exe</code></dt>
<dd>Container based virtualization</dd>
- <dt>uml</dt>
+ <dt><code>uml</code></dt>
<dd>User Mode Linux</dd>
</dl>
</dd>
@@ -97,37 +97,37 @@
<dd>This optional element encases possible features that can be used
with a guest of described type. Possible subelements are:
<dl>
- <dt>pae</dt><dd>If present, 32-bit guests can use PAE
+ <dt><code>pae</code></dt><dd>If present, 32-bit guests can use PAE
address space extensions, <span class="since">since
0.4.1</span></dd>
- <dt>nonpae</dt><dd>If present, 32-bit guests can be run
+ <dt><code>nonpae</code></dt><dd>If present, 32-bit guests can be run
without requiring PAE, <span class="since">since
0.4.1</span></dd>
- <dt>ia64_be</dt><dd>If present, IA64 guests can be run in
+ <dt><code>ia64_be</code></dt><dd>If present, IA64 guests can be run in
big-endian mode, <span class="since">since 0.4.1</span></dd>
- <dt>acpi</dt><dd>If this element is present,
+ <dt><code>acpi</code></dt><dd>If this element is present,
the <code>default</code> attribute describes whether the
hypervisor exposes ACPI to the guest by default, and
the <code>toggle</code> attribute describes whether the
user can override this
default. <span class="since">Since 0.4.1</span></dd>
- <dt>apic</dt><dd>If this element is present,
+ <dt><code>apic</code></dt><dd>If this element is present,
the <code>default</code> attribute describes whether the
hypervisor exposes APIC to the guest by default, and
the <code>toggle</code> attribute describes whether the
user can override this
default. <span class="since">Since 0.4.1</span></dd>
- <dt>cpuselection</dt><dd>If this element is present, the
+ <dt><code>cpuselection</code></dt><dd>If this element is present, the
hypervisor supports the <code><cpu></code> element
within a domain definition for fine-grained control over
the CPU presented to the
guest. <span class="since">Since 0.7.5</span></dd>
- <dt>deviceboot</dt><dd>If this element is present,
+ <dt><code>deviceboot</code></dt><dd>If this element is present,
the <code><boot order='...'/></code> element can
be used inside devices, rather than the older boot
specification by category. <span class="since">Since
0.8.8</span></dd>
- <dt>disksnapshot</dt><dd>If this element is present,
+ <dt><code>disksnapshot</code></dt><dd>If this element is present,
the <code>default</code> attribute describes whether
external disk snapshots are supported. If absent,
external snapshots may still be supported, but it
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 895114b..a9c657d 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3331,17 +3331,17 @@
...</pre>
<dl>
- <dt>lockspace</dt>
+ <dt><code>lockspace</code></dt>
<dd>This is an arbitrary string, identifying the lockspace
within which the key is held. Lock managers may impose
extra restrictions on the format, or length of the lockspace
name.</dd>
- <dt>key</dt>
+ <dt><code>key</code></dt>
<dd>This is an arbitrary string, uniquely identifying the
lease to be acquired. Lock managers may impose extra
restrictions on the format, or length of the key.
</dd>
- <dt>target</dt>
+ <dt><code>target</code></dt>
<dd>This is the fully qualified path of the file associated
with the lockspace. The offset specifies where the lease
is stored within the file. If the lock manager does not
@@ -3429,12 +3429,12 @@
"subsystem" and the <code>type</code> is one of the following values
with additional attributes noted.
<dl>
- <dt>usb</dt>
+ <dt><code>usb</code></dt>
<dd>USB devices are detached from the host on guest startup
and reattached after the guest exits or the device is
hot-unplugged.
</dd>
- <dt>pci</dt>
+ <dt><code>pci</code></dt>
<dd>For PCI devices, when <code>managed</code> is "yes" it is
detached from the host before being passed on to the guest
and reattached to the host after the guest exits. If
@@ -3445,7 +3445,7 @@
(or <code>virsh nodedev-reattach</code>) after hot-unplug or
stopping the guest.
</dd>
- <dt>scsi</dt>
+ <dt><code>scsi</code></dt>
<dd>For SCSI devices, user is responsible to make sure the device
is not used by host. If supported by the hypervisor and OS, the
optional <code>sgio</code> (<span class="since">since 1.0.6</span>)
@@ -3472,7 +3472,7 @@
<dd>The source element describes the device as seen from the host using
the following mechanism to describe:
<dl>
- <dt>usb</dt>
+ <dt><code>usb</code></dt>
<dd>The USB device can either be addressed by vendor / product id
using the <code>vendor</code> and <code>product</code> elements
or by the device's address on the host using the
@@ -3500,10 +3500,10 @@
</tr>
</table>
</dd>
- <dt>pci</dt>
+ <dt><code>pci</code></dt>
<dd>PCI devices can only be described by their <code>address</code>.
</dd>
- <dt>scsi</dt>
+ <dt><code>scsi</code></dt>
<dd>SCSI devices are described by both the <code>adapter</code>
and <code>address</code> elements. The <code>address</code>
element includes a <code>bus</code> attribute (a 2-digit bus
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 0c40321..edbb948 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -61,18 +61,18 @@
</domainCapabilities>
</pre>
<dl>
- <dt>path</dt>
+ <dt><code>path</code></dt>
<dd>The full path to the emulator binary.</dd>
- <dt>domain</dt>
+ <dt><code>domain</code></dt>
<dd>Describes the <a href="formatdomain.html#elements">virtualization
type</a> (or so called domain type).</dd>
- <dt>machine</dt>
+ <dt><code>machine</code></dt>
<dd>The domain's <a href="formatdomain.html#elementsOSBIOS">machine
type</a>.</dd>
- <dt>arch</dt>
+ <dt><code>arch</code></dt>
<dd>The domain's <a href="formatdomain.html#elementsOSBIOS">
architecture</a>.</dd>
@@ -92,7 +92,7 @@
</pre>
<dl>
- <dt>vcpu</dt>
+ <dt><code>vcpu</code></dt>
<dd>The maximum number of supported virtual CPUs</dd>
</dl>
@@ -126,18 +126,18 @@
<p>For the <code>loader</code> element, the following can occur:</p>
<dl>
- <dt>value</dt>
+ <dt><code>value</code></dt>
<dd>List of known loader paths. Currently this is only used
to advertise known locations of OVMF binaries for qemu. Binaries
will only be listed if they actually exist on disk.</dd>
- <dt>type</dt>
+ <dt><code>type</code></dt>
<dd>Whether loader is a typical BIOS (<code>rom</code>) or
an UEFI binary (<code>pflash</code>). This refers to
<code>type</code> attribute of the <loader/>
element.</dd>
- <dt>readonly</dt>
+ <dt><code>readonly</code></dt>
<dd>Options for the <code>readonly</code> attribute of the
<loader/> element.</dd>
</dl>
@@ -207,11 +207,11 @@
</pre>
<dl>
- <dt>diskDevice</dt>
+ <dt><code>diskDevice</code></dt>
<dd>Options for the <code>device</code> attribute of the <disk/>
element.</dd>
- <dt>bus</dt>
+ <dt><code>bus</code></dt>
<dd>Options for the <code>bus</code> attribute of the <target/>
element for a <disk/>.</dd>
</dl>
@@ -257,23 +257,23 @@
</pre>
<dl>
- <dt>mode</dt>
+ <dt><code>mode</code></dt>
<dd>Options for the <code>mode</code> attribute of the <hostdev/>
element.</dd>
- <dt>startupPolicy</dt>
+ <dt><code>startupPolicy</code></dt>
<dd>Options for the <code>startupPolicy</code> attribute of the
<hostdev/> element.</dd>
- <dt>subsysType</dt>
+ <dt><code>subsysType</code></dt>
<dd>Options for the <code>type</code> attribute of the <hostdev/>
element in case of <code>mode="subsystem"</code>.</dd>
- <dt>capsType</dt>
+ <dt><code>capsType</code></dt>
<dd>Options for the <code>type</code> attribute of the <hostdev/>
element in case of <code>mode="capabilities"</code>.</dd>
- <dt>pciBackend</dt>
+ <dt><code>pciBackend</code></dt>
<dd>Options for the <code>name</code> attribute of the <driver/>
element.</dd>
</dl>
@@ -313,7 +313,7 @@
<p>GIC capabilities are exposed under the <code>gic</code> element.</p>
<dl>
- <dt>version</dt>
+ <dt><code>version</code></dt>
<dd>Options for the <code>version</code> attribute of the
<code>gic</code> element.</dd>
</dl>
diff --git a/docs/locking.html.in b/docs/locking.html.in
index c25ae85..aca1811 100644
--- a/docs/locking.html.in
+++ b/docs/locking.html.in
@@ -23,19 +23,19 @@
</p>
<dl>
- <dt>nop</dt>
+ <dt><code>nop</code></dt>
<dd>This is a "no op" implementation which does absolutely
nothing. This can be used if mutual exclusion between
virtual machines is not required, or if it is being
solved at another level in the management stack.</dd>
- <dt><a href="locking-lockd.html">lockd</a></dt>
+ <dt><code><a href="locking-lockd.html">lockd</a></code></dt>
<dd>This is the current preferred implementation shipped
with libvirt. It uses the <code>virtlockd</code> daemon
to manage locks using the POSIX fcntl() advisory locking
capability. As such it requires a shared filesystem of
some kind be accessible to all hosts which share the
same image storage.</dd>
- <dt><a href="locking-sanlock.html">sanlock</a></dt>
+ <dt><code><a href="locking-sanlock.html">sanlock</a></code></dt>
<dd>This is an alternative implementation preferred by
the oVirt project. It uses a disk paxos algorithm for
maintaining continuously renewed leases. In the default
diff --git a/docs/remote.html.in b/docs/remote.html.in
index dc9b354..ace1577 100644
--- a/docs/remote.html.in
+++ b/docs/remote.html.in
@@ -102,7 +102,7 @@ much slower than, say, direct hypervisor calls. </li>
Remote libvirt supports a range of transports:
</p>
<dl>
- <dt> tls </dt>
+ <dt><code>tls</code></dt>
<dd><a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" title="Transport Layer Security">TLS</a>
1.0 (SSL 3.1) authenticated and encrypted TCP/IP socket, usually
listening on a public port number. To use this you will need to
@@ -110,7 +110,7 @@ Remote libvirt supports a range of transports:
server certificates</a>.
The standard port is 16514.
</dd>
- <dt> unix </dt>
+ <dt><code>unix</code></dt>
<dd> Unix domain socket. Since this is only accessible on the
local machine, it is not encrypted, and uses Unix permissions or
SELinux for authentication.
@@ -119,7 +119,7 @@ Remote libvirt supports a range of transports:
<code>/var/run/libvirt/libvirt-sock-ro</code> (the latter
for read-only connections).
</dd>
- <dt> ssh </dt>
+ <dt><code>ssh</code></dt>
<dd> Transported over an ordinary
<a href="http://www.openssh.com/" title="OpenSSH homepage">ssh
(secure shell)</a> connection.
@@ -130,15 +130,15 @@ Remote libvirt supports a range of transports:
<a href="http://mah.everybody.org/docs/ssh" title="Using ssh-agent with ssh">ssh-agent</a>)
otherwise programs which use
this transport will stop to ask for a password. </dd>
- <dt> ext </dt>
+ <dt><code>ext</code></dt>
<dd> Any external program which can make a connection to the
remote machine by means outside the scope of libvirt. </dd>
- <dt> tcp </dt>
+ <dt><code>tcp</code></dt>
<dd> Unencrypted TCP/IP socket. Not recommended for production
use, this is normally disabled, but an administrator can enable
it for testing or use over a trusted network.
The standard port is 16509. </dd>
- <dt> libssh2 </dt>
+ <dt><code>libssh2</code></dt>
<dd> Transport over the SSH protocol using
<a href="http://libssh2.org/" title="libssh2 homepage">libssh2</a> instead
of the OpenSSH binary. This transport uses the libvirt authentication callback for
--
2.5.5
8 years, 7 months
[libvirt] [PATCH] virconf: Handle conf file without ending newline
by Cole Robinson
$ echo -n 'log_level=1' > ~/.config/libvirt/libvirtd.conf
$ libvirtd --timeout=10
2014-10-10 10:30:56.394+0000: 6626: info : libvirt version: 1.1.3.6, package: 1.fc20 (Fedora Project, 2014-09-08-17:50:42, buildvm-05.phx2.fedoraproject.org)
2014-10-10 10:30:56.394+0000: 6626: error : main:1261 : Can't load config file: configuration file syntax error: /home/rjones/.config/libvirt/libvirtd.conf:1: expecting a value: /home/rjones/.config/libvirt/libvirtd.conf
Rather than try to fix this in the depths of the parser, just catch
the case when a config file doesn't end in a newline, and manually
append a newline to the content before parsing
https://bugzilla.redhat.com/show_bug.cgi?id=1151409
---
src/util/virconf.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 5915bc2..9b19d54 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -765,7 +765,7 @@ virConfReadFile(const char *filename, unsigned int flags)
{
char *content;
int len;
- virConfPtr conf;
+ virConfPtr conf = NULL;
VIR_DEBUG("filename=%s", NULLSTR(filename));
@@ -777,8 +777,16 @@ virConfReadFile(const char *filename, unsigned int flags)
if ((len = virFileReadAll(filename, MAX_CONFIG_FILE_SIZE, &content)) < 0)
return NULL;
+ if (len && len < MAX_CONFIG_FILE_SIZE && content[len - 1] != '\n') {
+ VIR_DEBUG("appending newline to busted config file %s", filename);
+ if (VIR_REALLOC_N(content, len + 1) < 0)
+ goto cleanup;
+ content[len++] = '\n';
+ }
+
conf = virConfParse(filename, content, len, flags);
+ cleanup:
VIR_FREE(content);
return conf;
--
2.7.3
8 years, 7 months
[libvirt] [PATCH 00/14] conf: disk: Continue refactoring of virDomainDiskDefParseXML
by Peter Krempa
This is yet another dump of my quest to despaghettize virDomainDiskDefParseXML.
My eyes are starting to bleed a bit less, but there's still a lot of patches to
come.
Peter Krempa (14):
conf: disk: Extract verification of disk config
conf: disk: Split out parsing of disk <driver> element
conf: disk: Avoid temporary variable when parsing driver name
conf: disk: Sanitize parsing of disk format
conf: disk: Mark VIR_DOMAIN_DISK_IO_DEFAULT as 0 and simplify parsing
conf: disk: Remove custom single-use temporary variables
conf: disk: Extract disk type and device right away
conf: disk: Initialize closed device tray state to 0
conf: disk: Don't bother setting removable state to 0 by default
conf: disk: extract sgio/rawio validation
conf: disk: Extract verification of disk tray
conf: disk: Move validation of disk bus vs disk type
conf: disk: Extract checking of removable status
conf: disk: extract validation of startup policy
src/conf/domain_conf.c | 452 ++++++++++++++++++++++++-------------------------
src/conf/domain_conf.h | 4 +-
2 files changed, 221 insertions(+), 235 deletions(-)
--
2.8.1
8 years, 7 months
[libvirt] [PATCH 0/4] Introduce big test mock
by Michal Privoznik
What?
Big test mock that checks all our file accesses whether we are
touching anything outside $srcdir or $builddir.
Why?
Because it has happened in the past (and is happening even now as
you'll see later) that our test suite produces nondeterministic
results because of a file in live system being accessible or
having some specific value.
How?
Well, this is merely introducing a mock library that every C
program on Linux will use. I'm not aware of any approach for our
shell tests. The mock library then collects all the paths outside
$srcdir or $builddir and prints them into a file. The file is
then checked against a white list, because some accesses might be
desirable.
Unfortunately, as you'll learn in the 4/4 commit message, I was
unable to wire this up to 'make check' so this is accessible
under 'make check-access' target.
If there's some access outside aforementioned directories, the
path will be printed out. So far there is plenty of them. For
instance, in qemuxml2argvtest we are checking
/proc/sys/crypto/fips_enabled for each test. Ouch.
What's left to do?
a) Enhance white list
b) Wire this up to 'check'
c) Test
d) Review
Michal Privoznik (4):
seclabeltest: Update to use VIRT_TEST_MAIN
tests: Introduce global mock library
virtestmock: Print invalid file accesses into a file
tests: Introduce check-file-access.pl
.gitignore | 1 +
HACKING | 11 ++
Makefile.am | 3 +
cfg.mk | 8 +-
docs/hacking.html.in | 15 +++
tests/Makefile.am | 28 +++-
tests/check-file-access.pl | 106 +++++++++++++++
tests/file_access_whitelist.txt | 19 +++
tests/seclabeltest.c | 7 +-
tests/testutils.c | 58 ++++++++-
tests/testutils.h | 29 +----
tests/vircgroupmock.c | 6 +-
tests/virpcimock.c | 6 +-
tests/virtestmock.c | 279 ++++++++++++++++++++++++++++++++++++++++
14 files changed, 535 insertions(+), 41 deletions(-)
create mode 100755 tests/check-file-access.pl
create mode 100644 tests/file_access_whitelist.txt
create mode 100644 tests/virtestmock.c
--
2.7.3
8 years, 7 months
[libvirt] [PATCH] build: Fix default network generation on FreeBSD
by Andrea Bolognani
FreeBSD's sed(1) doesn't support using "\n" to insert a newline,
so the installed default.xml file ends up containing a literal
"n" between tags; to work around this problem, add a tr(1)
invocation as suggested by the sed FAQ[1].
[1] http://sed.sourceforge.net/sedfaq4.html (4.1 c)
---
src/Makefile.am | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index c639e37..f020545 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3072,8 +3072,9 @@ if WITH_NETWORK
$(INSTALL_DATA) $(srcdir)/network/default.xml \
$(DESTDIR)$(confdir)/qemu/networks/default.xml
test -z "$(UUID)" || \
- { sed -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," \
- $(DESTDIR)$(confdir)/qemu/networks/default.xml > \
+ { sed -e "s,</name>,</name>; <uuid>$(UUID)</uuid>," \
+ $(DESTDIR)$(confdir)/qemu/networks/default.xml | \
+ tr ";" "\n" > \
$(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \
cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
$(DESTDIR)$(confdir)/qemu/networks/default.xml && \
--
2.5.5
8 years, 7 months
[libvirt] [PATCH] docs: Update style for <dt> elements
by John Ferlan
Add bolding for <dt> elements to make them "stick out" on the page rather
that just a stream of text where the <dt> elements only differ by slightly
different font style since most uses encase the text within using <code>
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
I had suggested this during a review of Andrea's changes late last month:
http://www.redhat.com/archives/libvir-list/2016-March/msg01501.html
but figure I'll make the more 'formal' patch request...
docs/generic.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/generic.css b/docs/generic.css
index 208e31e..b86bb88 100644
--- a/docs/generic.css
+++ b/docs/generic.css
@@ -25,6 +25,7 @@ ul, ol {
dt {
margin-left: 1em;
margin-right: 2em;
+ font-weight: bold;
}
dl dd {
--
2.5.5
8 years, 7 months
[libvirt] [PATCH] tools: Fix connect command
by Martin Kletzander
The man page says: "(Re)-Connect to the hypervisor. When the shell is
first started, this is automatically run with the URI parameter
requested by the "-c" option on the command line." However, if you run:
virsh -c 'test://default' 'connect; uri'
the output will not be 'test://default'. That's because the 'connect'
command does not care about any virsh-only related settings and if it is
run without parameters, it connects with @uri == NULL. Not only that
doesn't comply to what the man page describes, but it also doesn't make
sense. It also means you aren't able to reconnect to whatever you are
connected currently.
So let's fix that in both virsh and virt-admin add a test case for it.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
tests/test-lib.sh | 6 ++++++
tests/virsh-uriprecedence | 54 +++++++++++++++++++++++++++++++++++------------
tools/virsh.c | 6 ++++--
tools/virt-admin.c | 6 ++++--
4 files changed, 55 insertions(+), 17 deletions(-)
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index 8e0ce83e118c..49e8d2209572 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -232,6 +232,12 @@ if test -n "$VIR_TEST_DEBUG" || test -n "$VIR_TEST_VERBOSE" ; then
verbose=1
fi
+debug() { :; }
+
+if test "$VIR_TEST_DEBUG" = "2"; then
+ debug() { echo "$@"; }
+fi
+
# This is a stub function that is run upon trap (upon regular exit and
# interrupt). Override it with a per-test function, e.g., to unmount
# a partition, or to undo any other global state changes.
diff --git a/tests/virsh-uriprecedence b/tests/virsh-uriprecedence
index f9e325658900..4bcce3aeb08f 100755
--- a/tests/virsh-uriprecedence
+++ b/tests/virsh-uriprecedence
@@ -8,7 +8,8 @@
test_intro "virsh-uriprecedence"
virsh_bin="$abs_top_builddir/tools/virsh"
-counter=1
+virsh_cmd="$virsh_bin"
+counter=0
ret=0
cleanup_() { rm -rf "$tmphome"; }
@@ -23,16 +24,44 @@ mkdir -p "$XDG_CONFIG_HOME/libvirt" "$XDG_CONFIG_HOME/virsh"
mkdir -p "$XDG_CACHE_HOME/libvirt" "$XDG_CACHE_HOME/virsh"
mkdir -p "$XDG_RUNTIME_HOME/libvirt" "$XDG_RUNTIME_HOME/virsh"
-# Main function checking for the proper uri being returned
+is_uri_good()
+{
+ echo "$1" | grep -q -F "$good_uri"
+}
+
+test_uri_internal()
+{
+ test_name=$1
+ test_cmd="$virsh_cmd \"$2\""
+ result=0
+
+ debug "Running '$test_cmd'"
+ out="$($virsh_cmd "$2")"
+
+ if ! is_uri_good "$out"; then
+ debug "Invalid output: '$out'"
+ result=1
+ ret=1
+ fi
+
+ counter="$((counter+1))"
+ test_result "$counter" "$1" "$result"
+}
+
+test_uri_connect()
+{
+ test_uri_internal "$1" "connect; uri"
+}
+
+test_uri_noconnect()
+{
+ test_uri_internal "$1" "uri"
+}
+
test_uri()
{
- result=0
- if [ "$($virsh_bin uri)" != "$good_uri" ]; then
- result=1
- ret=1
- fi
- test_result "$counter" "$1" "$result"
- counter="$((counter+1))"
+ test_uri_connect "$1"
+ test_uri_noconnect "$1"
}
# Precedence is the following (lowest priority first):
@@ -57,6 +86,7 @@ good_uri="test:///default?good_uri"
printf "uri_default=\"%s\"\n" "$good_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
if uid_is_privileged_; then
+ counter="$((counter+1))"
test_skip_case "$counter" "User config file" "must not be run as root"
else
test_uri "User config file"
@@ -71,10 +101,8 @@ export VIRSH_DEFAULT_CONNECT_URI="$good_uri"
test_uri "VIRSH_DEFAULT_CONNECT_URI"
export VIRSH_DEFAULT_CONNECT_URI="$bad_uri"
-virsh_bin="$virsh_bin --connect $good_uri"
+virsh_cmd="$virsh_bin --connect $good_uri"
test_uri "Parameter"
-# test_uri() increases $counter even for the last test, so we must
-# decrement it
-test_final "$((counter-1))" "$ret"
+test_final "$counter" "$ret"
(exit "$ret"); exit "$ret"
diff --git a/tools/virsh.c b/tools/virsh.c
index 366956cd5c75..d17aaf0be8ea 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -306,11 +306,13 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
priv->conn = NULL;
}
- VIR_FREE(ctl->connname);
if (vshCommandOptStringReq(ctl, cmd, "name", &name) < 0)
return false;
- ctl->connname = vshStrdup(ctl, name);
+ if (name) {
+ VIR_FREE(ctl->connname);
+ ctl->connname = vshStrdup(ctl, name);
+ }
priv->useGetInfo = false;
priv->useSnapshotOld = false;
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 22160ad929d0..4275aa37a1bf 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -291,8 +291,10 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptStringReq(ctl, cmd, "name", &name) < 0)
return false;
- VIR_FREE(ctl->connname);
- ctl->connname = vshStrdup(ctl, name);
+ if (name) {
+ VIR_FREE(ctl->connname);
+ ctl->connname = vshStrdup(ctl, name);
+ }
vshAdmReconnect(ctl);
if (!connected)
--
2.8.1
8 years, 7 months
[libvirt] [PATCH] tests: Use system() for test-wrap-argv.pl
by Cole Robinson
virCommand doesn't buy us anything here, and this simplifies the
code. There's another usage of system() in testutils.c already FWIW,
though it predates virCommand
---
Had this sitting in a branch from an earlier discussion... I figure
system() is safe in the test suite but I'm not going to argue if
someone feels strongly the other way
tests/testutils.c | 26 ++++++--------------------
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/tests/testutils.c b/tests/testutils.c
index 79d0763..7664b06 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -432,28 +432,14 @@ virtTestCaptureProgramOutput(const char *const argv[] ATTRIBUTE_UNUSED,
static int
virTestRewrapFile(const char *filename)
{
- int ret = -1;
- char *outbuf = NULL;
- char *script = NULL;
- virCommandPtr cmd = NULL;
-
- if (virAsprintf(&script, "%s/test-wrap-argv.pl", abs_srcdir) < 0)
- goto cleanup;
-
- cmd = virCommandNewArgList(script, filename, NULL);
- virCommandSetOutputBuffer(cmd, &outbuf);
- if (virCommandRun(cmd, NULL) < 0)
- goto cleanup;
+ char *cmd;
- if (virFileWriteStr(filename, outbuf, 0666) < 0)
- goto cleanup;
+ /* The 'echo' syntax lets us read and write the file in one shot */
+ if (virAsprintf(&cmd, "echo \"$(%s/test-wrap-argv.pl %s)\" > %s",
+ abs_srcdir, filename, filename) < 0)
+ return -1;
- ret = 0;
- cleanup:
- VIR_FREE(script);
- virCommandFree(cmd);
- VIR_FREE(outbuf);
- return ret;
+ return system(cmd);
}
/**
--
2.7.3
8 years, 7 months
[libvirt] [PATCH] lxc: explicitly error on interface type=ethernet
by Cole Robinson
It isn't implemented and does not work:
error: internal error: guest failed to start: /usr/lib/libvirt/libvirt_lxc: option '--veth' requires an argument
syntax: /usr/lib/libvirt/libvirt_lxc [OPTIONS] ...
We previously threw an explicit error, but this changed in
22cff52a2b8e06c913b1f97767e5d390fb17fc3b , which I suspect was
untested for LXC
---
src/lxc/lxc_process.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 5e0bbe2..0044ee5 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -559,8 +559,6 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
break;
case VIR_DOMAIN_NET_TYPE_ETHERNET:
- break;
-
case VIR_DOMAIN_NET_TYPE_USER:
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
case VIR_DOMAIN_NET_TYPE_SERVER:
--
2.7.3
8 years, 7 months
[libvirt] [libvirt-glib] events: Mark 'eventlock' as static
by Christophe Fergeau
It's not used outside of the libvirt-glib-event.c file, so there is no
good reason for not having it static. As it was not listed in
libvirt-glib.sym, this will make no change to the publicly exported
symbols (ie this is not an ABI change).
---
libvirt-glib/libvirt-glib-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-glib/libvirt-glib-event.c b/libvirt-glib/libvirt-glib-event.c
index f8227d6..4548aa6 100644
--- a/libvirt-glib/libvirt-glib-event.c
+++ b/libvirt-glib/libvirt-glib-event.c
@@ -110,7 +110,7 @@ struct gvir_event_timeout
virFreeCallback ff;
};
-GMutex *eventlock = NULL;
+static GMutex *eventlock = NULL;
static int nextwatch = 1;
static GPtrArray *handles;
--
2.5.0
8 years, 7 months