From: Jan Pokorný <jpokorny@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCHv3 5/6] rgmanager: ra2rng.xsl: fs-*: datatype/restrict the params
Date: Mon, 9 Dec 2013 21:45:07 +0100 [thread overview]
Message-ID: <1386621907-6625-1-git-send-email-jpokorny@redhat.com> (raw)
In-Reply-To: <1386338544-1819-1-git-send-email-jpokorny@redhat.com>
Signed-off-by: Jan Pokorn? <jpokorny@redhat.com>
---
rgmanager/src/resources/ra2rng.xsl | 113 +++++++++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+)
diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl
index 1745460..0de30ef 100644
--- a/rgmanager/src/resources/ra2rng.xsl
+++ b/rgmanager/src/resources/ra2rng.xsl
@@ -15,6 +15,119 @@
<int:agent-parameter-specialization>
<!-- int:agent @name="..." > int:parameter @name="..." > PATTERN -->
+ <!-- FS -->
+ <int:agent name="fs">
+ <!-- int:parameter name="name"/ -->
+ <int:parameter name="mountpoint">
+ <data type="string">
+ <!-- only enforce starting with slash and@the very least
+ one non-zero length component (otherwise not sane);
+ maximum path length is as per PATH_MAX - 1 (4095)
+ from /usr/include/linux/limits.h -->
+ <param name="pattern">/[\p{IsBasicLatin}\p{IsLatin-1Supplement}-[\s]]+</param>
+ <param name="maxLength">4095</param>
+ </data>
+ </int:parameter>
+ <int:parameter name="device">
+ <data type="string">
+ <!-- like mountpoint + can be specified by UUID=XYZ
+ or LABEL=XYZ -->
+ <param name="pattern">/[\p{IsBasicLatin}\p{IsLatin-1Supplement}-[\s]]+|(UUID|LABEL)=[\p{IsBasicLatin}\p{IsLatin-1Supplement}]+</param>
+ <param name="maxLength">4095</param>
+ </data>
+ </int:parameter>
+ <int:parameter name="fstype">
+ <data type="token">
+ <!-- fs.sh only checks for cifs, nfs and nfs4;
+ length of 31 is a reasonable overapproximation -->
+ <param name="pattern">[\p{IsBasicLatin}\p{IsLatin-1Supplement}-[\s]]+</param>
+ <param name="maxLength">31</param>
+ </data>
+ </int:parameter>
+ <int:parameter name="force_unmount">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="token">0</value>
+ <value type="token">1</value>
+ <value type="token">no</value>
+ <value type="token">yes</value>
+ <value type="token">false</value>
+ <value type="token">true</value>
+ </choice>
+ </int:parameter>
+ <int:parameter name="quick_status">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="string">0</value>
+ <value type="string">1</value>
+ </choice>
+ </int:parameter>
+ <int:parameter name="self_fence">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="token">0</value>
+ <value type="token">1</value>
+ <value type="token">no</value>
+ <value type="token">yes</value>
+ <value type="token">false</value>
+ <value type="token">true</value>
+ <value type="token">off</value>
+ <value type="token">on</value>
+ </choice>
+ </int:parameter>
+ <int:parameter name="nfslock">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="string">0</value>
+ <value type="string">1</value>
+ <value type="string">no</value>
+ <value type="string">yes</value>
+ </choice>
+ </int:parameter>
+ <int:parameter name="nfsrestart">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="string">0</value>
+ <value type="string">1</value>
+ <value type="string">no</value>
+ <value type="string">yes</value>
+ </choice>
+ </int:parameter>
+ <int:parameter name="fsid">
+ <data type="string">
+ <!-- prevent from whitespace breaking fragile handling -->
+ <param name="pattern">\S+</param>
+ </data>
+ </int:parameter>
+ <int:parameter name="force_fsck">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="string">0</value>
+ <value type="string">1</value>
+ <value type="string">no</value>
+ <value type="string">yes</value>
+ </choice>
+ </int:parameter>
+ <int:parameter name="options">
+ <data type="string">
+ <!-- prevent from whitespace breaking fragile handling -->
+ <param name="pattern">\S*</param>
+ </data>
+ </int:parameter>
+ <int:parameter name="use_findmnt">
+ <choice>
+ <!-- note: a bit stricter than what the code enforces -->
+ <value type="token">0</value>
+ <value type="token">1</value>
+ <value type="token">no</value>
+ <value type="token">yes</value>
+ <value type="token">false</value>
+ <value type="token">true</value>
+ <value type="token">off</value>
+ <value type="token">on</value>
+ </choice>
+ </int:parameter>
+ </int:agent>
<!-- IP -->
<int:agent name="ip">
<int:parameter name="address">
--
1.8.1.4
next prev parent reply other threads:[~2013-12-09 20:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 17:24 [Cluster-devel] [resource-agents][PATCH 0/6] rgmanager: ra2rng.xsl: IP+FS params datatyping Jan Pokorný
2013-12-05 17:24 ` [Cluster-devel] [PATCH 1/6] rgmanager: ra2rng.xsl: adjust pretty-print to capture full node Jan Pokorný
2013-12-09 20:41 ` [Cluster-devel] [PATCHv2 " Jan Pokorný
2013-12-05 17:24 ` [Cluster-devel] [PATCH 2/6] rgmanager: ra2rng.xsl: common params: finish datatyping/constraints Jan Pokorný
2013-12-09 20:42 ` [Cluster-devel] [PATCHv2 " Jan Pokorný
2013-12-05 17:24 ` [Cluster-devel] [PATCH 3/6] rgmanager: ra2rng.xsl: common params: just refer to named pattern Jan Pokorný
2013-12-09 20:43 ` [Cluster-devel] [PATCHv2 " Jan Pokorný
2013-12-05 17:24 ` [Cluster-devel] [PATCH 4/6] rgmanager: ra2rng.xsl: ip-*: datatype/restrict the params Jan Pokorný
2013-12-05 20:02 ` [Cluster-devel] [PATCHv2 " Jan Pokorný
2013-12-09 20:44 ` [Cluster-devel] [PATCHv3 " Jan Pokorný
2013-12-05 17:24 ` [Cluster-devel] [PATCH 5/6] rgmanager: ra2rng.xsl: fs-*: " Jan Pokorný
2013-12-06 14:02 ` [Cluster-devel] [PATCHv2 " Jan Pokorný
2013-12-09 20:45 ` Jan Pokorný [this message]
2013-12-05 17:24 ` [Cluster-devel] [PATCH 6/6] rgmanager: ra2rng.xsl: {ip, fs}-nfslock: use common wildcard block Jan Pokorný
2013-12-05 17:31 ` [Cluster-devel] [PATCHv2 " Jan Pokorný
2013-12-05 20:03 ` [Cluster-devel] [PATCHv3 " Jan Pokorný
2013-12-05 21:07 ` [Cluster-devel] [PATCHv4 " Jan Pokorný
2013-12-06 14:13 ` [Cluster-devel] [PATCHv5 " Jan Pokorný
2013-12-09 20:45 ` [Cluster-devel] [PATCHv6 " Jan Pokorný
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386621907-6625-1-git-send-email-jpokorny@redhat.com \
--to=jpokorny@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).