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

[Cluster-devel] [PATCHv2 5/6] rgmanager: ra2rng.xsl: fs-*: datatype/restrict the params



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 98d91f2..61329d3 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 at 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">/[^\s#x0100-#x10FFFF]+</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">/[^\s#x0100-#x10FFFF]+|(UUID|LABEL)=[^#x0100-#x10FFFF]+</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">/[^\s#x0100-#x10FFFF]+</param>
+                <param name="maxLength">31</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="force_unmount">
+            <data type="token">
+                <!-- 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>
+                <param name="enumeration">false</param>
+                <param name="enumeration">true</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="quick_status">
+            <data type="string">
+                <!-- note: a bit stricter than what the code enforces -->
+                <param name="enumeration">0</param>
+                <param name="enumeration">1</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="self_fence">
+            <data type="token">
+                <!-- 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>
+                <param name="enumeration">false</param>
+                <param name="enumeration">true</param>
+                <param name="enumeration">off</param>
+                <param name="enumeration">on</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="nfsrestart">
+            <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="fsid">
+            <data type="string">
+                <!-- prevent from whitespace breaking fragile handling -->
+                <param name="pattern">\S+</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="force_fsck">
+            <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="options">
+            <data type="string">
+                <!-- prevent from whitespace breaking fragile handling -->
+                <param name="pattern">\S+</param>
+            </data>
+        </int:parameter>
+        <int:parameter name="use_findmnt">
+            <data type="token">
+                <!-- 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>
+                <param name="enumeration">false</param>
+                <param name="enumeration">true</param>
+                <param name="enumeration">off</param>
+                <param name="enumeration">on</param>
+            </data>
+        </int:parameter>
+    </int:agent>
     <!-- IP -->
     <int:agent name="ip">
         <int:parameter name="address">
-- 
1.8.1.4


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