[libvirt] [PATCH v4 08/10] docs, tests: Add schema, description, and tests for NFS namespace

Daniel P. Berrangé berrange at redhat.com
Tue Jan 29 12:10:45 UTC 2019


On Thu, Jan 17, 2019 at 04:22:14PM -0500, John Ferlan wrote:
> Modify the storagepool.rng to allow for the usage of a different
> XML namespace to parse the netfs_mount_opts to be included with
> the netfs storage pool definition.
> 
> Modify the storagepoolxml2xmltest to utilize a properly modified
> XML file to parse and format the namespace for a netfs storage pool.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  docs/formatstorage.html.in                    | 57 +++++++++++++++++++
>  docs/schemas/storagepool.rng                  | 20 +++++++
>  tests/Makefile.am                             |  4 +-
>  .../pool-netfs-ns-mountopts.xml               | 25 ++++++++
>  .../pool-netfs-ns-mountopts.xml               | 25 ++++++++
>  tests/storagepoolxml2xmltest.c                |  6 ++
>  6 files changed, 136 insertions(+), 1 deletion(-)
>  create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-ns-mountopts.xml
>  create mode 100644 tests/storagepoolxml2xmlout/pool-netfs-ns-mountopts.xml

I would have expected all this stuff to be introduced in the previous
patch really, since its exercising the parser code the previous patch
added

> +    <h3><a id="StoragePoolNamespaces">Storage Pool Namespaces</a></h3>
> +
> +    <p>
> +      Usage of Storage Pool Namespaces provides a mechanism to provide
> +      pool type specific data in a free form or abitrary manner via
> +      XML syntax targeted solely for the needs of the specific pool type
> +      which is not otherwise supportable via XML. For the "netfs" pool
> +      this provides a mechanism to provide additional mount options on the
> +      command line.
> +    </p>

This needs to have text to make it clear that using this feature comes
with *no* support guarantees. It should say it is only intended for
developers testing out a concept prior to requesting an explicitly
supported XML option in libvirt, and thus should never be used in
production.

> +    <dl>
> +      <dt><code>netfs:mount_opts</code></dt>
> +      <dd>Provides an XML namespace mechanism to optionally utilize
> +        specifically named options for the mount command via the "-o"
> +        option for the <code>netfs</code> type storage pools. In order
> +        to designate that the Storage Pool will be using the mechanism,
> +        the <code>pool</code> element must be modified to provide the
> +        XML namespace attribute syntax as follows:
> +
> +        <p>
> +        xmlns:netfs='http://libvirt.org/schemas/storagepool/source/netfs/1.0'
> +        </p>
> +
> +        <p>
> +        The <code>netfs:mount_opts</code> defines the mount options by
> +        specifying multiple <code>netfs:option</code> subelements with
> +        the attribute <code>name</code> specifying the mount option to
> +        be added. The value of the named option is not checked since
> +        it's possible options don't exist on all distributions. It is
> +        expected that proper and valid options will be supplied for the
> +        target host.
> +        </p>
> +
> +        The following XML snippet shows the syntax required in order to
> +        utilize
> +      <pre>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list