c563b9
From bd4f396f267d8ef8f9c9bcbf286a77dc78d4e1b0 Mon Sep 17 00:00:00 2001
c563b9
From: Chris Lumens <clumens@redhat.com>
c563b9
Date: Tue, 2 Mar 2021 10:26:13 -0500
c563b9
Subject: [PATCH 1/3] Med: Generate xml/crm_mon.rng from the contents of
c563b9
 xml/crm_mon*.
c563b9
c563b9
This prevents the version reference in it from getting out of sync.
c563b9
c563b9
See: rhbz#1931332
c563b9
---
c563b9
 xml/Makefile.am | 28 +++++++++++++++++++++++-----
c563b9
 xml/crm_mon.rng | 16 ----------------
c563b9
 3 files changed, 24 insertions(+), 21 deletions(-)
c563b9
 delete mode 100644 xml/crm_mon.rng
c563b9
c563b9
diff --git a/xml/Makefile.am b/xml/Makefile.am
c563b9
index cb6cfa0..c52b968 100644
c563b9
--- a/xml/Makefile.am
c563b9
+++ b/xml/Makefile.am
c563b9
@@ -76,22 +76,24 @@ CIB_abs_xsl		= $(abs_srcdir)/upgrade-1.3.xsl			\
c563b9
 			  $(abs_srcdir)/upgrade-2.10.xsl		\
c563b9
 			  $(wildcard $(abs_srcdir)/upgrade-*enter.xsl)	\
c563b9
 			  $(wildcard $(abs_srcdir)/upgrade-*leave.xsl)
c563b9
-MON_abs_files		= $(abs_srcdir)/crm_mon.rng
c563b9
+MON_abs_files 		= $(abs_srcdir)/crm_mon.rng
c563b9
 API_files		= $(foreach base,$(API_base),$(wildcard $(srcdir)/api/$(base)*.rng))
c563b9
 CIB_files		= $(foreach base,$(CIB_base),$(wildcard $(srcdir)/$(base).rng $(srcdir)/$(base)-*.rng))
c563b9
 CIB_xsl			= $(srcdir)/upgrade-1.3.xsl			\
c563b9
 			  $(srcdir)/upgrade-2.10.xsl		\
c563b9
 			  $(wildcard $(srcdir)/upgrade-*enter.xsl)	\
c563b9
 			  $(wildcard $(srcdir)/upgrade-*leave.xsl)
c563b9
-MON_files		= $(srcdir)/crm_mon.rng
c563b9
+MON_files 		= $(srcdir)/crm_mon.rng
c563b9
 
c563b9
 # Sorted lists of all numeric schema versions
c563b9
 API_numeric_versions	= $(call numeric_versions,${API_files})
c563b9
 CIB_numeric_versions	= $(call numeric_versions,${CIB_files})
c563b9
+MON_numeric_versions 	= $(call numeric_versions,$(wildcard $(srcdir)/api/crm_mon*.rng))
c563b9
 
c563b9
 # The highest numeric schema version
c563b9
 API_max			?= $(lastword $(API_numeric_versions))
c563b9
 CIB_max			?= $(lastword $(CIB_numeric_versions))
c563b9
+MON_max 			?= $(lastword $(MON_numeric_versions))
c563b9
 
c563b9
 # Sorted lists of all schema versions (including "next")
c563b9
 API_versions		= next $(API_numeric_versions)
c563b9
@@ -100,11 +102,12 @@ CIB_versions		= next $(CIB_numeric_versions)
c563b9
 # Build tree locations of static schema files and transforms (for VPATH builds)
