From: Jan Pokorný <jpokorny@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 3/6] rgmanager: ra2rng.xsl: common params: just refer to named pattern
Date: Thu, 5 Dec 2013 18:24:12 +0100 [thread overview]
Message-ID: <1386264255-22340-4-git-send-email-jpokorny@redhat.com> (raw)
In-Reply-To: <1386264255-22340-1-git-send-email-jpokorny@redhat.com>
...in resources.rng.tail where it has been moved out
Signed-off-by: Jan Pokorn? <jpokorny@redhat.com>
---
rgmanager/src/resources/ra2rng.xsl | 117 +++--------------------------
rgmanager/src/resources/resources.rng.tail | 93 +++++++++++++++++++++++
2 files changed, 102 insertions(+), 108 deletions(-)
diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl
index 78fbe35..d781dbe 100644
--- a/rgmanager/src/resources/ra2rng.xsl
+++ b/rgmanager/src/resources/ra2rng.xsl
@@ -13,109 +13,6 @@
helper definitions
-->
-<int:common-optional-parameters>
- <optional>
- <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="__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">
- <data type="int">
- <!-- while negative value is not a strict error as
- it is silently turned to zero, don't promote
- such a liberty -->
- <param name="enumeration">0</param>
- </data>
- </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
- when defined altogether and contain valid non-zero value
- -->
- <group>
- <attribute name="__max_restarts" rha:description="Maximum number restarts for an independent subtree before giving up.">
- <data type="int">
- <param name="minExclusive">0</param>
- </data>
- </attribute>
- <attribute name="__restart_expire_time" rha:description="Amount of time before a failure is forgotten for an independent subtree.">
- <data type="string">
- <param name="pattern">.*[1-9][0-9]*([SsMmHhDdWwYy].*|)</param>
- </data>
- </attribute>
- </group>
- <group>
- <optional>
- <attribute name="__max_restarts">
- <data type="int">
- <!-- while negative value is not a strict error as
- it is silently turned to zero, don't promote
- such a liberty -->
- <param name="enumeration">0</param>
- </data>
- </attribute>
- </optional>
- <optional>
- <attribute name="__restart_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>
-</int:common-optional-parameters>
-
<int:agent-parameter-specialization>
<!-- int:agent @name="..." > int:parameter @name="..." > PATTERN -->
<!-- SCRIPT -->
@@ -474,13 +371,17 @@
select="concat($global-init-indent,
$global-indent)"/>
</xsl:call-template>
+ <xsl:value-of select="$NL"/>
- <!-- "paste" int:common-optional-parameters from above here -->
- <xsl:call-template name="pretty-print">
- <xsl:with-param name="indented" select="$global-init-indent"/>
- <xsl:with-param name="fill-with"
- select="document('')/*/int:common-optional-parameters/node()"/>
+ <xsl:call-template name="tag">
+ <xsl:with-param name="name" select="'ref'"/>
+ <xsl:with-param name="attrs" select="concat(
+ 'name=', $Q, 'RESOURCECOMMONPARAMS', $Q)"/>
+ <xsl:with-param name="indented"
+ select="concat($global-init-indent,
+ $global-indent)"/>
</xsl:call-template>
+ <xsl:value-of select="$NL"/>
<!-- optional (start) -->
<xsl:call-template name="tag-start">
diff --git a/rgmanager/src/resources/resources.rng.tail b/rgmanager/src/resources/resources.rng.tail
index 4434631..d2c1fcb 100644
--- a/rgmanager/src/resources/resources.rng.tail
+++ b/rgmanager/src/resources/resources.rng.tail
@@ -4,6 +4,99 @@
</zeroOrMore>
</define>
+ <define name="RESOURCECOMMONPARAMS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <optional>
+ <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="__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>
+ <!-- __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">
+ <data type="int">
+ <!-- while negative value is not a strict error as it is silently turned to zero, don't promote such a liberty -->
+ <param name="enumeration">0</param>
+ </data>
+ </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>
+ <!-- __max_restarts and __restart_expire_time only make sense when defined altogether and contain valid non-zero value -->
+ <group>
+ <attribute name="__max_restarts" rha:description="Maximum number restarts for an independent subtree before giving up.">
+ <data type="int">
+ <param name="minExclusive">0</param>
+ </data>
+ </attribute>
+ <attribute name="__restart_expire_time" rha:description="Amount of time before a failure is forgotten for an independent subtree.">
+ <data type="string">
+ <param name="pattern">.*[1-9][0-9]*([SsMmHhDdWwYy].*|)</param>
+ </data>
+ </attribute>
+ </group>
+ <group>
+ <optional>
+ <attribute name="__max_restarts">
+ <data type="int">
+ <!-- while negative value is not a strict error as it is silently turned to zero, don't promote such a liberty -->
+ <param name="enumeration">0</param>
+ </data>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="__restart_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>
+ </define>
+
<define name="RESOURCEACTION">
<zeroOrMore>
<element name="action" rha:description="Overrides resource action timings for a resource instance.">
--
1.8.1.4
next prev parent reply other threads:[~2013-12-05 17:24 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 ` Jan Pokorný [this message]
2013-12-09 20:43 ` [Cluster-devel] [PATCHv2 3/6] rgmanager: ra2rng.xsl: common params: just refer to named pattern 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 ` [Cluster-devel] [PATCHv3 " Jan Pokorný
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=1386264255-22340-4-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).