[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 4/6] rgmanager: ra2rng.xsl: ip-*: datatype/restrict the params



Signed-off-by: Jan Pokorný <jpokorny redhat com>
---
 rgmanager/src/resources/ra2rng.xsl | 65 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl
index d781dbe..da84ae3 100644
--- a/rgmanager/src/resources/ra2rng.xsl
+++ b/rgmanager/src/resources/ra2rng.xsl
@@ -15,6 +15,71 @@
 
 <int:agent-parameter-specialization>
     <!-- int:agent @name="..." > int:parameter @name="..." > PATTERN -->
+    <!-- IP -->
+    <int:agent name="ip">
+        <int:parameter name="address">
+            <data type="token">
+                <!-- only approximate regexp -->
+                <param name="pattern">[0-9A-Fa-f.:]+([/][0-9]+)?</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="family">
+            <data type="token">
+                <!-- note: "auto" is more like original expectation, but
+                     enforce it to prevent arbitrary non-senses in this
+                     context like uppercased INET6 -->
+                <param name="enumeration">auto</param>
+                <param name="enumeration">inet</param>
+                <param name="enumeration">inet6</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="monitor_link">
+            <data type="string">
+                <!-- note: a bit stricter than what the code enforces -->
+                <param name="enumeration">0</param>
+                <param name="enumeration">1</param>
+                <param name="enumeration">no</param>
+                <param name="enumeration">yes</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="nfslock">
+            <data type="string">
+                <!-- note: a bit stricter than what the code enforces -->
+                <param name="enumeration">0</param>
+                <param name="enumeration">1</param>
+                <param name="enumeration">no</param>
+                <param name="enumeration">yes</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="sleeptime">
+            <data type="int">
+                <param name="minExclusive">0</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="disable_rdisc">
+            <data type="string">
+                <!-- note: a bit stricter than what the code enforces -->
+                <param name="enumeration">0</param>
+                <param name="enumeration">1</param>
+                <param name="enumeration">no</param>
+                <param name="enumeration">yes</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="prefer_interface">
+            <data type="string">
+                <!-- note: can be up to max(IFNAMSIZ,IFALIASZ) - 1 characters
+                     where from include/linux/if.h IFNAMSIZ = 16, IFALIASZ = 256
+                     and the terminating null character is subtracted:
+                     http://www.gnu.org/software/libc/manual/html_node/Interface-Naming.html
+                     resulting in 255 characters (at least one has to be given,
+                     at least it would be a bit insane to have an interface
+                     called "") -->
+                <param name="minLength">1</param>
+                <param name="maxLength">255</param>
+                <param name="pattern">[^\s#x0100-#x10FFFF]+</param>
+            </data>
+        </int:parameter>
+    </int:agent>
     <!-- SCRIPT -->
     <int:agent name="script">
         <int:parameter name="file">
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]