!59 update crm_mon schemas for tests

From: @xiangbudaomz 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2024-03-20 03:02:14 +00:00 committed by Gitee
commit 699773c2db
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 962 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.11.7
Release: 5
Release: 6
License: GPL-2.0-only AND Apache-2.0 AND MIT AND BSD-3-Clause AND (BSD-2-Clause OR Ruby) AND (BSD-2-Clause OR GPL-2.0-or-later)
URL: https://github.com/ClusterLabs/pcs
Group: System Environment/Base
@ -41,6 +41,7 @@ Patch1: Support-for-openEuler.patch
Patch2: fix-do-not-put-empty-uid-gid-options-to-an-uidgid-fi.patch
Patch3: fix-stonith-level-validation.patch
Patch4: Fix-pcsd-ruby.patch
Patch5: update-crm_mon-schemas-for-tests.patch
# ui patches: >200
# Patch201: bzNUMBER-01-name.patch
@ -402,6 +403,9 @@ run_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Tue Mar 19 2024 zouzhimin <zouzhimin@kylinos.cn> - 0.11.7-6
- update crm_mon schemas for tests
* Tue Mar 19 2024 panchenbo <panchenbo@kylinsec.com.cn> - 0.11.7-5
- fix setuptools_scm not found

View File

@ -0,0 +1,957 @@
From 2b7322113eec6a2d789d47d47049ae90c7a46625 Mon Sep 17 00:00:00 2001
From: Peter Romancik <promanci@redhat.com>
Date: Fri, 2 Feb 2024 10:50:11 +0100
Subject: [PATCH] update crm_mon schemas for tests
---
pcs_test/Makefile.am | 11 +-
pcs_test/resources/crm_mon.minimal.xml | 4 +-
.../resources/pcmk_api_rng/api-result.rng | 2 +-
.../resources/pcmk_api_rng/crm_mon-2.29.rng | 213 ++++++++++++
.../resources/pcmk_api_rng/crm_mon-2.4.rng | 311 ------------------
.../resources/pcmk_api_rng/failure-2.8.rng | 33 ++
...nce-event-2.0.rng => fence-event-2.15.rng} | 3 +
.../resources/pcmk_api_rng/node-attrs-2.8.rng | 24 ++
.../pcmk_api_rng/node-history-2.12.rng | 70 ++++
.../resources/pcmk_api_rng/nodes-2.29.rng | 54 +++
.../pcmk_api_rng/pacemakerd-health-2.25.rng | 20 ++
.../{resources-2.4.rng => resources-2.29.rng} | 45 ++-
12 files changed, 472 insertions(+), 318 deletions(-)
create mode 100644 pcs_test/resources/pcmk_api_rng/crm_mon-2.29.rng
delete mode 100644 pcs_test/resources/pcmk_api_rng/crm_mon-2.4.rng
create mode 100644 pcs_test/resources/pcmk_api_rng/failure-2.8.rng
rename pcs_test/resources/pcmk_api_rng/{fence-event-2.0.rng => fence-event-2.15.rng} (91%)
create mode 100644 pcs_test/resources/pcmk_api_rng/node-attrs-2.8.rng
create mode 100644 pcs_test/resources/pcmk_api_rng/node-history-2.12.rng
create mode 100644 pcs_test/resources/pcmk_api_rng/nodes-2.29.rng
create mode 100644 pcs_test/resources/pcmk_api_rng/pacemakerd-health-2.25.rng
rename pcs_test/resources/pcmk_api_rng/{resources-2.4.rng => resources-2.29.rng} (76%)
diff --git a/pcs_test/Makefile.am b/pcs_test/Makefile.am
index 94e4c07a..32ac5eee 100644
--- a/pcs_test/Makefile.am
+++ b/pcs_test/Makefile.am
@@ -35,10 +35,15 @@ EXTRA_DIST = \
resources/fenced_metadata.xml \
resources/schedulerd_metadata.xml \
resources/pcmk_api_rng/api-result.rng \
- resources/pcmk_api_rng/crm_mon-2.4.rng \
+ resources/pcmk_api_rng/crm_mon-2.29.rng \
resources/pcmk_api_rng/digests-2.9.rng \
- resources/pcmk_api_rng/fence-event-2.0.rng \
- resources/pcmk_api_rng/resources-2.4.rng \
+ resources/pcmk_api_rng/failure-2.8.rng \
+ resources/pcmk_api_rng/fence-event-2.15.rng \
+ resources/pcmk_api_rng/node-attrs-2.8.rng \
+ resources/pcmk_api_rng/node-history-2.12.rng \
+ resources/pcmk_api_rng/nodes-2.29.rng \
+ resources/pcmk_api_rng/pacemakerd-health-2.25.rng \
+ resources/pcmk_api_rng/resources-2.29.rng \
resources/pcmk_api_rng/status-2.0.rng \
resources/resource_agent_ocf_heartbeat_dummy_insane_action.xml \
resources/resource_agent_ocf_heartbeat_dummy_utf8.xml \
diff --git a/pcs_test/resources/crm_mon.minimal.xml b/pcs_test/resources/crm_mon.minimal.xml
index 2c3473c0..df02fe3e 100644
--- a/pcs_test/resources/crm_mon.minimal.xml
+++ b/pcs_test/resources/crm_mon.minimal.xml
@@ -1,4 +1,4 @@
-<pacemaker-result api-version="2.3" request="crm_mon --output-as xml">
+<pacemaker-result api-version="2.30" request="crm_mon --output-as xml">
<summary>
<stack type="corosync" />
<current_dc present="false" />
@@ -6,7 +6,7 @@
<last_change time="Wed Nov 6 10:42:54 2019" user="hacluster" client="crmd" origin="node1" />
<nodes_configured number="0" />
<resources_configured number="0" disabled="0" blocked="0" />
- <cluster_options stonith-enabled="true" symmetric-cluster="true" no-quorum-policy="stop" maintenance-mode="false" stop-all-resources="false" />
+ <cluster_options stonith-enabled="true" symmetric-cluster="true" no-quorum-policy="stop" maintenance-mode="false" stop-all-resources="false" stonith-timeout-ms="60000" priority-fencing-delay-ms="0"/>
</summary>
<nodes />
<resources />
diff --git a/pcs_test/resources/pcmk_api_rng/api-result.rng b/pcs_test/resources/pcmk_api_rng/api-result.rng
index fcd812ac..e01cfdcd 100644
--- a/pcs_test/resources/pcmk_api_rng/api-result.rng
+++ b/pcs_test/resources/pcmk_api_rng/api-result.rng
@@ -6,7 +6,7 @@
<attribute name="request"> <text /> </attribute>
<optional>
<choice>
- <externalRef href="crm_mon-2.4.rng"/>
+ <externalRef href="crm_mon-2.29.rng"/>
<externalRef href="digests-2.9.rng"/>
</choice>
</optional>
diff --git a/pcs_test/resources/pcmk_api_rng/crm_mon-2.29.rng b/pcs_test/resources/pcmk_api_rng/crm_mon-2.29.rng
new file mode 100644
index 00000000..9cc554cf
--- /dev/null
+++ b/pcs_test/resources/pcmk_api_rng/crm_mon-2.29.rng
@@ -0,0 +1,213 @@
+<?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-crm-mon"/>
+ </start>
+
+ <define name="element-crm-mon">
+ <choice>
+ <ref name="element-crm-mon-disconnected" />
+ <group>
+ <optional>
+ <externalRef href="pacemakerd-health-2.25.rng" />
+ </optional>
+ <optional>
+ <ref name="element-summary" />
+ </optional>
+ <optional>
+ <ref name="nodes-list" />
+ </optional>
+ <optional>
+ <ref name="resources-list" />
+ </optional>
+ <optional>
+ <ref name="node-attributes-list" />
+ </optional>
+ <optional>
+ <externalRef href="node-history-2.12.rng"/>
+ </optional>
+ <optional>
+ <ref name="failures-list" />
+ </optional>
+ <optional>
+ <ref name="fence-event-list" />
+ </optional>
+ <optional>
+ <ref name="tickets-list" />
+ </optional>
+ <optional>
+ <ref name="bans-list" />
+ </optional>
+ </group>
+ </choice>
+ </define>
+
+ <define name="element-crm-mon-disconnected">
+ <element name="crm-mon-disconnected">
+ <optional>
+ <attribute name="description"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="pacemakerd-state"> <text /> </attribute>
+ </optional>
+ </element>
+ </define>
+
+ <define name="element-summary">
+ <element name="summary">
+ <optional>
+ <element name="stack">
+ <attribute name="type"> <text /> </attribute>
+ <optional>
+ <attribute name="pacemakerd-state">
+ <text />
+ </attribute>
+ </optional>
+ </element>
+ </optional>
+ <optional>
+ <element name="current_dc">
+ <attribute name="present"> <data type="boolean" /> </attribute>
+ <optional>
+ <group>
+ <attribute name="version"> <text /> </attribute>
+ <attribute name="name"> <text /> </attribute>
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="with_quorum"> <data type="boolean" /> </attribute>
+ </group>
+ </optional>
+ <optional>
+ <attribute name="mixed_version"> <data type="boolean" /> </attribute>
+ </optional>
+ </element>
+ </optional>
+ <optional>
+ <element name="last_update">
+ <attribute name="time"> <text /> </attribute>
+ <optional>
+ <attribute name="origin"> <text /> </attribute>
+ </optional>
+ </element>
+ <element name="last_change">
+ <attribute name="time"> <text /> </attribute>
+ <attribute name="user"> <text /> </attribute>
+ <attribute name="client"> <text /> </attribute>
+ <attribute name="origin"> <text /> </attribute>
+ </element>
+ </optional>
+ <optional>
+ <element name="nodes_configured">
+ <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
+ </element>
+ <element name="resources_configured">
+ <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="disabled"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="blocked"> <data type="nonNegativeInteger" /> </attribute>
+ </element>
+ </optional>
+ <optional>
+ <element name="cluster_options">
+ <attribute name="stonith-enabled"> <data type="boolean" /> </attribute>
+ <attribute name="symmetric-cluster"> <data type="boolean" /> </attribute>
+ <attribute name="no-quorum-policy"> <text /> </attribute>
+ <attribute name="maintenance-mode"> <data type="boolean" /> </attribute>
+ <attribute name="stop-all-resources"> <data type="boolean" /> </attribute>
+ <attribute name="stonith-timeout-ms"> <data type="integer" /> </attribute>
+ <attribute name="priority-fencing-delay-ms"> <data type="integer" /> </attribute>
+ </element>
+ </optional>
+ </element>
+ </define>
+
+ <define name="resources-list">
+ <element name="resources">
+ <zeroOrMore>
+ <externalRef href="resources-2.29.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="nodes-list">
+ <element name="nodes">
+ <zeroOrMore>
+ <externalRef href="nodes-2.29.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="node-attributes-list">
+ <element name="node_attributes">
+ <zeroOrMore>
+ <externalRef href="node-attrs-2.8.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="failures-list">
+ <element name="failures">
+ <zeroOrMore>
+ <externalRef href="failure-2.8.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="fence-event-list">
+ <element name="fence_history">
+ <optional>
+ <attribute name="status"> <data type="integer" /> </attribute>
+ </optional>
+ <zeroOrMore>
+ <externalRef href="fence-event-2.15.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="tickets-list">
+ <element name="tickets">
+ <zeroOrMore>
+ <ref name="element-ticket" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="bans-list">
+ <element name="bans">
+ <zeroOrMore>
+ <ref name="element-ban" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-ticket">
+ <element name="ticket">
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="status">
+ <choice>
+ <value>granted</value>
+ <value>revoked</value>
+ </choice>
+ </attribute>
+ <attribute name="standby"> <data type="boolean" /> </attribute>
+ <optional>
+ <attribute name="last-granted"> <text /> </attribute>
+ </optional>
+ </element>
+ </define>
+
+ <define name="element-ban">
+ <element name="ban">
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="resource"> <text /> </attribute>
+ <attribute name="node"> <text /> </attribute>
+ <attribute name="weight"> <data type="integer" /> </attribute>
+ <attribute name="promoted-only"> <data type="boolean" /> </attribute>
+ <!-- DEPRECATED: master_only is a duplicate of promoted-only that is
+ provided solely for API backward compatibility. It will be
+ removed in a future release. Check promoted-only instead.
+ -->
+ <attribute name="master_only"> <data type="boolean" /> </attribute>
+ </element>
+ </define>
+</grammar>
diff --git a/pcs_test/resources/pcmk_api_rng/crm_mon-2.4.rng b/pcs_test/resources/pcmk_api_rng/crm_mon-2.4.rng
deleted file mode 100644
index 88973a4e..00000000
--- a/pcs_test/resources/pcmk_api_rng/crm_mon-2.4.rng
+++ /dev/null
@@ -1,311 +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-crm-mon"/>
- </start>
-
- <define name="element-crm-mon">
- <optional>
- <ref name="element-summary" />
- </optional>
- <optional>
- <ref name="nodes-list" />
- </optional>
- <optional>
- <ref name="resources-list" />
- </optional>
- <optional>
- <ref name="node-attributes-list" />
- </optional>
- <optional>
- <ref name="node-history-list" />
- </optional>
- <optional>
- <ref name="failures-list" />
- </optional>
- <optional>
- <ref name="fence-event-list" />
- </optional>
- <optional>
- <ref name="tickets-list" />
- </optional>
- <optional>
- <ref name="bans-list" />
- </optional>
- </define>
-
- <define name="element-summary">
- <element name="summary">
- <optional>
- <element name="stack">
- <attribute name="type"> <text /> </attribute>
- </element>
- </optional>
- <optional>
- <element name="current_dc">
- <attribute name="present"> <data type="boolean" /> </attribute>
- <optional>
- <group>
- <attribute name="version"> <text /> </attribute>
- <attribute name="name"> <text /> </attribute>
- <attribute name="id"> <text /> </attribute>
- <attribute name="with_quorum"> <data type="boolean" /> </attribute>
- </group>
- </optional>
- </element>
- </optional>
- <optional>
- <element name="last_update">
- <attribute name="time"> <text /> </attribute>
- </element>
- <element name="last_change">
- <attribute name="time"> <text /> </attribute>
- <attribute name="user"> <text /> </attribute>
- <attribute name="client"> <text /> </attribute>
- <attribute name="origin"> <text /> </attribute>
- </element>
- </optional>
- <optional>
- <element name="nodes_configured">
- <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
- </element>
- <element name="resources_configured">
- <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="disabled"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="blocked"> <data type="nonNegativeInteger" /> </attribute>
- </element>
- </optional>
- <optional>
- <element name="cluster_options">
- <attribute name="stonith-enabled"> <data type="boolean" /> </attribute>
- <attribute name="symmetric-cluster"> <data type="boolean" /> </attribute>
- <attribute name="no-quorum-policy"> <text /> </attribute>
- <attribute name="maintenance-mode"> <data type="boolean" /> </attribute>
- <attribute name="stop-all-resources"> <data type="boolean" /> </attribute>
- </element>
- </optional>
- </element>
- </define>
-
- <define name="resources-list">
- <element name="resources">
- <zeroOrMore>
- <externalRef href="resources-2.4.rng" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="nodes-list">
- <element name="nodes">
- <zeroOrMore>
- <ref name="element-full-node" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="node-attributes-list">
- <element name="node_attributes">
- <zeroOrMore>
- <ref name="element-node-with-attributes" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="node-history-list">
- <element name="node_history">
- <zeroOrMore>
- <ref name="element-node-history" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="failures-list">
- <element name="failures">
- <zeroOrMore>
- <ref name="element-failure" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="fence-event-list">
- <element name="fence_history">
- <optional>
- <attribute name="status"> <data type="integer" /> </attribute>
- </optional>
- <zeroOrMore>
- <externalRef href="fence-event-2.0.rng" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="tickets-list">
- <element name="tickets">
- <zeroOrMore>
- <ref name="element-ticket" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="bans-list">
- <element name="bans">
- <zeroOrMore>
- <ref name="element-ban" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="element-full-node">
- <element name="node">
- <attribute name="name"> <text/> </attribute>
- <attribute name="id"> <text/> </attribute>
- <attribute name="online"> <data type="boolean" /> </attribute>
- <attribute name="standby"> <data type="boolean" /> </attribute>
- <attribute name="standby_onfail"> <data type="boolean" /> </attribute>
- <attribute name="maintenance"> <data type="boolean" /> </attribute>
- <attribute name="pending"> <data type="boolean" /> </attribute>
- <attribute name="unclean"> <data type="boolean" /> </attribute>
- <attribute name="shutdown"> <data type="boolean" /> </attribute>
- <attribute name="expected_up"> <data type="boolean" /> </attribute>
- <attribute name="is_dc"> <data type="boolean" /> </attribute>
- <attribute name="resources_running"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="type">
- <choice>
- <value>unknown</value>
- <value>member</value>
- <value>remote</value>
- <value>ping</value>
- </choice>
- </attribute>
- <optional>
- <!-- for virtualized pacemaker_remote nodes, crm_mon 1.1.13 uses
- "container_id" while later versions use "id_as_resource" -->
- <choice>
- <attribute name="container_id"> <text/> </attribute>
- <attribute name="id_as_resource"> <text/> </attribute>
- </choice>
- </optional>
- <externalRef href="resources-2.4.rng" />
- </element>
- </define>
-
- <define name="element-node-with-attributes">
- <element name="node">
- <attribute name="name"> <text /> </attribute>
- <zeroOrMore>
- <element name="attribute">
- <attribute name="name"> <text /> </attribute>
- <attribute name="value"> <text /> </attribute>
- <optional>
- <attribute name="expected"> <data type="nonNegativeInteger" /> </attribute>
- </optional>
- </element>
- </zeroOrMore>
- </element>
- </define>
-
- <define name="element-node-history">
- <element name="node">
- <attribute name="name"> <text /> </attribute>
- <zeroOrMore>
- <ref name="element-resource-history" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="element-resource-history">
- <element name="resource_history">
- <attribute name="id"> <text /> </attribute>
- <attribute name="orphan"> <data type="boolean" /> </attribute>
- <optional>
- <group>
- <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
- <optional>
- <attribute name="fail-count"> <text /> </attribute>
- </optional>
- <optional>
- <attribute name="last-failure"> <text /> </attribute>
- </optional>
- </group>
- </optional>
- <zeroOrMore>
- <ref name="element-operation-history" />
- </zeroOrMore>
- </element>
- </define>
-
- <define name="element-operation-history">
- <element name="operation_history">
- <attribute name="call"> <text /> </attribute>
- <attribute name="task"> <text /> </attribute>
- <optional>
- <attribute name="interval"> <text /> </attribute>
- </optional>
- <optional>
- <attribute name="last-rc-change"> <text /> </attribute>
- </optional>
- <optional>
- <attribute name="last-run"> <text /> </attribute>
- </optional>
- <optional>
- <attribute name="exec-time"> <text /> </attribute>
- </optional>
- <optional>
- <attribute name="queue-time"> <text /> </attribute>
- </optional>
- <attribute name="rc"> <data type="integer" /> </attribute>
- <attribute name="rc_text"> <text /> </attribute>
- </element>
- </define>
-
- <define name="element-failure">
- <element name="failure">
- <choice>
- <attribute name="op_key"> <text/> </attribute>
- <attribute name="id"> <text/> </attribute>
- </choice>
- <attribute name="node"> <text /> </attribute>
- <attribute name="exitstatus"> <text /> </attribute>
- <attribute name="exitreason"> <text /> </attribute>
- <attribute name="exitcode"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="call"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="status"> <text /> </attribute>
- <optional>
- <group>
- <attribute name="last-rc-change"> <text /> </attribute>
- <attribute name="queued"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="exec"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="interval"> <data type="nonNegativeInteger" /> </attribute>
- <attribute name="task"> <text /> </attribute>
- </group>
- </optional>
- </element>
- </define>
-
- <define name="element-ticket">
- <element name="ticket">
- <attribute name="id"> <text /> </attribute>
- <attribute name="status">
- <choice>
- <value>granted</value>
- <value>revoked</value>
- </choice>
- </attribute>
- <attribute name="standby"> <data type="boolean" /> </attribute>
- <optional>
- <attribute name="last-granted"> <text /> </attribute>
- </optional>
- </element>
- </define>
-
- <define name="element-ban">
- <element name="ban">
- <attribute name="id"> <text /> </attribute>
- <attribute name="resource"> <text /> </attribute>
- <attribute name="node"> <text /> </attribute>
- <attribute name="weight"> <data type="integer" /> </attribute>
- <attribute name="master_only"> <data type="boolean" /> </attribute>
- </element>
- </define>
-</grammar>
diff --git a/pcs_test/resources/pcmk_api_rng/failure-2.8.rng b/pcs_test/resources/pcmk_api_rng/failure-2.8.rng
new file mode 100644
index 00000000..a36d2ea9
--- /dev/null
+++ b/pcs_test/resources/pcmk_api_rng/failure-2.8.rng
@@ -0,0 +1,33 @@
+<?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-failure"/>
+ </start>
+
+ <define name="element-failure">
+ <element name="failure">
+ <choice>
+ <attribute name="op_key"> <text/> </attribute>
+ <attribute name="id"> <text/> </attribute>
+ </choice>
+ <attribute name="node"> <text /> </attribute>
+ <attribute name="exitstatus"> <text /> </attribute>
+ <attribute name="exitreason"> <text /> </attribute>
+ <attribute name="exitcode"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="call"> <data type="integer" /> </attribute>
+ <attribute name="status"> <text /> </attribute>
+ <optional>
+ <group>
+ <attribute name="last-rc-change"> <text /> </attribute>
+ <attribute name="queued"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="exec"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="interval"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="task"> <text /> </attribute>
+ </group>
+ </optional>
+ </element>
+ </define>
+</grammar>
+
diff --git a/pcs_test/resources/pcmk_api_rng/fence-event-2.0.rng b/pcs_test/resources/pcmk_api_rng/fence-event-2.15.rng
similarity index 91%
rename from pcs_test/resources/pcmk_api_rng/fence-event-2.0.rng
rename to pcs_test/resources/pcmk_api_rng/fence-event-2.15.rng
index e54687cd..8e000caf 100644
--- a/pcs_test/resources/pcmk_api_rng/fence-event-2.0.rng
+++ b/pcs_test/resources/pcmk_api_rng/fence-event-2.15.rng
@@ -18,6 +18,9 @@
<optional>
<attribute name="extended-status"> <text /> </attribute>
</optional>
+ <optional>
+ <attribute name="exit-reason"> <text /> </attribute>
+ </optional>
<optional>
<attribute name="delegate"> <text /> </attribute>
</optional>
diff --git a/pcs_test/resources/pcmk_api_rng/node-attrs-2.8.rng b/pcs_test/resources/pcmk_api_rng/node-attrs-2.8.rng
new file mode 100644
index 00000000..754ddb9e
--- /dev/null
+++ b/pcs_test/resources/pcmk_api_rng/node-attrs-2.8.rng
@@ -0,0 +1,24 @@
+<?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-node-with-attributes"/>
+ </start>
+
+ <define name="element-node-with-attributes">
+ <element name="node">
+ <attribute name="name"> <text /> </attribute>
+ <zeroOrMore>
+ <element name="attribute">
+ <attribute name="name"> <text /> </attribute>
+ <attribute name="value"> <text /> </attribute>
+ <optional>
+ <attribute name="expected"> <data type="integer" /> </attribute>
+ </optional>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+</grammar>
diff --git a/pcs_test/resources/pcmk_api_rng/node-history-2.12.rng b/pcs_test/resources/pcmk_api_rng/node-history-2.12.rng
new file mode 100644
index 00000000..9628000e
--- /dev/null
+++ b/pcs_test/resources/pcmk_api_rng/node-history-2.12.rng
@@ -0,0 +1,70 @@
+<?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="node-history-list" />
+ </start>
+
+ <define name="node-history-list">
+ <element name="node_history">
+ <zeroOrMore>
+ <ref name="element-node-history" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-node-history">
+ <element name="node">
+ <attribute name="name"> <text /> </attribute>
+ <zeroOrMore>
+ <ref name="element-resource-history" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-resource-history">
+ <element name="resource_history">
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="orphan"> <data type="boolean" /> </attribute>
+ <optional>
+ <group>
+ <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
+ <optional>
+ <attribute name="fail-count"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="last-failure"> <text /> </attribute>
+ </optional>
+ </group>
+ </optional>
+ <zeroOrMore>
+ <ref name="element-operation-history" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-operation-history">
+ <element name="operation_history">
+ <attribute name="call"> <text /> </attribute>
+ <attribute name="task"> <text /> </attribute>
+ <optional>
+ <attribute name="interval"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="last-rc-change"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="last-run"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="exec-time"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="queue-time"> <text /> </attribute>
+ </optional>
+ <attribute name="rc"> <data type="integer" /> </attribute>
+ <attribute name="rc_text"> <text /> </attribute>
+ </element>
+ </define>
+</grammar>
diff --git a/pcs_test/resources/pcmk_api_rng/nodes-2.29.rng b/pcs_test/resources/pcmk_api_rng/nodes-2.29.rng
new file mode 100644
index 00000000..7dd17989
--- /dev/null
+++ b/pcs_test/resources/pcmk_api_rng/nodes-2.29.rng
@@ -0,0 +1,54 @@
+<?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-full-node"/>
+ </start>
+
+ <define name="element-full-node">
+ <element name="node">
+ <attribute name="name"> <text/> </attribute>
+ <attribute name="id"> <text/> </attribute>
+ <attribute name="online"> <data type="boolean" /> </attribute>
+ <attribute name="standby"> <data type="boolean" /> </attribute>
+ <attribute name="standby_onfail"> <data type="boolean" /> </attribute>
+ <attribute name="maintenance"> <data type="boolean" /> </attribute>
+ <attribute name="pending"> <data type="boolean" /> </attribute>
+ <attribute name="unclean"> <data type="boolean" /> </attribute>
+ <optional>
+ <attribute name="health">
+ <choice>
+ <value>red</value>
+ <value>yellow</value>
+ <value>green</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="feature_set"> <text/> </attribute>
+ </optional>
+ <attribute name="shutdown"> <data type="boolean" /> </attribute>
+ <attribute name="expected_up"> <data type="boolean" /> </attribute>
+ <attribute name="is_dc"> <data type="boolean" /> </attribute>
+ <attribute name="resources_running"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="type">
+ <choice>
+ <value>unknown</value>
+ <value>member</value>
+ <value>remote</value>
+ <value>ping</value>
+ </choice>
+ </attribute>
+ <optional>
+ <!-- for virtualized pacemaker_remote nodes, crm_mon 1.1.13 uses
+ "container_id" while later versions use "id_as_resource" -->
+ <choice>
+ <attribute name="container_id"> <text/> </attribute>
+ <attribute name="id_as_resource"> <text/> </attribute>
+ </choice>
+ </optional>
+ <externalRef href="resources-2.29.rng" />
+ </element>
+ </define>
+</grammar>
diff --git a/pcs_test/resources/pcmk_api_rng/pacemakerd-health-2.25.rng b/pcs_test/resources/pcmk_api_rng/pacemakerd-health-2.25.rng
new file mode 100644
index 00000000..2089b25f
--- /dev/null
+++ b/pcs_test/resources/pcmk_api_rng/pacemakerd-health-2.25.rng
@@ -0,0 +1,20 @@
+<?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-pacemakerd-health"/>
+ </start>
+
+ <define name="element-pacemakerd-health">
+ <element name="pacemakerd">
+ <optional>
+ <attribute name="sys_from"> <text /> </attribute>
+ </optional>
+ <attribute name="state"> <text /> </attribute>
+ <optional>
+ <attribute name="last_updated"> <text /> </attribute>
+ </optional>
+ </element>
+ </define>
+</grammar>
diff --git a/pcs_test/resources/pcmk_api_rng/resources-2.4.rng b/pcs_test/resources/pcmk_api_rng/resources-2.29.rng
similarity index 76%
rename from pcs_test/resources/pcmk_api_rng/resources-2.4.rng
rename to pcs_test/resources/pcmk_api_rng/resources-2.29.rng
index e2795836..f4214a7c 100644
--- a/pcs_test/resources/pcmk_api_rng/resources-2.4.rng
+++ b/pcs_test/resources/pcmk_api_rng/resources-2.29.rng
@@ -35,6 +35,16 @@
</attribute>
<attribute name="image"> <text/> </attribute>
<attribute name="unique"> <data type="boolean" /> </attribute>
+ <optional>
+ <attribute name="maintenance">
+ <data type="boolean" />
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="description">
+ <text/>
+ </attribute>
+ </optional>
<attribute name="managed"> <data type="boolean" /> </attribute>
<attribute name="failed"> <data type="boolean" /> </attribute>
<zeroOrMore>
@@ -53,6 +63,16 @@
<attribute name="id"> <text/> </attribute>
<attribute name="multi_state"> <data type="boolean" /> </attribute>
<attribute name="unique"> <data type="boolean" /> </attribute>
+ <optional>
+ <attribute name="maintenance">
+ <data type="boolean" />
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="description">
+ <text/>
+ </attribute>
+ </optional>
<attribute name="managed"> <data type="boolean" /> </attribute>
<attribute name="disabled"> <data type="boolean" /> </attribute>
<attribute name="failed"> <data type="boolean" /> </attribute>
@@ -68,6 +88,16 @@
<element name="group">
<attribute name="id"> <text/> </attribute>
<attribute name="number_resources"> <data type="nonNegativeInteger" /> </attribute>
+ <optional>
+ <attribute name="maintenance">
+ <data type="boolean" />
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="description">
+ <text/>
+ </attribute>
+ </optional>
<attribute name="managed"> <data type="boolean" /> </attribute>
<attribute name="disabled"> <data type="boolean" /> </attribute>
<ref name="element-resource-list" />
@@ -87,13 +117,26 @@
<optional>
<attribute name="blocked"> <data type="boolean" /> </attribute>
</optional>
- <attribute name="managed"> <data type="boolean" /> </attribute>
+ <optional>
+ <attribute name="maintenance">
+ <data type="boolean" />
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="description">
+ <text/>
+ </attribute>
+ </optional>
<attribute name="failed"> <data type="boolean" /> </attribute>
+ <attribute name="managed"> <data type="boolean" /> </attribute>
<attribute name="failure_ignored"> <data type="boolean" /> </attribute>
<attribute name="nodes_running_on"> <data type="nonNegativeInteger" /> </attribute>
<optional>
<attribute name="pending"> <text/> </attribute>
</optional>
+ <optional>
+ <attribute name="locked_to"> <text/> </attribute>
+ </optional>
<zeroOrMore>
<element name="node">
<attribute name="name"> <text/> </attribute>
--
2.25.1