Blame SOURCES/006-crm_simulate.patch

d49186
From 97571e6ccc9b7fa339a7e27d9b0b9ab782ff3003 Mon Sep 17 00:00:00 2001
d49186
From: Chris Lumens <clumens@redhat.com>
d49186
Date: Wed, 16 Jun 2021 13:54:10 -0400
d49186
Subject: [PATCH 1/5] Low: schemas: Copy crm_mon.rng in preparation for
d49186
 changes.
d49186
d49186
---
d49186
 xml/api/crm_mon-2.12.rng | 243 +++++++++++++++++++++++++++++++++++++++++++++++
d49186
 1 file changed, 243 insertions(+)
d49186
 create mode 100644 xml/api/crm_mon-2.12.rng
d49186
d49186
diff --git a/xml/api/crm_mon-2.12.rng b/xml/api/crm_mon-2.12.rng
d49186
new file mode 100644
d49186
index 0000000..ffec923
d49186
--- /dev/null
d49186
+++ b/xml/api/crm_mon-2.12.rng
d49186
@@ -0,0 +1,243 @@
d49186
+
d49186
+
d49186
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
d49186
+
d49186
+    <start>
d49186
+        <ref name="element-crm-mon"/>
d49186
+    </start>
d49186
+
d49186
+    <define name="element-crm-mon">
d49186
+        <optional>
d49186
+            <ref name="element-summary" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="nodes-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="resources-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="node-attributes-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="node-history-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="failures-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="fence-event-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="tickets-list" />
d49186
+        </optional>
d49186
+        <optional>
d49186
+            <ref name="bans-list" />
d49186
+        </optional>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-summary">
d49186
+        <element name="summary">
d49186
+            <optional>
d49186
+                <element name="stack">
d49186
+                    <attribute name="type"> <text /> </attribute>
d49186
+                </element>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <element name="current_dc">
d49186
+                    <attribute name="present"> <data type="boolean" /> </attribute>
d49186
+                    <optional>
d49186
+                        <group>
d49186
+                            <attribute name="version"> <text /> </attribute>
d49186
+                            <attribute name="name"> <text /> </attribute>
d49186
+                            <attribute name="id"> <text /> </attribute>
d49186
+                            <attribute name="with_quorum"> <data type="boolean" /> </attribute>
d49186
+                        </group>
d49186
+                    </optional>
d49186
+                </element>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <element name="last_update">
d49186
+                    <attribute name="time"> <text /> </attribute>
d49186
+                </element>
d49186
+                <element name="last_change">
d49186
+                    <attribute name="time"> <text /> </attribute>
d49186
+                    <attribute name="user"> <text /> </attribute>
d49186
+                    <attribute name="client"> <text /> </attribute>
d49186
+                    <attribute name="origin"> <text /> </attribute>
d49186
+                </element>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <element name="nodes_configured">
d49186
+                    <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
d49186
+                </element>
d49186
+                <element name="resources_configured">
d49186
+                    <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
d49186
+                    <attribute name="disabled"> <data type="nonNegativeInteger" /> </attribute>
d49186
+                    <attribute name="blocked"> <data type="nonNegativeInteger" /> </attribute>
d49186
+                </element>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <element name="cluster_options">
d49186
+                    <attribute name="stonith-enabled"> <data type="boolean" /> </attribute>
d49186
+                    <attribute name="symmetric-cluster"> <data type="boolean" /> </attribute>
d49186
+                    <attribute name="no-quorum-policy"> <text /> </attribute>
d49186
+                    <attribute name="maintenance-mode"> <data type="boolean" /> </attribute>
d49186
+                    <attribute name="stop-all-resources"> <data type="boolean" /> </attribute>
d49186
+                </element>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="resources-list">
d49186
+        <element name="resources">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="resources-2.4.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="nodes-list">
d49186
+        <element name="nodes">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="nodes-2.8.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="node-attributes-list">
d49186
+        <element name="node_attributes">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="node-attrs-2.8.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="node-history-list">
d49186
+        <element name="node_history">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-node-history" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="failures-list">
d49186
+        <element name="failures">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="failure-2.8.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="fence-event-list">
d49186
+        <element name="fence_history">
d49186
+            <optional>
d49186
+                <attribute name="status"> <data type="integer" /> </attribute>
d49186
+            </optional>
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="fence-event-2.0.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="tickets-list">
d49186
+        <element name="tickets">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-ticket" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="bans-list">
d49186
+        <element name="bans">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-ban" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-node-history">
d49186
+        <element name="node">
d49186
+            <attribute name="name"> <text /> </attribute>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-resource-history" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-resource-history">
d49186
+        <element name="resource_history">
d49186
+            <attribute name="id"> <text /> </attribute>
d49186
+            <attribute name="orphan"> <data type="boolean" /> </attribute>
d49186
+            <optional>
d49186
+                <group>
d49186
+                    <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
d49186
+                    <optional>
d49186
+                        <attribute name="fail-count"> <text /> </attribute>
d49186
+                    </optional>
d49186
+                    <optional>
d49186
+                        <attribute name="last-failure"> <text /> </attribute>
d49186
+                    </optional>
d49186
+                </group>
d49186
+            </optional>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-operation-history" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-operation-history">
d49186
+        <element name="operation_history">
d49186
+            <attribute name="call"> <text /> </attribute>
d49186
+            <attribute name="task"> <text /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="interval"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="last-rc-change"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="last-run"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="exec-time"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="queue-time"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <attribute name="rc"> <data type="integer" /> </attribute>
d49186
+            <attribute name="rc_text"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-ticket">
d49186
+        <element name="ticket">
d49186
+            <attribute name="id"> <text /> </attribute>
d49186
+            <attribute name="status">
d49186
+                <choice>
d49186
+                    <value>granted</value>
d49186
+                    <value>revoked</value>
d49186
+                </choice>
d49186
+            </attribute>
d49186
+            <attribute name="standby"> <data type="boolean" /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="last-granted"> <text /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-ban">
d49186
+        <element name="ban">
d49186
+            <attribute name="id"> <text /> </attribute>
d49186
+            <attribute name="resource"> <text /> </attribute>
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <attribute name="weight"> <data type="integer" /> </attribute>
d49186
+            <attribute name="promoted-only"> <data type="boolean" /> </attribute>
d49186
+            
d49186
+                 provided solely for API backward compatibility. It will be
d49186
+                 removed in a future release. Check promoted-only instead.
d49186
+              -->
d49186
+            <attribute name="master_only"> <data type="boolean" /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+</grammar>
d49186
-- 
d49186
1.8.3.1
d49186
d49186
d49186
From da394983f106f974274ddd94675a04c85086010e Mon Sep 17 00:00:00 2001
d49186
From: Chris Lumens <clumens@redhat.com>
d49186
Date: Fri, 18 Jun 2021 15:06:34 -0400
d49186
Subject: [PATCH 2/5] Refactor: Split node history out into its own XML schema.
d49186
d49186
This allows for sharing it between crm_mon and crm_simulate.
d49186
---
d49186
 xml/Makefile.am               |  2 +-
