[Cluster-devel] [PATCHv2 2/6] rgmanager: ra2rng.xsl: common params: finish datatyping/constraints
Jan Pokorný
jpokorny at redhat.com
Mon Dec 9 20:42:12 UTC 2013
Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
---
rgmanager/src/resources/ra2rng.xsl | 61 +++++++++++++++++++++++++++++++++-----
1 file changed, 53 insertions(+), 8 deletions(-)
diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl
index 26218e6..8d22c60 100644
--- a/rgmanager/src/resources/ra2rng.xsl
+++ b/rgmanager/src/resources/ra2rng.xsl
@@ -15,17 +15,62 @@
<int:common-optional-parameters>
<optional>
- <attribute name="__independent_subtree" rha:description="Treat this and all children as an independent subtree."/>
- </optional>
- <optional>
- <attribute name="__enforce_timeouts" rha:description="Consider a timeout for operations as fatal."/>
- </optional>
- <optional>
- <attribute name="__max_failures" rha:description="Maximum number of failures before returning a failure to a status check."/>
+ <attribute name="__independent_subtree" rha:description="Treat this and all children as an independent subtree.">
+ <data type="string">
+ <param name="pattern">\s*[12]\s*|[Yy][Ee][Ss]|[Nn][Oo][Nn]-[Cc][Rr][Ii][Tt][Ii][Cc][Aa][Ll]</param>
+ </data>
+ </attribute>
</optional>
<optional>
- <attribute name="__failure_expire_time" rha:description="Amount of time before a failure is forgotten."/>
+ <attribute name="__enforce_timeouts" rha:description="Consider a timeout for operations as fatal.">
+ <data type="string">
+ <param name="pattern">\s*[1-9][0-9]*\s*|[Yy][Ee][Ss]</param>
+ </data>
+ </attribute>
</optional>
+
+ <!-- failures -->
+ <choice datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!--
+ __max_failures and __failure_expire_time only make sense
+ when defined altogether and contain valid non-zero value
+ -->
+ <group>
+ <attribute name="__max_failures" rha:description="Maximum number of failures before returning a failure to a status check.">
+ <data type="int">
+ <param name="minExclusive">0</param>
+ </data>
+ </attribute>
+ <attribute name="__failure_expire_time" rha:description="Amount of time before a failure is forgotten.">
+ <data type="string">
+ <param name="pattern">.*[1-9][0-9]*([SsMmHhDdWwYy].*|)</param>
+ </data>
+ </attribute>
+ </group>
+ <group>
+ <optional>
+ <attribute name="__max_failures">
+ <!-- while negative value is not a strict error as it is
+ silently turned to zero, don't promote such a liberty
+ -->
+ <value type="int">0</value>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="__failure_expire_time">
+ <data type="string">
+ <except>
+ <data type="string">
+ <param name="pattern">.*[1-9][0-9]*([SsMmHhDdWwYy].*|)</param>
+ </data>
+ </except>
+ </data>
+ </attribute>
+ </optional>
+ </group>
+ </choice>
+
+ <!-- restarts -->
<choice datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<!--
__max_restarts and __restart_expire_time only make sense
--
1.8.1.4
More information about the Cluster-devel
mailing list