c563b9
 API_build_copies	= $(foreach f,$(API_abs_files),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
c563b9
 CIB_build_copies	= $(foreach f,$(CIB_abs_files) $(CIB_abs_xsl),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
c563b9
-MON_build_copies	= $(foreach f,$(MON_abs_files),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
c563b9
+MON_build_copies 	= $(foreach f,$(MON_abs_files),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
c563b9
 
c563b9
 # Dynamically generated schema files
c563b9
 API_generated		= api/api-result.rng $(foreach base,$(API_versions),api/api-result-$(base).rng)
c563b9
 CIB_generated		= pacemaker.rng $(foreach base,$(CIB_versions),pacemaker-$(base).rng) versions.rng
c563b9
+MON_generated 		= crm_mon.rng
c563b9
 
c563b9
 CIB_version_pairs	= $(call version_pairs,${CIB_numeric_versions})
c563b9
 CIB_version_pairs_cnt	= $(words ${CIB_version_pairs})
c563b9
@@ -112,10 +115,10 @@ CIB_version_pairs_last  = $(call version_pairs_last,${CIB_version_pairs_cnt},${C
c563b9
 
c563b9
 dist_API_DATA		= $(API_files)
c563b9
 dist_CIB_DATA		= $(CIB_files) $(CIB_xsl)
c563b9
-dist_MON_DATA		= $(MON_files)
c563b9
 
c563b9
 nodist_API_DATA		= $(API_generated)
c563b9
 nodist_CIB_DATA		= $(CIB_generated)
c563b9
+nodist_MON_DATA		= $(MON_generated)
c563b9
 
c563b9
 EXTRA_DIST		= Readme.md			\
c563b9
 			  best-match.sh			\
c563b9
@@ -162,6 +165,21 @@ api/api-result-%.rng: $(API_build_copies) best-match.sh Makefile.am
c563b9
 	$(AM_V_at)echo '  </start>' >> $@
c563b9
 	$(AM_V_SCHEMA)echo '</grammar>' >> $@
c563b9
 
c563b9
+crm_mon.rng: api/crm_mon-$(MON_max).rng
c563b9
+	$(AM_V_at)echo '' > $@
c563b9
+	$(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0"' >> $@
c563b9
+	$(AM_V_at)echo '         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
c563b9
+	$(AM_V_at)echo '    <start>' >> $@
c563b9
+	$(AM_V_at)echo '        <ref name="element-crm_mon-old"/>' >> $@
c563b9
+	$(AM_V_at)echo '    </start>' >> $@
c563b9
+	$(AM_V_at)echo '    <define name="element-crm_mon-old">' >> $@
c563b9
+	$(AM_V_at)echo '        <element name="crm_mon">' >> $@
c563b9
+	$(AM_V_at)echo '            <attribute name="version"> <text/> </attribute>' >> $@
c563b9
+	$(AM_V_at)echo '            <externalRef href="$(<)" />' >> $@
c563b9
+	$(AM_V_at)echo '        </element>' >> $@
c563b9
+	$(AM_V_at)echo '    </define>' >> $@
c563b9
+	$(AM_V_SCHEMA)echo '</grammar>' >> $@
c563b9
+
c563b9
 # Dynamically generated top-level CIB schema
c563b9
 pacemaker.rng: pacemaker-$(CIB_max).rng
c563b9
 	$(AM_V_SCHEMA)cp $(top_builddir)/xml/$< $@
c563b9
@@ -256,7 +274,7 @@ fulldiff: best-match.sh
c563b9
 	@echo "#  Comparing all changes across all the subsequent increments"
c563b9
 	$(call version_diff,${CIB_version_pairs})
c563b9
 
c563b9
-CLEANFILES = $(API_generated) $(CIB_generated)
c563b9
+CLEANFILES = $(API_generated) $(CIB_generated) $(MON_generated)
c563b9
 
c563b9
 clean-local:
c563b9
 	if [ "x$(srcdir)" != "x$(builddir)" ]; then					\
c563b9
diff --git a/xml/crm_mon.rng b/xml/crm_mon.rng
c563b9
deleted file mode 100644
c563b9
index be87fba..0000000
c563b9
--- a/xml/crm_mon.rng
c563b9
+++ /dev/null
c563b9
@@ -1,16 +0,0 @@
c563b9
-
c563b9
-
c563b9
-         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
c563b9
-
c563b9
-    <start>
c563b9
-        <ref name="element-crm_mon-old"/>
c563b9
-    </start>
c563b9
-
c563b9
-    <define name="element-crm_mon-old">
c563b9
-        <element name="crm_mon">
c563b9
-            <attribute name="version"> <text/> </attribute>
c563b9
-            <externalRef href="api/crm_mon-2.3.rng" />
c563b9
-        </element>
c563b9
-    </define>
c563b9
-
c563b9
-</grammar>
c563b9
-- 
c563b9
1.8.3.1
c563b9
c563b9
c563b9
From 0cbc5b0a66ac0bf206ff45f36206253a60620e07 Mon Sep 17 00:00:00 2001
c563b9
From: Chris Lumens <clumens@redhat.com>
c563b9
Date: Tue, 2 Mar 2021 10:53:17 -0500
c563b9
Subject: [PATCH 2/3] Med: Copy crm_mon.rng and crm_resource.rng in preparation
c563b9
 for updates.
c563b9
c563b9
See: rhbz#1931332
c563b9
---
c563b9
 xml/api/crm_mon-2.7.rng      | 311 +++++++++++++++++++++++++++++++++++++++++++
c563b9
 xml/api/crm_resource-2.7.rng | 238 +++++++++++++++++++++++++++++++++
c563b9
 2 files changed, 549 insertions(+)
c563b9
 create mode 100644 xml/api/crm_mon-2.7.rng
c563b9
 create mode 100644 xml/api/crm_resource-2.7.rng
c563b9
c563b9
diff --git a/xml/api/crm_mon-2.7.rng b/xml/api/crm_mon-2.7.rng
c563b9
new file mode 100644
c563b9
index 0000000..88973a4
c563b9
--- /dev/null
c563b9
+++ b/xml/api/crm_mon-2.7.rng
c563b9
@@ -0,0 +1,311 @@
c563b9
+
c563b9
+
c563b9
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
c563b9
+
c563b9
+    <start>
c563b9
+        <ref name="element-crm-mon"/>
c563b9
+    </start>
c563b9
+
c563b9
+    <define name="element-crm-mon">
c563b9
+        <optional>
c563b9
+            <ref name="element-summary" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="nodes-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="resources-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="node-attributes-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="node-history-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="failures-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="fence-event-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="tickets-list" />
c563b9
+        </optional>
c563b9
+        <optional>
c563b9
+            <ref name="bans-list" />
c563b9
+        </optional>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-summary">
c563b9
+        <element name="summary">
c563b9
+            <optional>
c563b9
+                <element name="stack">
c563b9
+                    <attribute name="type"> <text /> </attribute>
c563b9
+                </element>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <element name="current_dc">
c563b9
+                    <attribute name="present"> <data type="boolean" /> </attribute>
c563b9
+                    <optional>
c563b9
+                        <group>
c563b9
+                            <attribute name="version"> <text /> </attribute>
c563b9
+                            <attribute name="name"> <text /> </attribute>
c563b9
+                            <attribute name="id"> <text /> </attribute>
c563b9
+                            <attribute name="with_quorum"> <data type="boolean" /> </attribute>
c563b9
+                        </group>
c563b9
+                    </optional>
c563b9
+                </element>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <element name="last_update">
c563b9
+                    <attribute name="time"> <text /> </attribute>
c563b9
+                </element>
c563b9
+                <element name="last_change">
c563b9
+                    <attribute name="time"> <text /> </attribute>
c563b9
+                    <attribute name="user"> <text /> </attribute>
c563b9
+                    <attribute name="client"> <text /> </attribute>
c563b9
+                    <attribute name="origin"> <text /> </attribute>
c563b9
+                </element>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <element name="nodes_configured">
c563b9
+                    <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                </element>
c563b9
+                <element name="resources_configured">
c563b9
+                    <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    <attribute name="disabled"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    <attribute name="blocked"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                </element>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <element name="cluster_options">
c563b9
+                    <attribute name="stonith-enabled"> <data type="boolean" /> </attribute>
c563b9
+                    <attribute name="symmetric-cluster"> <data type="boolean" /> </attribute>
c563b9
+                    <attribute name="no-quorum-policy"> <text /> </attribute>
c563b9
+                    <attribute name="maintenance-mode"> <data type="boolean" /> </attribute>
c563b9
+                    <attribute name="stop-all-resources"> <data type="boolean" /> </attribute>
c563b9
+                </element>
c563b9
+            </optional>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="resources-list">
c563b9
+        <element name="resources">
c563b9
+            <zeroOrMore>
c563b9
+                <externalRef href="resources-2.4.rng" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="nodes-list">
c563b9
+        <element name="nodes">
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-full-node" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="node-attributes-list">
c563b9
+        <element name="node_attributes">
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-node-with-attributes" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="node-history-list">
c563b9
+        <element name="node_history">
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-node-history" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="failures-list">
c563b9
+        <element name="failures">
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-failure" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="fence-event-list">
c563b9
+        <element name="fence_history">
c563b9
+            <optional>
c563b9
+                <attribute name="status"> <data type="integer" /> </attribute>
c563b9
+            </optional>
c563b9
+            <zeroOrMore>
c563b9
+                <externalRef href="fence-event-2.0.rng" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="tickets-list">
c563b9
+        <element name="tickets">
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-ticket" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="bans-list">
c563b9
+        <element name="bans">
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-ban" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-full-node">
c563b9
+        <element name="node">
c563b9
+            <attribute name="name"> <text/> </attribute>
c563b9
+            <attribute name="id"> <text/> </attribute>
c563b9
+            <attribute name="online"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="standby"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="standby_onfail"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="maintenance"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="pending"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="unclean"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="shutdown"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="expected_up"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="is_dc"> <data type="boolean" /> </attribute>
c563b9
+            <attribute name="resources_running"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <attribute name="type">
c563b9
+                <choice>
c563b9
+                    <value>unknown</value>
c563b9
+                    <value>member</value>
c563b9
+                    <value>remote</value>
c563b9
+                    <value>ping</value>
c563b9
+                </choice>
c563b9
+            </attribute>
c563b9
+            <optional>
c563b9
+                
c563b9
+                     "container_id" while later versions use "id_as_resource" -->
c563b9
+                <choice>
c563b9
+                    <attribute name="container_id"> <text/> </attribute>
c563b9
+                    <attribute name="id_as_resource"> <text/> </attribute>
c563b9
+                </choice>
c563b9
+            </optional>
c563b9
+            <externalRef href="resources-2.4.rng" />
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-node-with-attributes">
c563b9
+        <element name="node">
c563b9
+            <attribute name="name"> <text /> </attribute>
c563b9
+            <zeroOrMore>
c563b9
+                <element name="attribute">
c563b9
+                    <attribute name="name"> <text /> </attribute>
c563b9
+                    <attribute name="value"> <text /> </attribute>
c563b9
+                    <optional>
c563b9
+                        <attribute name="expected"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    </optional>
c563b9
+                </element>
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-node-history">
c563b9
+        <element name="node">
c563b9
+            <attribute name="name"> <text /> </attribute>
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-resource-history" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-resource-history">
c563b9
+        <element name="resource_history">
c563b9
+            <attribute name="id"> <text /> </attribute>
c563b9
+            <attribute name="orphan"> <data type="boolean" /> </attribute>
c563b9
+            <optional>
c563b9
+                <group>
c563b9
+                    <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    <optional>
c563b9
+                        <attribute name="fail-count"> <text /> </attribute>
c563b9
+                    </optional>
c563b9
+                    <optional>
c563b9
+                        <attribute name="last-failure"> <text /> </attribute>
c563b9
+                    </optional>
c563b9
+                </group>
c563b9
+            </optional>
c563b9
+            <zeroOrMore>
c563b9
+                <ref name="element-operation-history" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-operation-history">
c563b9
+        <element name="operation_history">
c563b9
+            <attribute name="call"> <text /> </attribute>
c563b9
+            <attribute name="task"> <text /> </attribute>
c563b9
+            <optional>
c563b9
+                <attribute name="interval"> <text /> </attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="last-rc-change"> <text /> </attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="last-run"> <text /> </attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="exec-time"> <text /> </attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="queue-time"> <text /> </attribute>
c563b9
+            </optional>
c563b9
+            <attribute name="rc"> <data type="integer" /> </attribute>
c563b9
+            <attribute name="rc_text"> <text /> </attribute>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-failure">
c563b9
+        <element name="failure">
c563b9
+            <choice>
c563b9
+                <attribute name="op_key"> <text/> </attribute>
c563b9
+                <attribute name="id"> <text/> </attribute>
c563b9
+            </choice>
c563b9
+            <attribute name="node"> <text /> </attribute>
c563b9
+            <attribute name="exitstatus"> <text /> </attribute>
c563b9
+            <attribute name="exitreason"> <text /> </attribute>
c563b9
+            <attribute name="exitcode"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <attribute name="call"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <attribute name="status"> <text /> </attribute>
c563b9
+            <optional>
c563b9
+                <group>
c563b9
+                    <attribute name="last-rc-change"> <text /> </attribute>
c563b9
+                    <attribute name="queued"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    <attribute name="exec"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    <attribute name="interval"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                    <attribute name="task"> <text /> </attribute>
c563b9
+                </group>
c563b9
+            </optional>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-ticket">
c563b9
+        <element name="ticket">
c563b9
+            <attribute name="id"> <text /> </attribute>
c563b9
+            <attribute name="status">
c563b9
+                <choice>
c563b9
+                    <value>granted</value>
c563b9
+                    <value>revoked</value>
c563b9
+                </choice>
c563b9
+            </attribute>
c563b9
+            <attribute name="standby"> <data type="boolean" /> </attribute>
c563b9
+            <optional>
c563b9
+                <attribute name="last-granted"> <text /> </attribute>
c563b9
+            </optional>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-ban">
c563b9
+        <element name="ban">
c563b9
+            <attribute name="id"> <text /> </attribute>
c563b9
+            <attribute name="resource"> <text /> </attribute>
c563b9
+            <attribute name="node"> <text /> </attribute>
c563b9
+            <attribute name="weight"> <data type="integer" /> </attribute>
c563b9
+            <attribute name="master_only"> <data type="boolean" /> </attribute>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+</grammar>
c563b9
diff --git a/xml/api/crm_resource-2.7.rng b/xml/api/crm_resource-2.7.rng
c563b9
new file mode 100644
c563b9
index 0000000..b49e24c
c563b9
--- /dev/null
c563b9
+++ b/xml/api/crm_resource-2.7.rng
c563b9
@@ -0,0 +1,238 @@
c563b9
+
c563b9
+
c563b9
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
c563b9
+
c563b9
+    <start>
c563b9
+        <ref name="element-crm-resource"/>
c563b9
+    </start>
c563b9
+
c563b9
+    <define name="element-crm-resource">
c563b9
+        <choice>
c563b9
+            <ref name="agents-list" />
c563b9
+            <ref name="alternatives-list" />
c563b9
+            <ref name="constraints-list" />
c563b9
+            <externalRef href="generic-list-2.4.rng"/>
c563b9
+            <element name="metadata"> <text/> </element>
c563b9
+            <ref name="locate-list" />
c563b9
+            <ref name="operations-list" />
c563b9
+            <ref name="providers-list" />
c563b9
+            <ref name="reasons-list" />
c563b9
+            <ref name="resource-check" />
c563b9
+            <ref name="resource-config" />
c563b9
+            <ref name="resources-list" />
c563b9
+        </choice>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="agents-list">
c563b9
+        <element name="agents">
c563b9
+            <attribute name="standard"> <text/> </attribute>
c563b9
+            <optional>
c563b9
+                <attribute name="provider"> <text/> </attribute>
c563b9
+            </optional>
c563b9
+            <zeroOrMore>
c563b9
+                <element name="agent"> <text/> </element>
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="alternatives-list">
c563b9
+        <element name="providers">
c563b9
+            <attribute name="for"> <text/> </attribute>
c563b9
+            <zeroOrMore>
c563b9
+                <element name="provider"> <text/> </element>
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="constraints-list">
c563b9
+        <element name="constraints">
c563b9
+            <interleave>
c563b9
+                <zeroOrMore>
c563b9
+                    <ref name="rsc-location" />
c563b9
+                </zeroOrMore>
c563b9
+                <zeroOrMore>
c563b9
+                    <ref name="rsc-colocation" />
c563b9
+                </zeroOrMore>
c563b9
+            </interleave>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="locate-list">
c563b9
+        <element name="nodes">
c563b9
+            <attribute name="resource"> <text/> </attribute>
c563b9
+            <zeroOrMore>
c563b9
+                <element name="node">
c563b9
+                    <optional>
c563b9
+                        <attribute name="state"><value>promoted</value></attribute>
c563b9
+                    </optional>
c563b9
+                    <text/>
c563b9
+                </element>
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="rsc-location">
c563b9
+        <element name="rsc_location">
c563b9
+            <attribute name="node"> <text/> </attribute>
c563b9
+            <attribute name="rsc"> <text/> </attribute>
c563b9
+            <attribute name="id"> <text/> </attribute>
c563b9
+            <externalRef href="../score.rng"/>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="operations-list">
c563b9
+        <element name="operations">
c563b9
+            <oneOrMore>
c563b9
+                <ref name="element-operation-list" />
c563b9
+            </oneOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="providers-list">
c563b9
+        <element name="providers">
c563b9
+            <attribute name="standard"> <value>ocf</value> </attribute>
c563b9
+            <optional>
c563b9
+                <attribute name="agent"> <text/> </attribute>
c563b9
+            </optional>
c563b9
+            <zeroOrMore>
c563b9
+                <element name="provider"> <text/> </element>
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="reasons-list">
c563b9
+        <choice>
c563b9
+            <ref name="no-resource-or-uname"/>
c563b9
+            <ref name="resource-and-uname"/>
c563b9
+            <ref name="no-resource-but-uname"/>
c563b9
+            <ref name="resource-but-no-uname"/>
c563b9
+        </choice>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="no-resource-or-uname">
c563b9
+        <element name="reason">
c563b9
+            <element name="resources">
c563b9
+                <zeroOrMore>
c563b9
+                    <element name="resource">
c563b9
+                        <attribute name="id"> <text/> </attribute>
c563b9
+                        <attribute name="running"> <data type="boolean"/> </attribute>
c563b9
+                        <ref name="resource-check"/>
c563b9
+                    </element>
c563b9
+                </zeroOrMore>
c563b9
+            </element>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="resource-and-uname">
c563b9
+        <element name="reason">
c563b9
+            <attribute name="running_on"> <text/> </attribute>
c563b9
+            <ref name="resource-check"/>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="no-resource-but-uname">
c563b9
+        <element name="reason">
c563b9
+            <element name="resources">
c563b9
+                <zeroOrMore>
c563b9
+                    <element name="resource">
c563b9
+                        <attribute name="id"> <text/> </attribute>
c563b9
+                        <attribute name="running"> <data type="boolean"/> </attribute>
c563b9
+                        <attribute name="host"> <text/> </attribute>
c563b9
+                        <ref name="resource-check"/>
c563b9
+                    </element>
c563b9
+                </zeroOrMore>
c563b9
+            </element>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="resource-but-no-uname">
c563b9
+        <element name="reason">
c563b9
+            <attribute name="running"> <data type="boolean"/> </attribute>
c563b9
+            <ref name="resource-check"/>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="resource-config">
c563b9
+        <element name="resource_config">
c563b9
+            <externalRef href="resources-2.4.rng" />
c563b9
+            <element name="xml"> <text/> </element>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="resource-check">
c563b9
+        <element name="check">
c563b9
+            <attribute name="id"> <text/> </attribute>
c563b9
+            <optional>
c563b9
+                <choice>
c563b9
+                    <attribute name="remain_stopped"><value>true</value></attribute>
c563b9
+                    <attribute name="promotable"><value>false</value></attribute>
c563b9
+                </choice>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="unmanaged"><value>true</value></attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="locked-to"> <text/> </attribute>
c563b9
+            </optional>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="resources-list">
c563b9
+        <element name="resources">
c563b9
+            <zeroOrMore>
c563b9
+                <externalRef href="resources-2.4.rng" />
c563b9
+            </zeroOrMore>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="rsc-colocation">
c563b9
+        <element name="rsc_colocation">
c563b9
+            <attribute name="id"> <text/> </attribute>
c563b9
+            <attribute name="rsc"> <text/> </attribute>
c563b9
+            <attribute name="with-rsc"> <text/> </attribute>
c563b9
+            <externalRef href="../score.rng"/>
c563b9
+            <optional>
c563b9
+                <attribute name="node-attribute"> <text/> </attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="rsc-role">
c563b9
+                    <ref name="attribute-roles"/>
c563b9
+                </attribute>
c563b9
+            </optional>
c563b9
+            <optional>
c563b9
+                <attribute name="with-rsc-role">
c563b9
+                    <ref name="attribute-roles"/>
c563b9
+                </attribute>
c563b9
+            </optional>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="element-operation-list">
c563b9
+        <element name="operation">
c563b9
+            <optional>
c563b9
+                <group>
c563b9
+                    <attribute name="rsc"> <text/> </attribute>
c563b9
+                    <attribute name="agent"> <text/> </attribute>
c563b9
+                </group>
c563b9
+            </optional>
c563b9
+            <attribute name="op"> <text/> </attribute>
c563b9
+            <attribute name="node"> <text/> </attribute>
c563b9
+            <attribute name="call"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <attribute name="rc"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <optional>
c563b9
+                <attribute name="last-rc-change"> <text/> </attribute>
c563b9
+                <attribute name="exec-time"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            </optional>
c563b9
+            <attribute name="status"> <text/> </attribute>
c563b9
+        </element>
c563b9
+    </define>
c563b9
+
c563b9
+    <define name="attribute-roles">
c563b9
+        <choice>
c563b9
+            <value>Stopped</value>
c563b9
+            <value>Started</value>
c563b9
+            <value>Master</value>
c563b9
+            <value>Slave</value>
c563b9
+        </choice>
c563b9
+    </define>
c563b9
+</grammar>
c563b9
-- 
c563b9
1.8.3.1
c563b9
c563b9
c563b9
From 9b6ee6eb5aa1008beebae9d9f6c3889c81c3bbb6 Mon Sep 17 00:00:00 2001
c563b9
From: Chris Lumens <clumens@redhat.com>
c563b9
Date: Tue, 2 Mar 2021 10:58:15 -0500
c563b9
Subject: [PATCH 3/3] Med: Change the schema type of 'expected' and 'call' to
c563b9
 integer.
c563b9
c563b9
Regression in 2.0.3.
c563b9
c563b9
See: rhbz#1931332
c563b9
---
c563b9
 xml/api/crm_mon-2.7.rng      | 4 ++--
c563b9
 xml/api/crm_resource-2.7.rng | 2 +-
c563b9
 2 files changed, 3 insertions(+), 3 deletions(-)
c563b9
c563b9
diff --git a/xml/api/crm_mon-2.7.rng b/xml/api/crm_mon-2.7.rng
c563b9
index 88973a4..8e6792b 100644
c563b9
--- a/xml/api/crm_mon-2.7.rng
c563b9
+++ b/xml/api/crm_mon-2.7.rng
c563b9
@@ -198,7 +198,7 @@
c563b9
                     <attribute name="name"> <text /> </attribute>
c563b9
                     <attribute name="value"> <text /> </attribute>
c563b9
                     <optional>
c563b9
-                        <attribute name="expected"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+                        <attribute name="expected"> <data type="integer" /> </attribute>
c563b9
                     </optional>
c563b9
                 </element>
c563b9
             </zeroOrMore>
c563b9
@@ -269,7 +269,7 @@
c563b9
             <attribute name="exitstatus"> <text /> </attribute>
c563b9
             <attribute name="exitreason"> <text /> </attribute>
c563b9
             <attribute name="exitcode"> <data type="nonNegativeInteger" /> </attribute>
c563b9
-            <attribute name="call"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <attribute name="call"> <data type="integer" /> </attribute>
c563b9
             <attribute name="status"> <text /> </attribute>
c563b9
             <optional>
c563b9
                 <group>
c563b9
diff --git a/xml/api/crm_resource-2.7.rng b/xml/api/crm_resource-2.7.rng
c563b9
index b49e24c..8e386db 100644
c563b9
--- a/xml/api/crm_resource-2.7.rng
c563b9
+++ b/xml/api/crm_resource-2.7.rng
c563b9
@@ -217,7 +217,7 @@
c563b9
             </optional>
c563b9
             <attribute name="op"> <text/> </attribute>
c563b9
             <attribute name="node"> <text/> </attribute>
c563b9
-            <attribute name="call"> <data type="nonNegativeInteger" /> </attribute>
c563b9
+            <attribute name="call"> <data type="integer" /> </attribute>
c563b9
             <attribute name="rc"> <data type="nonNegativeInteger" /> </attribute>
c563b9
             <optional>
c563b9
                 <attribute name="last-rc-change"> <text/> </attribute>
c563b9
-- 
c563b9
1.8.3.1
c563b9