d49186
 xml/api/crm_mon-2.12.rng      | 64 +--------------------------------------
d49186
 xml/api/node-history-2.12.rng | 70 +++++++++++++++++++++++++++++++++++++++++++
d49186
 3 files changed, 72 insertions(+), 64 deletions(-)
d49186
 create mode 100644 xml/api/node-history-2.12.rng
d49186
d49186
diff --git a/xml/Makefile.am b/xml/Makefile.am
d49186
index b9448d4..8e7b6d3 100644
d49186
--- a/xml/Makefile.am
d49186
+++ b/xml/Makefile.am
d49186
@@ -64,7 +64,7 @@ API_request_base	= command-output	\
d49186
 CIB_cfg_base		= options nodes resources constraints fencing acls tags alerts
d49186
 
d49186
 # Names of all schemas (including top level and those included by others)
d49186
-API_base		= $(API_request_base) fence-event failure generic-list item node-attrs nodes resources status
d49186
+API_base		= $(API_request_base) fence-event failure generic-list item node-attrs node-history nodes resources status
d49186
 CIB_base		= cib $(CIB_cfg_base) status score rule nvset
d49186
 
d49186
 # Static schema files and transforms (only CIB has transforms)
d49186
diff --git a/xml/api/crm_mon-2.12.rng b/xml/api/crm_mon-2.12.rng
d49186
index ffec923..be14412 100644
d49186
--- a/xml/api/crm_mon-2.12.rng
d49186
+++ b/xml/api/crm_mon-2.12.rng
d49186
@@ -20,7 +20,7 @@
d49186
             <ref name="node-attributes-list" />
d49186
         </optional>
d49186
         <optional>
d49186
-            <ref name="node-history-list" />
d49186
+            <externalRef href="node-history-2.12.rng"/>
d49186
         </optional>
