On Tue, Sep 18, 2012 at 05:52:28PM +0200, Michal Privoznik wrote:
---
.gitignore | 1 +
examples/Makefile.am | 11 ++++
examples/virtxml.pod | 121 ++++++++++++++++++++++++++++++++++++++++++++++
It's weird to have it in examples/ while one of the commit adds a docs/
directory. I'd move the gtkdoc to docs/reference, and the manpage to docs/.
diff --git a/examples/virtxml.pod b/examples/virtxml.pod
new file mode 100644
index 0000000..80a4edf
--- /dev/null
+++ b/examples/virtxml.pod
@@ -0,0 +1,121 @@
+=head1 NAME
+
+virtxml - Generate domain XML
+
+=head1 SYNOPSIS
+
+B<virrtxml> [I<OPTION>]...
virtxml
+
+=head1 DESCRIPTION
+
+The B<virtxml> is a command line tool for generating XML documents for
I'd drop the 'The'
+libvirt domains. However, it cooperates with libosinfo database to
guess
+the correct combination of attributes (e.g. disk driver, NIC model).
+
+The B<virtxml> does not feed libvirt with generated XML though. For now,
+it's a proof of concept.
ditto
+
+=head1 OPTIONS
+
+The basic structure of arguments passed to B<virtxml> is:
+
+ virtxml [-c URI] [OPTION] [OPTION] ...
+
+However, arguments have no pre-defined order so users can type them
+in any order they like.
+
+=head2 General Options
+
+=over 2
+
+=item -c URI, --connect=URI
+
+The libvirt connection URI which is used for querying capabilities of the
+host.
+
+=item --list-os
+
+List IDs of operating systems known to libosinfo
+
+=item --list-platform
+
+List IDs of platforms known to libosinfo
+
+=item -o OS, --os=OS
+
+Specify operating system that will be ran on the domain. I<OS> is an ID
+which can be obtained via B<--list-os>.
"that will be run" I think
+
+=item -p PLATFORM, --platform=PLATFORM
+
+Specify platform (hypervisor) under which will the domain run. I<PLATFORM>
+is and ID which can be obtained via I<--list-platform>.
under which the domain will run
+
+=item -a ARCH, --architecture=ARCH
+
+Set domain's architecture
+
+=item -d PATH[,FORMAT] --disk=PATH[,FORMAT]
+
+Add I<PATH> as a disk to the domain. To specify its format (e.g. raw,
+qcow2, phy) use I<FORMAT>.
+
+=item -i NETWORK[,ARG=VAL]
+
+Add an interface of type network with I<NETWORK> source. Moreover, some
+other configuration knobs can be set (possible I<ARG>s): I<mac>,
+I<link>={up|down}
+
+=item -r RESOURCE, --resources=RESOURCES
+
+Set I<minimal> or I<recommended> resources on the domain XML. By default,
+the I<recommended> is used.
+
+=back
+
+Usually, both B<--os> and B<--platform> are required as they are needed to
+make the right decision on driver, model, ... when adding a new device.
+However, when adding a disk which is installation medium (e.g. a CD-ROM or
an installation medium
+DVD), B<virtxml> tries to guess the OS. Something similar is
done with
+platform. Usually, the platform is guessed from connection URI.
+
"from the connection URI" maybe (?)
Christophe