On 07/11/2014 04:11 AM, Peter Krempa wrote:
Gluster volumes don't start with a leading slash. Our schema for
netfs
gluster pools enforces it though. Luckily mount.glusterfs skips it.
Allow a slashless volume name for glusterfs netfs mounts in the schema.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1101999
---
docs/schemas/basictypes.rng | 6 +++
docs/schemas/storagepool.rng | 44 +++++++++++++++++-----
.../pool-netfs-gluster-without-slash.xml | 12 ++++++
3 files changed, 53 insertions(+), 9 deletions(-)
create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-gluster-without-slash.xml
diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
index 5fe3a97..9c9419f 100644
--- a/docs/schemas/basictypes.rng
+++ b/docs/schemas/basictypes.rng
@@ -231,6 +231,12 @@
</data>
</define>
+ <define name="dirPath">
+ <data type="string">
+ <param
name="pattern">[a-zA-Z0-9_\.\+\-\\&"'<>/%]*</param>
This allows the empty string...
+ </data>
+ </define>
+
<define name="absFilePath">
<data type="string">
<param
name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
...while this required a leading slash and at least one other character.
I think you want + instead of * in the first pattern.
ACK with that fixed.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org