d49186
         <optional>
d49186
             <ref name="failures-list" />
d49186
@@ -113,14 +113,6 @@
d49186
         </element>
d49186
     </define>
d49186
 
d49186
-    <define name="node-history-list">
d49186
-        <element name="node_history">
d49186
-            <zeroOrMore>
d49186
-                <ref name="element-node-history" />
d49186
-            </zeroOrMore>
d49186
-        </element>
d49186
-    </define>
d49186
-
d49186
     <define name="failures-list">
d49186
         <element name="failures">
d49186
             <zeroOrMore>
d49186
@@ -156,60 +148,6 @@
d49186
         </element>
d49186
     </define>
d49186
 
d49186
-    <define name="element-node-history">
d49186
-        <element name="node">
d49186
-            <attribute name="name"> <text /> </attribute>
d49186
-            <zeroOrMore>
d49186
-                <ref name="element-resource-history" />
d49186
-            </zeroOrMore>
d49186
-        </element>
d49186
-    </define>
d49186
-
d49186
-    <define name="element-resource-history">
d49186
-        <element name="resource_history">
d49186
-            <attribute name="id"> <text /> </attribute>
d49186
-            <attribute name="orphan"> <data type="boolean" /> </attribute>
d49186
-            <optional>
d49186
-                <group>
d49186
-                    <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
d49186
-                    <optional>
d49186
-                        <attribute name="fail-count"> <text /> </attribute>
d49186
-                    </optional>
d49186
-                    <optional>
d49186
-                        <attribute name="last-failure"> <text /> </attribute>
d49186
-                    </optional>
d49186
-                </group>
d49186
-            </optional>
d49186
-            <zeroOrMore>
d49186
-                <ref name="element-operation-history" />
d49186
-            </zeroOrMore>
d49186
-        </element>
d49186
-    </define>
d49186
-
d49186
-    <define name="element-operation-history">
d49186
-        <element name="operation_history">
d49186
-            <attribute name="call"> <text /> </attribute>
d49186
-            <attribute name="task"> <text /> </attribute>
d49186
-            <optional>
d49186
-                <attribute name="interval"> <text /> </attribute>
d49186
-            </optional>
d49186
-            <optional>
d49186
-                <attribute name="last-rc-change"> <text /> </attribute>
d49186
-            </optional>
d49186
-            <optional>
d49186
-                <attribute name="last-run"> <text /> </attribute>
d49186
-            </optional>
d49186
-            <optional>
d49186
-                <attribute name="exec-time"> <text /> </attribute>
d49186
-            </optional>
d49186
-            <optional>
d49186
-                <attribute name="queue-time"> <text /> </attribute>
d49186
-            </optional>
d49186
-            <attribute name="rc"> <data type="integer" /> </attribute>
d49186
-            <attribute name="rc_text"> <text /> </attribute>
d49186
-        </element>
d49186
-    </define>
d49186
-
d49186
     <define name="element-ticket">
d49186
         <element name="ticket">
d49186
             <attribute name="id"> <text /> </attribute>
d49186
diff --git a/xml/api/node-history-2.12.rng b/xml/api/node-history-2.12.rng
d49186
new file mode 100644
d49186
index 0000000..9628000
d49186
--- /dev/null
d49186
+++ b/xml/api/node-history-2.12.rng
d49186
@@ -0,0 +1,70 @@
d49186
+
d49186
+
d49186
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
d49186
+
d49186
+    <start>
d49186
+        <ref name="node-history-list" />
d49186
+    </start>
d49186
+
d49186
+    <define name="node-history-list">
d49186
+        <element name="node_history">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-node-history" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-node-history">
d49186
+        <element name="node">
d49186
+            <attribute name="name"> <text /> </attribute>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-resource-history" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-resource-history">
d49186
+        <element name="resource_history">
d49186
+            <attribute name="id"> <text /> </attribute>
d49186
+            <attribute name="orphan"> <data type="boolean" /> </attribute>
d49186
+            <optional>
d49186
+                <group>
d49186
+                    <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
d49186
+                    <optional>
d49186
+                        <attribute name="fail-count"> <text /> </attribute>
d49186
+                    </optional>
d49186
+                    <optional>
d49186
+                        <attribute name="last-failure"> <text /> </attribute>
d49186
+                    </optional>
d49186
+                </group>
d49186
+            </optional>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-operation-history" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-operation-history">
d49186
+        <element name="operation_history">
d49186
+            <attribute name="call"> <text /> </attribute>
d49186
+            <attribute name="task"> <text /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="interval"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="last-rc-change"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="last-run"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="exec-time"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="queue-time"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <attribute name="rc"> <data type="integer" /> </attribute>
d49186
+            <attribute name="rc_text"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+</grammar>
d49186
-- 
d49186
1.8.3.1
d49186
d49186
d49186
From bf72b2615630eef7876e443d60b34d5a316de847 Mon Sep 17 00:00:00 2001
d49186
From: Chris Lumens <clumens@redhat.com>
d49186
Date: Wed, 16 Jun 2021 14:09:31 -0400
d49186
Subject: [PATCH 3/5] Low: schemas: Copy crm_simulate.rng in preparation for
d49186
 changes.
