Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/xml/Makefile.am b/xml/Makefile.am
index d4ffdfa22c..e9cd875ca1 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -1,59 +1,72 @@
#
# Copyright (C) 2004 Andrew Beekhof
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
MAINTAINERCLEANFILES = Makefile.in
-
dtddir = $(CRM_DTD_DIRECTORY)
+dtd_SCRIPTS = crm.dtd crm-transitional.dtd
-VERSIONED_RNG_FILES = pacemaker.rng constraints.rng resources.rng acls.rng
-
-RNG_FILES_10 = $(foreach rng,pacemaker constraints resources,$(rng)-1.0.rng)
-RNG_FILES_12 = $(foreach rng,pacemaker cib options nodes resources constraints fencing acls status,$(rng)-1.2.rng)
-RNG_FILES = $(RNG_FILES_10) $(RNG_FILES_12) \
- $(VERSIONED_RNG_FILES:%.rng=%-next.rng) \
- pacemaker.rng versions.rng score.rng rule.rng nvset.rng
+schema_VERSIONS = 1.2 next
+schema_GENERATED = pacemaker.rng $(foreach base,$(schema_VERSIONS),pacemaker-$(base).rng)
-EXTRA_DIST = crm-1.0.dtd $(dtd_SCRIPTS)
-dtd_SCRIPTS = crm.dtd $(RNG_FILES) upgrade06.xsl upgrade11.xsl crm-transitional.dtd
+schemadir = $(CRM_DTD_DIRECTORY)
+RNG_cfg_files = options nodes resources constraints fencing acls unused
+RNG_files = cib $(RNG_cfg_files) status versions score rule nvset
+schema_SCRIPTS = $(foreach base,$(RNG_files),$(wildcard $(base)*.rng)) $(schema_GENERATED) \
+ pacemaker-1.0.rng upgrade06.xsl upgrade11.xsl
-NEXT ?= $(shell echo $(CRM_DTD_VERSION) | awk -F. '/[0-9]+\./{$$2+=1;OFS=".";print $$1,$$2}')
+EXTRA_DIST = $(schema_SCRIPTS) $(dtd_SCRIPTS)
-next:
- echo $(NEXT)
+# See Readme.md for details on updating schema files
-diff:
- for c in `ls -1 *-$(CRM_DTD_VERSION).rng | sed 's/-$(CRM_DTD_VERSION).rng//'`; do diff -u $$c-$(CRM_DTD_VERSION).rng $$c-next.rng ; done
+best_match = $(shell $(top_srcdir)/xml/best-match.sh $(1) $(2))
-clone:
- for c in `ls -1 *-$(CRM_DTD_VERSION).rng | sed 's/-$(CRM_DTD_VERSION).rng//'`; do cp $$c-$(CRM_DTD_VERSION).rng $$c-$(NEXT).rng; sed -i 's/$(CRM_DTD_VERSION).rng/$(NEXT).rng/g' $$c-$(NEXT).rng; git add $$c-$(NEXT).rng ; done
+pacemaker.rng: pacemaker-$(CRM_DTD_VERSION).rng
+ cp $(top_builddir)/xml/$< $@
-sync:
- for c in `ls -1 *-$(CRM_DTD_VERSION).rng | sed 's/-$(CRM_DTD_VERSION).rng//'`; do cp $$c-$(CRM_DTD_VERSION).rng $$c-next.rng; sed -i 's/$(CRM_DTD_VERSION).rng/next.rng/g' $$c-next.rng; git add $$c-next.rng ; done
+pacemaker-%.rng:
+ echo "<?xml version='1.0' encoding='UTF-8'?>" > $@
+ echo "<grammar xmlns='http://relaxng.org/ns/structure/1.0' datatypeLibrary='http://www.w3.org/2001/XMLSchema-datatypes'>" >> $@
+ echo " <start>" >> $@
+ echo " <element name='cib'>" >> $@
+ echo " <externalRef href=\"$(call best_match,cib,$*)\"/>" >> $@
+ echo " <element name='configuration'>" >> $@
+ echo " <interleave>" >> $@
+ echo -e " "$(foreach rng,$(RNG_cfg_files)," <externalRef href=\"$(call best_match,$(rng),$*)\"/>\n") >> $@
+ echo " </interleave>" >> $@
+ echo " </element>" >> $@
+ echo " <element name='status'>" >> $@
+ echo " <externalRef href=\"$(call best_match,status,$*)\"/>" >> $@
+ echo " </element>" >> $@
+ echo " </element>" >> $@
+ echo " </start>" >> $@
+ echo "</grammar>" >> $@
-# Fake versioned subschemas not used by anything...
-acls-1.0.rng:
- touch $@
+ echo "Created $@"
-crm.dtd: crm-1.0.dtd
- cp $(top_srcdir)/xml/crm-1.0.dtd crm.dtd
+rng_next = $(shell echo $(wildcard *-next.rng) | sed 's/-next.rng//g')
+diff:
+ echo "Comparing changes to: $(rng_next)"
+ for rng in $(rng_next); do echo "### $${rng}"; diff -u $${rng}-$(CRM_DTD_VERSION).rng $${rng}-next.rng; done
+ echo "Done"
-pacemaker.rng: pacemaker-$(CRM_DTD_VERSION).rng
- cp $(top_builddir)/xml/$< $@
+sync:
+ git rm -f $(wildcard *-next.rng)
+ make pacemaker-next.rng
clean:
- rm -f crm.dtd pacemaker.rng
+ rm -f $(schema_GENERATED)
diff --git a/xml/Readme.md b/xml/Readme.md
new file mode 100644
index 0000000000..1b25bcc7a7
--- /dev/null
+++ b/xml/Readme.md
@@ -0,0 +1,16 @@
+
+# Updating schema files #
+
+## Experimental features ##
+
+Experimental features go into `${base}-next.rng`
+
+Create from the most recent `${base}-${X}.${Y}.rng` if it does not already exist
+
+## Stable features ##
+
+For stable features, copy the most recent version to `${base}-${X}.${Y}.rng`
+
+Bump `${X}` for removals, bump `${Y}` for additions and update `CRM_DTD_VERSION` in `configure.ac`
+
+
diff --git a/xml/acls-1.2.rng b/xml/acls-1.2.rng
index 22cc6310e8..4be040509d 100644
--- a/xml/acls-1.2.rng
+++ b/xml/acls-1.2.rng
@@ -1,66 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
+ <optional>
<ref name="element-acls"/>
+ </optional>
</start>
<define name="element-acls">
<element name="acls">
<zeroOrMore>
<choice>
<element name="acl_user">
<attribute name="id"><data type="ID"/></attribute>
<choice>
<zeroOrMore>
<element name="role_ref">
<attribute name="id"><data type="IDREF"/></attribute>
</element>
</zeroOrMore>
<zeroOrMore>
<ref name="element-acl"/>
</zeroOrMore>
</choice>
</element>
<element name="acl_role">
<attribute name="id"><data type="ID"/></attribute>
<zeroOrMore>
<ref name="element-acl"/>
</zeroOrMore>
</element>
</choice>
</zeroOrMore>
</element>
</define>
<define name="element-acl">
<choice>
<element name="read">
<ref name="attribute-acl"/>
</element>
<element name="write">
<ref name="attribute-acl"/>
</element>
<element name="deny">
<ref name="attribute-acl"/>
</element>
</choice>
</define>
<define name="attribute-acl">
<attribute name="id"><data type="ID"/></attribute>
<choice>
<attribute name="tag"><text/></attribute>
<attribute name="ref"><data type="IDREF"/></attribute>
<group>
<attribute name="tag"><text/></attribute>
<attribute name="ref"><data type="IDREF"/></attribute>
</group>
<attribute name="xpath"><text/></attribute>
</choice>
<optional>
<attribute name="attribute"><text/></attribute>
</optional>
</define>
</grammar>
diff --git a/xml/acls-next.rng b/xml/acls-next.rng
deleted file mode 100644
index 22cc6310e8..0000000000
--- a/xml/acls-next.rng
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <start>
- <ref name="element-acls"/>
- </start>
-
- <define name="element-acls">
- <element name="acls">
- <zeroOrMore>
- <choice>
- <element name="acl_user">
- <attribute name="id"><data type="ID"/></attribute>
- <choice>
- <zeroOrMore>
- <element name="role_ref">
- <attribute name="id"><data type="IDREF"/></attribute>
- </element>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="element-acl"/>
- </zeroOrMore>
- </choice>
- </element>
- <element name="acl_role">
- <attribute name="id"><data type="ID"/></attribute>
- <zeroOrMore>
- <ref name="element-acl"/>
- </zeroOrMore>
- </element>
- </choice>
- </zeroOrMore>
- </element>
- </define>
-
- <define name="element-acl">
- <choice>
- <element name="read">
- <ref name="attribute-acl"/>
- </element>
- <element name="write">
- <ref name="attribute-acl"/>
- </element>
- <element name="deny">
- <ref name="attribute-acl"/>
- </element>
- </choice>
- </define>
-
- <define name="attribute-acl">
- <attribute name="id"><data type="ID"/></attribute>
- <choice>
- <attribute name="tag"><text/></attribute>
- <attribute name="ref"><data type="IDREF"/></attribute>
- <group>
- <attribute name="tag"><text/></attribute>
- <attribute name="ref"><data type="IDREF"/></attribute>
- </group>
- <attribute name="xpath"><text/></attribute>
- </choice>
- <optional>
- <attribute name="attribute"><text/></attribute>
- </optional>
- </define>
-
-</grammar>
diff --git a/xml/best-match.sh b/xml/best-match.sh
new file mode 100755
index 0000000000..f6e3dc8a5a
--- /dev/null
+++ b/xml/best-match.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+base=$1; shift
+target=$1; shift
+best="0.0"
+candidates=$(ls -1 ${base}-*.rng 2>/dev/null)
+for rng in $candidates; do
+ case $rng in
+ ${base}-${target}.rng)
+ echo $rng
+ exit
+ ;;
+ *next*)
+ : skipping $rng
+ ;;
+ *)
+ v=$(echo $rng | sed -e "s/${base}-//" -e 's/.rng//')
+ : comparing $v with $target
+
+ rc=$(echo "$v > ${best}" | bc)
+ if [ $rc = 1 ]; then
+ : $v beats the previous ${best} for $target
+ if [ ${target} = next ]; then
+ best=$v
+ else
+ rc=$(echo "$v < ${target}" | bc)
+ if [ $rc = 1 ]; then
+ : $v is still less than $target, using
+ best=$v
+ fi
+ fi
+ fi
+ ;;
+ esac
+done
+if [ "x${best}" != "x0.0" ]; then
+ echo ${base}-${best}.rng
+else
+ echo "empty.rng"
+fi
diff --git a/xml/constraints-1.2.rng b/xml/constraints-1.2.rng
index 35756f0119..85fcf48b20 100644
--- a/xml/constraints-1.2.rng
+++ b/xml/constraints-1.2.rng
@@ -1,226 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<ref name="element-constraints"/>
</start>
<define name="element-constraints">
+ <element name="constraints">
<zeroOrMore>
<choice>
<ref name="element-location"/>
<ref name="element-colocation"/>
<ref name="element-order"/>
<ref name="element-rsc_ticket"/>
</choice>
</zeroOrMore>
+ </element>
</define>
<define name="element-location">
<element name="rsc_location">
<attribute name="id"><data type="ID"/></attribute>
<choice>
<group>
<attribute name="rsc"><data type="IDREF"/></attribute>
<optional>
<attribute name="role">
<ref name="attribute-roles"/>
</attribute>
</optional>
</group>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
</choice>
<choice>
<group>
<externalRef href="score.rng"/>
<attribute name="node"><text/></attribute>
</group>
<oneOrMore>
<externalRef href="rule.rng"/>
</oneOrMore>
</choice>
<optional>
<ref name="element-lifetime"/>
</optional>
</element>
</define>
<define name="element-resource-set">
<element name="resource_set">
<choice>
<attribute name="id-ref"><data type="IDREF"/></attribute>
<group>
<attribute name="id"><data type="ID"/></attribute>
<optional>
<attribute name="sequential"><data type="boolean"/></attribute>
</optional>
<optional>
<attribute name="require-all"><data type="boolean"/></attribute>
</optional>
<optional>
<attribute name="action">
<ref name="attribute-actions"/>
</attribute>
</optional>
<optional>
<attribute name="role">
<ref name="attribute-roles"/>
</attribute>
</optional>
<optional>
<externalRef href="score.rng"/>
</optional>
<oneOrMore>
<element name="resource_ref">
<attribute name="id"><data type="IDREF"/></attribute>
</element>
</oneOrMore>
</group>
</choice>
</element>
</define>
<define name="element-colocation">
<element name="rsc_colocation">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<choice>
<externalRef href="score.rng"/>
<attribute name="score-attribute"><text/></attribute>
<attribute name="score-attribute-mangle"><text/></attribute>
</choice>
</optional>
<optional>
<ref name="element-lifetime"/>
</optional>
<choice>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
<group>
<attribute name="rsc"><data type="IDREF"/></attribute>
<attribute name="with-rsc"><data type="IDREF"/></attribute>
<optional>
<attribute name="node-attribute"><text/></attribute>
</optional>
<optional>
<attribute name="rsc-role">
<ref name="attribute-roles"/>
</attribute>
</optional>
<optional>
<attribute name="with-rsc-role">
<ref name="attribute-roles"/>
</attribute>
</optional>
</group>
</choice>
</element>
</define>
<define name="element-order">
<element name="rsc_order">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<ref name="element-lifetime"/>
</optional>
<optional>
<attribute name="symmetrical"><data type="boolean"/></attribute>
</optional>
<optional>
<choice>
<externalRef href="score.rng"/>
<attribute name="kind">
<ref name="order-types"/>
</attribute>
</choice>
</optional>
<choice>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
<group>
<attribute name="first"><data type="IDREF"/></attribute>
<attribute name="then"><data type="IDREF"/></attribute>
<optional>
<attribute name="first-action">
<ref name="attribute-actions"/>
</attribute>
</optional>
<optional>
<attribute name="then-action">
<ref name="attribute-actions"/>
</attribute>
</optional>
</group>
</choice>
</element>
</define>
<define name="element-rsc_ticket">
<element name="rsc_ticket">
<attribute name="id"><data type="ID"/></attribute>
<choice>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
<group>
<attribute name="rsc"><data type="IDREF"/></attribute>
<optional>
<attribute name="rsc-role">
<ref name="attribute-roles"/>
</attribute>
</optional>
</group>
</choice>
<attribute name="ticket"><text/></attribute>
<optional>
<attribute name="loss-policy">
<choice>
<value>stop</value>
<value>demote</value>
<value>fence</value>
<value>freeze</value>
</choice>
</attribute>
</optional>
</element>
</define>
<define name="attribute-actions">
<choice>
<value>start</value>
<value>promote</value>
<value>demote</value>
<value>stop</value>
</choice>
</define>
<define name="attribute-roles">
<choice>
<value>Stopped</value>
<value>Started</value>
<value>Master</value>
<value>Slave</value>
</choice>
</define>
<define name="order-types">
<choice>
<value>Optional</value>
<value>Mandatory</value>
<value>Serialize</value>
</choice>
</define>
<define name="element-lifetime">
<element name="lifetime">
<oneOrMore>
<externalRef href="rule.rng"/>
</oneOrMore>
</element>
</define>
</grammar>
diff --git a/xml/constraints-next.rng b/xml/constraints-next.rng
index fff0fb7a03..9e866dd19b 100644
--- a/xml/constraints-next.rng
+++ b/xml/constraints-next.rng
@@ -1,246 +1,248 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<ref name="element-constraints"/>
</start>
<define name="element-constraints">
+ <element name="constraints">
<zeroOrMore>
<choice>
<ref name="element-location"/>
<ref name="element-colocation"/>
<ref name="element-order"/>
<ref name="element-rsc_ticket"/>
</choice>
</zeroOrMore>
+ </element>
</define>
<define name="element-location">
<element name="rsc_location">
<attribute name="id"><data type="ID"/></attribute>
<choice>
<group>
<choice>
<attribute name="rsc"><data type="IDREF"/></attribute>
<attribute name="rsc-pattern"><text/></attribute>
</choice>
<optional>
<attribute name="role">
<ref name="attribute-roles"/>
</attribute>
</optional>
</group>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
</choice>
<choice>
<group>
<choice>
<attribute name="domain"><data type="IDREF"/></attribute>
<group>
<attribute name="node"><text/></attribute>
<externalRef href="score.rng"/>
</group>
</choice>
</group>
<oneOrMore>
<externalRef href="rule.rng"/>
</oneOrMore>
</choice>
<optional>
<ref name="element-lifetime"/>
</optional>
</element>
</define>
<define name="element-resource-set">
<element name="resource_set">
<choice>
<attribute name="id-ref"><data type="IDREF"/></attribute>
<group>
<attribute name="id"><data type="ID"/></attribute>
<optional>
<attribute name="sequential"><data type="boolean"/></attribute>
</optional>
<optional>
<attribute name="require-all"><data type="boolean"/></attribute>
</optional>
<optional>
<attribute name="action">
<ref name="attribute-actions"/>
</attribute>
</optional>
<optional>
<attribute name="role">
<ref name="attribute-roles"/>
</attribute>
</optional>
<optional>
<externalRef href="score.rng"/>
</optional>
<oneOrMore>
<element name="resource_ref">
<attribute name="id"><data type="IDREF"/></attribute>
</element>
</oneOrMore>
</group>
</choice>
</element>
</define>
<define name="element-colocation">
<element name="rsc_colocation">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<choice>
<externalRef href="score.rng"/>
<attribute name="score-attribute"><text/></attribute>
<attribute name="score-attribute-mangle"><text/></attribute>
</choice>
</optional>
<optional>
<ref name="element-lifetime"/>
</optional>
<choice>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
<group>
<attribute name="rsc"><data type="IDREF"/></attribute>
<attribute name="with-rsc"><data type="IDREF"/></attribute>
<optional>
<attribute name="node-attribute"><text/></attribute>
</optional>
<optional>
<attribute name="rsc-role">
<ref name="attribute-roles"/>
</attribute>
</optional>
<optional>
<attribute name="with-rsc-role">
<ref name="attribute-roles"/>
</attribute>
</optional>
<optional>
<attribute name="rsc-instance"><data type="integer"/></attribute>
</optional>
<optional>
<attribute name="with-rsc-instance"><data type="integer"/></attribute>
</optional>
</group>
</choice>
</element>
</define>
<define name="element-order">
<element name="rsc_order">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<ref name="element-lifetime"/>
</optional>
<optional>
<attribute name="symmetrical"><data type="boolean"/></attribute>
</optional>
<optional>
<choice>
<externalRef href="score.rng"/>
<attribute name="kind">
<ref name="order-types"/>
</attribute>
</choice>
</optional>
<choice>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
<group>
<attribute name="first"><data type="IDREF"/></attribute>
<attribute name="then"><data type="IDREF"/></attribute>
<optional>
<attribute name="first-action">
<ref name="attribute-actions"/>
</attribute>
</optional>
<optional>
<attribute name="then-action">
<ref name="attribute-actions"/>
</attribute>
</optional>
<optional>
<attribute name="first-instance"><data type="integer"/></attribute>
</optional>
<optional>
<attribute name="then-instance"><data type="integer"/></attribute>
</optional>
</group>
</choice>
</element>
</define>
<define name="element-rsc_ticket">
<element name="rsc_ticket">
<attribute name="id"><data type="ID"/></attribute>
<choice>
<oneOrMore>
<ref name="element-resource-set"/>
</oneOrMore>
<group>
<attribute name="rsc"><data type="IDREF"/></attribute>
<optional>
<attribute name="rsc-role">
<ref name="attribute-roles"/>
</attribute>
</optional>
</group>
</choice>
<attribute name="ticket"><text/></attribute>
<optional>
<attribute name="loss-policy">
<choice>
<value>stop</value>
<value>demote</value>
<value>fence</value>
<value>freeze</value>
</choice>
</attribute>
</optional>
</element>
</define>
<define name="attribute-actions">
<choice>
<value>start</value>
<value>promote</value>
<value>demote</value>
<value>stop</value>
</choice>
</define>
<define name="attribute-roles">
<choice>
<value>Stopped</value>
<value>Started</value>
<value>Master</value>
<value>Slave</value>
</choice>
</define>
<define name="order-types">
<choice>
<value>Optional</value>
<value>Mandatory</value>
<value>Serialize</value>
</choice>
</define>
<define name="element-lifetime">
<element name="lifetime">
<oneOrMore>
<externalRef href="rule.rng"/>
</oneOrMore>
</element>
</define>
</grammar>
diff --git a/xml/crm-1.0.dtd b/xml/crm.dtd
similarity index 100%
rename from xml/crm-1.0.dtd
rename to xml/crm.dtd
diff --git a/xml/fencing-1.2.rng b/xml/fencing-1.2.rng
index 87de5a8b05..c173cecaab 100644
--- a/xml/fencing-1.2.rng
+++ b/xml/fencing-1.2.rng
@@ -1,29 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
+ <optional>
<ref name="element-stonith"/>
+ </optional>
</start>
<define name="element-stonith">
<element name="fencing-topology">
<zeroOrMore>
<ref name="element-level"/>
</zeroOrMore>
</element>
</define>
<define name="element-level">
<element name="fencing-level">
<attribute name="id"><data type="ID"/></attribute>
<attribute name="target"><text/></attribute>
<attribute name="index"><data type="positiveInteger"/></attribute>
<attribute name="devices">
<data type="string">
<param name="pattern">([a-zA-Z0-9_\.\-]+)(,[a-zA-Z0-9_\.\-]+)*</param>
</data>
</attribute>
</element>
</define>
</grammar>
diff --git a/xml/nodes-1.2.rng b/xml/nodes-1.2.rng
index d82f68711c..28dae6262e 100644
--- a/xml/nodes-1.2.rng
+++ b/xml/nodes-1.2.rng
@@ -1,42 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<ref name="element-nodes"/>
</start>
<define name="element-nodes">
+ <element name="nodes">
<zeroOrMore>
<element name="node">
<attribute name="id"><text/></attribute>
<attribute name="uname"><text/></attribute>
<optional>
<attribute name="type">
<choice>
<value>normal</value>
<value>member</value>
<value>ping</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<optional>
<externalRef href="score.rng"/>
</optional>
<zeroOrMore>
<choice>
<element name="instance_attributes">
<externalRef href="nvset.rng"/>
</element>
<element name="utilization">
<externalRef href="nvset.rng"/>
</element>
</choice>
</zeroOrMore>
</element>
</zeroOrMore>
+ </element>
</define>
</grammar>
diff --git a/xml/pacemaker-1.2.rng b/xml/pacemaker-1.2.rng
deleted file mode 100644
index dc88069f33..0000000000
--- a/xml/pacemaker-1.2.rng
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <start>
- <element name="cib">
- <externalRef href="cib-1.2.rng"/>
- <element name="configuration">
- <interleave>
- <externalRef href="options-1.2.rng"/>
- <element name="nodes">
- <externalRef href="nodes-1.2.rng"/>
- </element>
- <element name="resources">
- <externalRef href="resources-1.2.rng"/>
- </element>
- <element name="constraints">
- <externalRef href="constraints-1.2.rng"/>
- </element>
- <optional>
- <externalRef href="acls-1.2.rng"/>
- </optional>
- <optional>
- <externalRef href="fencing-1.2.rng"/>
- </optional>
- </interleave>
- </element>
- <element name="status">
- <externalRef href="status-1.2.rng"/>
- </element>
- </element>
- </start>
-
-</grammar>
diff --git a/xml/pacemaker-next.rng b/xml/pacemaker-next.rng
deleted file mode 100644
index b02c109149..0000000000
--- a/xml/pacemaker-next.rng
+++ /dev/null
@@ -1,161 +0,0 @@
-<?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"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <start>
- <element name="cib">
- <ref name="element-cib"/>
- </element>
- </start>
-
- <define name="element-cib">
- <ref name="attribute-options"/>
- <element name="configuration">
- <interleave>
- <element name="crm_config">
- <zeroOrMore>
- <element name="cluster_property_set">
- <externalRef href="nvset.rng"/>
- </element>
- </zeroOrMore>
- </element>
- <optional>
- <element name="rsc_defaults">
- <zeroOrMore>
- <element name="meta_attributes">
- <externalRef href="nvset.rng"/>
- </element>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="op_defaults">
- <zeroOrMore>
- <element name="meta_attributes">
- <externalRef href="nvset.rng"/>
- </element>
- </zeroOrMore>
- </element>
- </optional>
- <ref name="element-nodes"/>
- <element name="resources">
- <externalRef href="resources-next.rng"/>
- </element>
- <optional>
- <element name="domains">
- <zeroOrMore>
- <element name="domain">
- <attribute name="id"><data type="ID"/></attribute>
- <zeroOrMore>
- <element name="node">
- <attribute name="name"><text/></attribute>
- <externalRef href="score.rng"/>
- </element>
- </zeroOrMore>
- </element>
- </zeroOrMore>
- </element>
- </optional>
- <element name="constraints">
- <externalRef href="constraints-next.rng"/>
- </element>
- <optional>
- <externalRef href="acls-next.rng"/>
- </optional>
- <optional>
- <externalRef href="fencing.rng"/>
- </optional>
- </interleave>
- </element>
- <element name="status">
- <ref name="element-status"/>
- </element>
- </define>
-
- <define name="attribute-options">
- <externalRef href="versions.rng"/>
- <optional>
- <attribute name="crm_feature_set"><text/></attribute>
- </optional>
- <optional>
- <attribute name="remote-tls-port"><data type="nonNegativeInteger"/></attribute>
- </optional>
- <optional>
- <attribute name="remote-clear-port"><data type="nonNegativeInteger"/></attribute>
- </optional>
- <optional>
- <attribute name="have-quorum"><data type="boolean"/></attribute>
- </optional>
- <optional>
- <attribute name="dc-uuid"><text/></attribute>
- </optional>
- <optional>
- <attribute name="cib-last-written"><text/></attribute>
- </optional>
- <optional>
- <attribute name="no-quorum-panic"><data type="boolean"/></attribute>
- </optional>
- <optional>
- <attribute name="update-origin"><text/></attribute>
- </optional>
- <optional>
- <attribute name="update-client"><text/></attribute>
- </optional>
- <optional>
- <attribute name="update-user"><text/></attribute>
- </optional>
- </define>
-
- <define name="element-nodes">
- <element name="nodes">
- <zeroOrMore>
- <element name="node">
- <attribute name="id"><text/></attribute>
- <attribute name="uname"><text/></attribute>
- <optional>
- <attribute name="type">
- <choice>
- <value>normal</value>
- <value>member</value>
- <value>ping</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <optional>
- <externalRef href="score.rng"/>
- </optional>
- <zeroOrMore>
- <choice>
- <element name="instance_attributes">
- <externalRef href="nvset.rng"/>
- </element>
- <element name="utilization">
- <externalRef href="nvset.rng"/>
- </element>
- </choice>
- </zeroOrMore>
- </element>
- </zeroOrMore>
- </element>
- </define>
-
- <define name="element-status">
- <zeroOrMore>
- <choice>
- <attribute>
- <anyName/>
- <text/>
- </attribute>
- <element>
- <anyName/>
- <ref name="element-status"/>
- </element>
- <text/>
- </choice>
- </zeroOrMore>
- </define>
-
-</grammar>
diff --git a/xml/resources-1.2.rng b/xml/resources-1.2.rng
index 81a8f824a8..7e941399fa 100644
--- a/xml/resources-1.2.rng
+++ b/xml/resources-1.2.rng
@@ -1,225 +1,227 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<ref name="element-resources"/>
</start>
<define name="element-resources">
+ <element name="resources">
<zeroOrMore>
<choice>
<ref name="element-primitive"/>
<ref name="element-template"/>
<ref name="element-group"/>
<ref name="element-clone"/>
<ref name="element-master"/>
</choice>
</zeroOrMore>
+ </element>
</define>
<define name="element-primitive">
<element name="primitive">
<interleave>
<attribute name="id"><data type="ID"/></attribute>
<choice>
<group>
<choice>
<group>
<attribute name="class"><value>ocf</value></attribute>
<attribute name="provider"><text/></attribute>
</group>
<attribute name="class">
<choice>
<value>lsb</value>
<value>heartbeat</value>
<value>stonith</value>
<value>upstart</value>
<value>service</value>
<value>systemd</value>
<value>nagios</value>
</choice>
</attribute>
</choice>
<attribute name="type"><text/></attribute>
</group>
<attribute name="template"><data type="IDREF"/></attribute>
</choice>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<ref name="element-resource-extra"/>
<ref name="element-operations"/>
<zeroOrMore>
<element name="utilization">
<externalRef href="nvset.rng"/>
</element>
</zeroOrMore>
</interleave>
</element>
</define>
<define name="element-template">
<element name="template">
<interleave>
<attribute name="id"><data type="ID"/></attribute>
<choice>
<group>
<attribute name="class"><value>ocf</value></attribute>
<attribute name="provider"><text/></attribute>
</group>
<attribute name="class">
<choice>
<value>lsb</value>
<value>heartbeat</value>
<value>stonith</value>
<value>upstart</value>
</choice>
</attribute>
</choice>
<attribute name="type"><text/></attribute>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<ref name="element-resource-extra"/>
<ref name="element-operations"/>
<zeroOrMore>
<element name="utilization">
<externalRef href="nvset.rng"/>
</element>
</zeroOrMore>
</interleave>
</element>
</define>
<define name="element-group">
<element name="group">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<interleave>
<ref name="element-resource-extra"/>
<oneOrMore>
<ref name="element-primitive"/>
</oneOrMore>
</interleave>
</element>
</define>
<define name="element-clone">
<element name="clone">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<interleave>
<ref name="element-resource-extra"/>
<choice>
<ref name="element-primitive"/>
<ref name="element-group"/>
</choice>
</interleave>
</element>
</define>
<define name="element-master">
<element name="master">
<attribute name="id"><data type="ID"/></attribute>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<interleave>
<ref name="element-resource-extra"/>
<choice>
<ref name="element-primitive"/>
<ref name="element-group"/>
</choice>
</interleave>
</element>
</define>
<define name="element-resource-extra">
<zeroOrMore>
<choice>
<element name="meta_attributes">
<externalRef href="nvset.rng"/>
</element>
<element name="instance_attributes">
<externalRef href="nvset.rng"/>
</element>
</choice>
</zeroOrMore>
</define>
<define name="element-operations">
<optional>
<element name="operations">
<optional>
<attribute name="id"><data type="ID"/></attribute>
</optional>
<optional>
<attribute name="id-ref"><data type="IDREF"/></attribute>
</optional>
<zeroOrMore>
<element name="op">
<attribute name="id"><data type="ID"/></attribute>
<attribute name="name"><text/></attribute>
<attribute name="interval"><text/></attribute>
<optional>
<attribute name="description"><text/></attribute>
</optional>
<optional>
<choice>
<attribute name="start-delay"><text/></attribute>
<attribute name="interval-origin"><text/></attribute>
</choice>
</optional>
<optional>
<attribute name="timeout"><text/></attribute>
</optional>
<optional>
<attribute name="enabled"><data type="boolean"/></attribute>
</optional>
<optional>
<attribute name="record-pending"><data type="boolean"/></attribute>
</optional>
<optional>
<attribute name="role">
<choice>
<value>Stopped</value>
<value>Started</value>
<value>Slave</value>
<value>Master</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="requires">
<choice>
<value>nothing</value>
<value>quorum</value>
<value>fencing</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="on-fail">
<choice>
<value>ignore</value>
<value>block</value>
<value>stop</value>
<value>restart</value>
<value>standby</value>
<value>fence</value>
<value>restart-container</value>
</choice>
</attribute>
</optional>
<ref name="element-resource-extra"/>
</element>
</zeroOrMore>
</element>
</optional>
</define>
</grammar>
diff --git a/xml/resources-next.rng b/xml/resources-next.rng
deleted file mode 100644
index 81a8f824a8..0000000000
--- a/xml/resources-next.rng
+++ /dev/null
@@ -1,225 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <start>
- <ref name="element-resources"/>
- </start>
-
- <define name="element-resources">
- <zeroOrMore>
- <choice>
- <ref name="element-primitive"/>
- <ref name="element-template"/>
- <ref name="element-group"/>
- <ref name="element-clone"/>
- <ref name="element-master"/>
- </choice>
- </zeroOrMore>
- </define>
-
- <define name="element-primitive">
- <element name="primitive">
- <interleave>
- <attribute name="id"><data type="ID"/></attribute>
- <choice>
- <group>
- <choice>
- <group>
- <attribute name="class"><value>ocf</value></attribute>
- <attribute name="provider"><text/></attribute>
- </group>
- <attribute name="class">
- <choice>
- <value>lsb</value>
- <value>heartbeat</value>
- <value>stonith</value>
- <value>upstart</value>
- <value>service</value>
- <value>systemd</value>
- <value>nagios</value>
- </choice>
- </attribute>
- </choice>
- <attribute name="type"><text/></attribute>
- </group>
- <attribute name="template"><data type="IDREF"/></attribute>
- </choice>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <ref name="element-resource-extra"/>
- <ref name="element-operations"/>
- <zeroOrMore>
- <element name="utilization">
- <externalRef href="nvset.rng"/>
- </element>
- </zeroOrMore>
- </interleave>
- </element>
- </define>
-
- <define name="element-template">
- <element name="template">
- <interleave>
- <attribute name="id"><data type="ID"/></attribute>
- <choice>
- <group>
- <attribute name="class"><value>ocf</value></attribute>
- <attribute name="provider"><text/></attribute>
- </group>
- <attribute name="class">
- <choice>
- <value>lsb</value>
- <value>heartbeat</value>
- <value>stonith</value>
- <value>upstart</value>
- </choice>
- </attribute>
- </choice>
- <attribute name="type"><text/></attribute>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <ref name="element-resource-extra"/>
- <ref name="element-operations"/>
- <zeroOrMore>
- <element name="utilization">
- <externalRef href="nvset.rng"/>
- </element>
- </zeroOrMore>
- </interleave>
- </element>
- </define>
-
- <define name="element-group">
- <element name="group">
- <attribute name="id"><data type="ID"/></attribute>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <interleave>
- <ref name="element-resource-extra"/>
- <oneOrMore>
- <ref name="element-primitive"/>
- </oneOrMore>
- </interleave>
- </element>
- </define>
-
- <define name="element-clone">
- <element name="clone">
- <attribute name="id"><data type="ID"/></attribute>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <interleave>
- <ref name="element-resource-extra"/>
- <choice>
- <ref name="element-primitive"/>
- <ref name="element-group"/>
- </choice>
- </interleave>
- </element>
- </define>
-
- <define name="element-master">
- <element name="master">
- <attribute name="id"><data type="ID"/></attribute>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <interleave>
- <ref name="element-resource-extra"/>
- <choice>
- <ref name="element-primitive"/>
- <ref name="element-group"/>
- </choice>
- </interleave>
- </element>
- </define>
-
- <define name="element-resource-extra">
- <zeroOrMore>
- <choice>
- <element name="meta_attributes">
- <externalRef href="nvset.rng"/>
- </element>
- <element name="instance_attributes">
- <externalRef href="nvset.rng"/>
- </element>
- </choice>
- </zeroOrMore>
- </define>
-
- <define name="element-operations">
- <optional>
- <element name="operations">
- <optional>
- <attribute name="id"><data type="ID"/></attribute>
- </optional>
- <optional>
- <attribute name="id-ref"><data type="IDREF"/></attribute>
- </optional>
- <zeroOrMore>
- <element name="op">
- <attribute name="id"><data type="ID"/></attribute>
- <attribute name="name"><text/></attribute>
- <attribute name="interval"><text/></attribute>
- <optional>
- <attribute name="description"><text/></attribute>
- </optional>
- <optional>
- <choice>
- <attribute name="start-delay"><text/></attribute>
- <attribute name="interval-origin"><text/></attribute>
- </choice>
- </optional>
- <optional>
- <attribute name="timeout"><text/></attribute>
- </optional>
- <optional>
- <attribute name="enabled"><data type="boolean"/></attribute>
- </optional>
- <optional>
- <attribute name="record-pending"><data type="boolean"/></attribute>
- </optional>
- <optional>
- <attribute name="role">
- <choice>
- <value>Stopped</value>
- <value>Started</value>
- <value>Slave</value>
- <value>Master</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="requires">
- <choice>
- <value>nothing</value>
- <value>quorum</value>
- <value>fencing</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="on-fail">
- <choice>
- <value>ignore</value>
- <value>block</value>
- <value>stop</value>
- <value>restart</value>
- <value>standby</value>
- <value>fence</value>
- <value>restart-container</value>
- </choice>
- </attribute>
- </optional>
- <ref name="element-resource-extra"/>
- </element>
- </zeroOrMore>
- </element>
- </optional>
- </define>
-
-</grammar>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 23, 12:38 PM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1017754
Default Alt Text
(41 KB)

Event Timeline