From: Jan Pokorný <jpokorny@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCHv4 6/6] rgmanager: ra2rng.xsl: {ip, fs}-nfslock: use common wildcard block
Date: Thu, 5 Dec 2013 22:07:49 +0100 [thread overview]
Message-ID: <1386277669-31655-1-git-send-email-jpokorny@redhat.com> (raw)
In-Reply-To: <1386273828-29222-1-git-send-email-jpokorny@redhat.com>
Note that the silent rule before the arrangement like this is that
the wildcard block under int:agent-parameter-specialization will
always be the first one there, as element sets union will preserve
the document ordering (hence [last()] will point to the last item
in document order rather than the item of the last union operand).
Signed-off-by: Jan Pokorn? <jpokorny@redhat.com>
---
rgmanager/src/resources/ra2rng.xsl | 53 +++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 24 deletions(-)
diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl
index 7bd7b65..20d6578 100644
--- a/rgmanager/src/resources/ra2rng.xsl
+++ b/rgmanager/src/resources/ra2rng.xsl
@@ -15,6 +15,18 @@
<int:agent-parameter-specialization>
<!-- int:agent @name="..." > int:parameter @name="..." > PATTERN -->
+ <!-- WILDCARD (any agent containing such parameter) -->
+ <int:agent name="*">
+ <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:agent>
<!-- FS -->
<int:agent name="fs">
<!-- int:parameter name="name"/ -->
@@ -73,15 +85,7 @@
<param name="enumeration">true</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>
+ <!-- nfslock: see WILDCARD -->
<int:parameter name="nfsrestart">
<data type="string">
<!-- note: a bit stricter than what the code enforces -->
@@ -153,15 +157,7 @@
<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>
+ <!-- nfslock: see WILDCARD -->
<int:parameter name="sleeptime">
<data type="int">
<param name="minInclusive">0</param>
@@ -502,12 +498,21 @@
'rha:description=', $Q, normalize-space(shortdesc), $Q)"/>
<xsl:with-param name="indented" select="$use-indented"/>
<xsl:with-param name="fill-with"
- select="document('')/*/int:agent-parameter-specialization
- /int:agent[
- @name = current()/../../@name
- ]/int:parameter[
- @name = current()/@name
- ]/*"/>
+ select="(
+ document('')/*/int:agent-parameter-specialization
+ /int:agent[
+ @name = '*'
+ ]/int:parameter[
+ @name = current()/@name
+ ]
+ |
+ document('')/*/int:agent-parameter-specialization
+ /int:agent[
+ @name = current()/../../@name
+ ]/int:parameter[
+ @name = current()/@name
+ ]
+ )[last()]/*"/>
</xsl:call-template>
<xsl:value-of select="$NL"/>
--
1.8.1.4
next prev parent reply other threads:[~2013-12-05 21:07 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 ` [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 ` Jan Pokorný [this message]
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=1386277669-31655-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).