d49186
d49186
---
d49186
 xml/api/crm_simulate-2.12.rng | 335 ++++++++++++++++++++++++++++++++++++++++++
d49186
 1 file changed, 335 insertions(+)
d49186
 create mode 100644 xml/api/crm_simulate-2.12.rng
d49186
d49186
diff --git a/xml/api/crm_simulate-2.12.rng b/xml/api/crm_simulate-2.12.rng
d49186
new file mode 100644
d49186
index 0000000..9a7612d
d49186
--- /dev/null
d49186
+++ b/xml/api/crm_simulate-2.12.rng
d49186
@@ -0,0 +1,335 @@
d49186
+
d49186
+
d49186
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
d49186
+
d49186
+    <start>
d49186
+        <ref name="element-crm-simulate"/>
d49186
+    </start>
d49186
+
d49186
+    <define name="element-crm-simulate">
d49186
+        <choice>
d49186
+            <ref name="timings-list" />
d49186
+            <group>
d49186
+                <ref name="cluster-status" />
d49186
+                <optional>
d49186
+                    <ref name="modifications-list" />
d49186
+                </optional>
d49186
+                <optional>
d49186
+                    <ref name="allocations-utilizations-list" />
d49186
+                </optional>
d49186
+                <optional>
d49186
+                    <ref name="action-list" />
d49186
+                </optional>
d49186
+                <optional>
d49186
+                    <ref name="cluster-injected-actions-list" />
d49186
+                    <ref name="revised-cluster-status" />
d49186
+                </optional>
d49186
+            </group>
d49186
+        </choice>
d49186
+    </define>
d49186
+
d49186
+    <define name="allocations-utilizations-list">
d49186
+        <choice>
d49186
+            <element name="allocations">
d49186
+                <zeroOrMore>
d49186
+                    <choice>
d49186
+                        <ref name="element-allocation" />
d49186
+                        <ref name="element-promotion" />
d49186
+                    </choice>
d49186
+                </zeroOrMore>
d49186
+            </element>
d49186
+            <element name="utilizations">
d49186
+                <zeroOrMore>
d49186
+                    <choice>
d49186
+                        <ref name="element-capacity" />
d49186
+                        <ref name="element-utilization" />
d49186
+                    </choice>
d49186
+                </zeroOrMore>
d49186
+            </element>
d49186
+            <element name="allocations_utilizations">
d49186
+                <zeroOrMore>
d49186
+                    <choice>
d49186
+                        <ref name="element-allocation" />
d49186
+                        <ref name="element-promotion" />
d49186
+                        <ref name="element-capacity" />
d49186
+                        <ref name="element-utilization" />
d49186
+                    </choice>
d49186
+                </zeroOrMore>
d49186
+            </element>
d49186
+        </choice>
d49186
+    </define>
d49186
+
d49186
+    <define name="cluster-status">
d49186
+        <element name="cluster_status">
d49186
+            <ref name="nodes-list" />
d49186
+            <ref name="resources-list" />
d49186
+            <optional>
d49186
+                <ref name="node-attributes-list" />
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <ref name="failures-list" />
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="modifications-list">
d49186
+        <element name="modifications">
d49186
+            <optional>
d49186
+                <attribute name="quorum"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="watchdog"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-inject-modify-node" />
d49186
+            </zeroOrMore>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-inject-modify-ticket" />
d49186
+            </zeroOrMore>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-inject-spec" />
d49186
+            </zeroOrMore>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-inject-attr" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="revised-cluster-status">
d49186
+        <element name="revised_cluster_status">
d49186
+            <ref name="nodes-list" />
d49186
+            <ref name="resources-list" />
d49186
+            <optional>
d49186
+                <ref name="node-attributes-list" />
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <ref name="failures-list" />
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-attr">
d49186
+        <element name="inject_attr">
d49186
+            <attribute name="cib_node"> <text /> </attribute>
d49186
+            <attribute name="name"> <text /> </attribute>
d49186
+            <attribute name="node_path"> <text /> </attribute>
d49186
+            <attribute name="value"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-modify-node">
d49186
+        <element name="modify_node">
d49186
+            <attribute name="action"> <text /> </attribute>
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-spec">
d49186
+        <element name="inject_spec">
d49186
+            <attribute name="spec"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-modify-ticket">
d49186
+        <element name="modify_ticket">
d49186
+            <attribute name="action"> <text /> </attribute>
d49186
+            <attribute name="ticket"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="cluster-injected-actions-list">
d49186
+        <element name="transition">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-injected-actions" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="node-attributes-list">
d49186
+        <element name="node_attributes">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="node-attrs-2.8.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="failures-list">
d49186
+        <element name="failures">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="failure-2.8.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="nodes-list">
d49186
+        <element name="nodes">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="nodes-2.8.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="resources-list">
d49186
+        <element name="resources">
d49186
+            <zeroOrMore>
d49186
+                <externalRef href="resources-2.4.rng" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="timings-list">
d49186
+        <element name="timings">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-timing" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="action-list">
d49186
+        <element name="actions">
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-node-action" />
d49186
+            </zeroOrMore>
d49186
+            <zeroOrMore>
d49186
+                <ref name="element-rsc-action" />
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-allocation">
d49186
+        <element name="node_weight">
d49186
+            <attribute name="function"> <text /> </attribute>
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <externalRef href="../score.rng" />
d49186
+            <optional>
d49186
+                <attribute name="id"> <text /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-capacity">
d49186
+        <element name="capacity">
d49186
+            <attribute name="comment"> <text /> </attribute>
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <zeroOrMore>
d49186
+                <element>
d49186
+                    <anyName />
d49186
+                    <text />
d49186
+                </element>
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-cluster-action">
d49186
+        <element name="cluster_action">
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <attribute name="task"> <text /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="id"> <text /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-injected-actions">
d49186
+        <choice>
d49186
+            <ref name="element-inject-cluster-action" />
d49186
+            <ref name="element-inject-fencing-action" />
d49186
+            <ref name="element-inject-pseudo-action" />
d49186
+            <ref name="element-inject-rsc-action" />
d49186
+        </choice>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-fencing-action">
d49186
+        <element name="fencing_action">
d49186
+            <attribute name="op"> <text /> </attribute>
d49186
+            <attribute name="target"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-node-action">
d49186
+        <element name="node_action">
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <attribute name="reason"> <text /> </attribute>
d49186
+            <attribute name="task"> <text /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-promotion">
d49186
+        <element name="promotion_score">
d49186
+            <attribute name="id"> <text /> </attribute>
d49186
+            <externalRef href="../score.rng" />
d49186
+            <optional>
d49186
+                <attribute name="node"> <text /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-pseudo-action">
d49186
+        <element name="pseudo_action">
d49186
+            <attribute name="task"> <text /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="node"> <text /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-inject-rsc-action">
d49186
+        <element name="rsc_action">
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <attribute name="op"> <text /> </attribute>
d49186
+            <attribute name="resource"> <text /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="interval"> <data type="integer" /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-timing">
d49186
+        <element name="timing">
d49186
+            <attribute name="file"> <text /> </attribute>
d49186
+            <attribute name="duration"> <data type="double" /> </attribute>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-rsc-action">
d49186
+        <element name="rsc_action">
d49186
+            <attribute name="action"> <text /> </attribute>
d49186
+            <attribute name="resource"> <text /> </attribute>
d49186
+            <optional>
d49186
+                <attribute name="blocked"> <data type="boolean" /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="dest"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="next-role"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="node"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="reason"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="role"> <text /> </attribute>
d49186
+            </optional>
d49186
+            <optional>
d49186
+                <attribute name="source"> <text /> </attribute>
d49186
+            </optional>
d49186
+        </element>
d49186
+    </define>
d49186
+
d49186
+    <define name="element-utilization">
d49186
+        <element name="utilization">
d49186
+            <attribute name="function"> <text /> </attribute>
d49186
+            <attribute name="node"> <text /> </attribute>
d49186
+            <attribute name="resource"> <text /> </attribute>
d49186
+            <zeroOrMore>
d49186
+                <element>
d49186
+                    <anyName />
d49186
+                    <text />
d49186
+                </element>
d49186
+            </zeroOrMore>
d49186
+        </element>
d49186
+    </define>
d49186
+</grammar>
d49186
-- 
d49186
1.8.3.1
d49186
d49186
d49186
From c46e07788788acf5669e3f89b9344190a91c7331 Mon Sep 17 00:00:00 2001
d49186
From: Chris Lumens <clumens@redhat.com>
d49186
Date: Fri, 18 Jun 2021 15:10:19 -0400
d49186
Subject: [PATCH 4/5] Feature: tools: Add the node-summary to crm_simulate
d49186
 output.
