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(a)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
+ <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>
+<pool type="netfs"
xmlns:netfs='http://libvirt.org/schemas/storagepool/source/netfs/1.0&...
+ <name>nfsimages</name>
+...
+ <source>
+...
+ </source>
+...
+ <target>
+...
+ </target>
+ <netfs:mount_opts>
+ <netfs:option name='sync'/>
+ <netfs:option name='lazytime'/>
+ </netfs:mount_opts>
+</pool>
+...</pre>
+
Based on my comments in the first patch, we should acutally just
call this 'fs' not 'netfs' and allow it for any filesystem mount
pool, as this is valid for cifs, glusterfs, and local filesystems
too.
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 :|