pacemaker-pengine-nvpair-id-ref.patch
pacemaker-pengine-nvpair-id-ref-test.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=116
This commit is contained in:
Yan Gao 2014-03-13 10:30:21 +00:00 committed by Git OBS Bridge
parent ceec526574
commit 280d18b941
2 changed files with 96 additions and 31 deletions

View File

@ -1,18 +1,18 @@
commit 74f7c451d7a1f27f3c5a43e81534a20354be1459
commit 8165b88cb8ef05c82631a20c089b64c5ee419ac9
Author: Gao,Yan <ygao@suse.com>
Date: Mon Mar 3 14:07:57 2014 +0800
Date: Fri Mar 7 16:08:29 2014 +0800
Test: pengine: Support id-ref in nvpair with optional "name" for resource instance attributes
Test: pengine: Support id-ref in nvpair with optional "name"
diff --git a/pengine/regression.sh b/pengine/regression.sh
index 07c3c35..9c49c80 100755
index 07c3c35..6c52811 100755
--- a/pengine/regression.sh
+++ b/pengine/regression.sh
@@ -93,6 +93,7 @@ do_test params-5 "Params: Restart based on probe digest"
do_test novell-251689 "Resource definition change + target_role=stopped"
do_test bug-lf-2106 "Restart all anonymous clone instances after config change"
do_test params-6 "Params: Detect reload in previously migrated resource"
+do_test nvpair-id-ref "Support id-ref in nvpair for resource instance attributes"
+do_test nvpair-id-ref "Support id-ref in nvpair with optional name"
echo ""
do_test target-0 "Target Role : baseline"

View File

@ -1,8 +1,8 @@
commit 89b75046e67bfe58985a64db4cc29fc6c0784f44
commit f81b9a3f0eb134df35f1d29742ffe12cbeb74ded
Author: Gao,Yan <ygao@suse.com>
Date: Wed Jan 29 14:07:44 2014 +0800
Feature: pengine: Support id-ref in nvpair with optional "name" for resource instance attributes
Feature: pengine: Support id-ref in nvpair with optional "name"
If "name" isn't specified, it inherits the name from the referenced
nvpair.
@ -65,7 +65,7 @@ index f80aa47..626d7b2 100644
sorted = g_list_sort(unsorted, sort_pairs);
diff --git a/xml/Makefile.am b/xml/Makefile.am
index 4a7381b..eb99270 100644
index 4a7381b..87340fb 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -26,7 +26,7 @@ RNG_FILES = $(VERSIONED_RNG_FILES:%.rng=%-1.0.rng) \
@ -73,16 +73,16 @@ index 4a7381b..eb99270 100644
$(VERSIONED_RNG_FILES:%.rng=%-1.2.rng) \
pacemaker.rng versions.rng score.rng rule.rng nvset.rng \
- acls-1.1.rng acls-1.2.rng fencing.rng
+ acls-1.1.rng acls-1.2.rng fencing.rng nvset-nvpair-ref.rng
+ acls-1.1.rng acls-1.2.rng fencing.rng nvset-1.0.rng
EXTRA_DIST = crm-1.0.dtd $(dtd_SCRIPTS)
dtd_SCRIPTS = crm.dtd $(RNG_FILES) upgrade06.xsl crm-transitional.dtd
diff --git a/xml/nvset-nvpair-ref.rng b/xml/nvset-nvpair-ref.rng
diff --git a/xml/nvset-1.0.rng b/xml/nvset-1.0.rng
new file mode 100644
index 0000000..8f1696c
index 0000000..0d7e72c
--- /dev/null
+++ b/xml/nvset-nvpair-ref.rng
@@ -0,0 +1,45 @@
+++ b/xml/nvset-1.0.rng
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- types: http://www.w3.org/TR/xmlschema-2/#dateTime -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
@ -102,6 +102,35 @@ index 0000000..8f1696c
+ </optional>
+ <zeroOrMore>
+ <element name="nvpair">
+ <attribute name="id"><data type="ID"/></attribute>
+ <attribute name="name"><text/></attribute>
+ <optional>
+ <attribute name="value"><text/></attribute>
+ </optional>
+ </element>
+ </zeroOrMore>
+ <optional>
+ <externalRef href="score.rng"/>
+ </optional>
+ </interleave>
+ </group>
+ </choice>
+ </define>
+
+</grammar>
diff --git a/xml/nvset.rng b/xml/nvset.rng
index 0d7e72c..8f1696c 100644
--- a/xml/nvset.rng
+++ b/xml/nvset.rng
@@ -17,11 +17,21 @@
</optional>
<zeroOrMore>
<element name="nvpair">
- <attribute name="id"><data type="ID"/></attribute>
- <attribute name="name"><text/></attribute>
- <optional>
- <attribute name="value"><text/></attribute>
- </optional>
+ <choice>
+ <group>
+ <attribute name="id-ref"><data type="IDREF"/></attribute>
@ -117,27 +146,63 @@ index 0000000..8f1696c
+ </optional>
+ </group>
+ </choice>
+ </element>
+ </zeroOrMore>
+ <optional>
+ <externalRef href="score.rng"/>
+ </optional>
+ </interleave>
+ </group>
+ </choice>
+ </define>
+
+</grammar>
diff --git a/xml/resources-1.1.rng b/xml/resources-1.1.rng
index 81a8f82..3eb6824 100644
--- a/xml/resources-1.1.rng
+++ b/xml/resources-1.1.rng
@@ -145,7 +145,7 @@
<externalRef href="nvset.rng"/>
</element>
</zeroOrMore>
<optional>
diff --git a/xml/pacemaker-1.0.rng b/xml/pacemaker-1.0.rng
index 7100393..93e5e5f 100644
--- a/xml/pacemaker-1.0.rng
+++ b/xml/pacemaker-1.0.rng
@@ -15,7 +15,7 @@
<element name="crm_config">
<zeroOrMore>
<element name="cluster_property_set">
- <externalRef href="nvset.rng"/>
+ <externalRef href="nvset-1.0.rng"/>
</element>
</zeroOrMore>
</element>
@@ -23,7 +23,7 @@
<element name="rsc_defaults">
<zeroOrMore>
<element name="meta_attributes">
- <externalRef href="nvset.rng"/>
+ <externalRef href="nvset-1.0.rng"/>
</element>
</zeroOrMore>
</element>
@@ -32,7 +32,7 @@
<element name="op_defaults">
<zeroOrMore>
<element name="meta_attributes">
- <externalRef href="nvset.rng"/>
+ <externalRef href="nvset-1.0.rng"/>
</element>
</zeroOrMore>
</element>
@@ -94,7 +94,7 @@
</optional>
<zeroOrMore>
<element name="instance_attributes">
- <externalRef href="nvset.rng"/>
+ <externalRef href="nvset-1.0.rng"/>
</element>
</zeroOrMore>
</element>
diff --git a/xml/resources-1.0.rng b/xml/resources-1.0.rng
index 7ea2228..743ccba 100644
--- a/xml/resources-1.0.rng
+++ b/xml/resources-1.0.rng
@@ -95,10 +95,10 @@
<zeroOrMore>
<choice>
<element name="meta_attributes">
- <externalRef href="nvset.rng"/>
+ <externalRef href="nvset-1.0.rng"/>
</element>
<element name="instance_attributes">
- <externalRef href="nvset.rng"/>
+ <externalRef href="nvset-nvpair-ref.rng"/>
+ <externalRef href="nvset-1.0.rng"/>
</element>
</choice>
</zeroOrMore>