d49186
d49186
If --show-failcounts is given to crm_simulate, it should also display
d49186
the node-summary message.
d49186
d49186
See: rhbz#1686426
d49186
---
d49186
 tools/crm_simulate.c          | 7 +++++--
d49186
 xml/api/crm_simulate-2.12.rng | 3 +++
d49186
 2 files changed, 8 insertions(+), 2 deletions(-)
d49186
d49186
diff --git a/tools/crm_simulate.c b/tools/crm_simulate.c
d49186
index b4aa9d1..2ea292c 100644
d49186
--- a/tools/crm_simulate.c
d49186
+++ b/tools/crm_simulate.c
d49186
@@ -409,11 +409,14 @@ print_cluster_status(pe_working_set_t * data_set, unsigned int print_opts)
d49186
                       FALSE, FALSE, all, all, FALSE);
d49186
 
d49186
     if (options.show_attrs) {
d49186
-        out->message(out, "node-attribute-list", data_set,
d49186
-                     0, rc == pcmk_rc_ok, FALSE, FALSE, FALSE, all, all);
d49186
+        rc = out->message(out, "node-attribute-list", data_set,
d49186
+                          0, rc == pcmk_rc_ok, FALSE, FALSE, FALSE, all, all);
d49186
     }
d49186
 
d49186
     if (options.show_failcounts) {
d49186
+        rc = out->message(out, "node-summary", data_set, all, all,
d49186
+                          0, print_opts, FALSE, FALSE, FALSE, FALSE, rc == pcmk_rc_ok);
d49186
+
d49186
         out->message(out, "failed-action-list", data_set, all, all,
d49186
                      rc == pcmk_rc_ok);
d49186
     }
d49186
diff --git a/xml/api/crm_simulate-2.12.rng b/xml/api/crm_simulate-2.12.rng
d49186
index 9a7612d..f90bd36 100644
d49186
--- a/xml/api/crm_simulate-2.12.rng
d49186
+++ b/xml/api/crm_simulate-2.12.rng
d49186
@@ -67,6 +67,9 @@
d49186
                 <ref name="node-attributes-list" />
d49186
             </optional>
d49186
             <optional>
d49186
+                <externalRef href="node-history-2.12.rng" />
d49186
+            </optional>
d49186
+            <optional>
d49186
                 <ref name="failures-list" />
d49186
             </optional>
d49186
         </element>
d49186
-- 
d49186
1.8.3.1
d49186
d49186
d49186
From bac50336e0264604716e5997b87ee7e65311b982 Mon Sep 17 00:00:00 2001
d49186
From: Chris Lumens <clumens@redhat.com>
d49186
Date: Fri, 18 Jun 2021 15:21:52 -0400
d49186
Subject: [PATCH 5/5] Low: libcrmcommon: Increase PCMK__API_VERSION for new
d49186
 crm_resource output.
d49186
d49186
See: rhbz#1686426
d49186
---
d49186
 include/crm/common/output_internal.h | 2 +-
d49186
 1 file changed, 1 insertion(+), 1 deletion(-)
d49186
d49186
diff --git a/include/crm/common/output_internal.h b/include/crm/common/output_internal.h
d49186
index 0436cde..ba9c423 100644
d49186
--- a/include/crm/common/output_internal.h
d49186
+++ b/include/crm/common/output_internal.h
d49186
@@ -27,7 +27,7 @@ extern "C" {
d49186
 #  include <glib.h>
d49186
 #  include <crm/common/results.h>
d49186
 
d49186
-#  define PCMK__API_VERSION "2.11"
d49186
+#  define PCMK__API_VERSION "2.12"
d49186
 
d49186
 #if defined(PCMK__WITH_ATTRIBUTE_OUTPUT_ARGS)
d49186
 #  define PCMK__OUTPUT_ARGS(ARGS...) __attribute__((output_args(ARGS)))
d49186
-- 
d49186
1.8.3.1
d49186