Blame SOURCES/001-acl-group-schema.patch

97a979
From f5ffbaf1f537d3d5b00e594211cd322f97df51ac Mon Sep 17 00:00:00 2001
97a979
From: Grace Chin <gchin@redhat.com>
97a979
Date: Fri, 5 Nov 2021 11:39:39 -0400
97a979
Subject: [PATCH 1/3] Low: xml: clone acls schema in preparation for changes
97a979
97a979
---
97a979
 xml/acls-3.8.rng | 80 ++++++++++++++++++++++++++++++++++++++++++++++++
97a979
 1 file changed, 80 insertions(+)
97a979
 create mode 100644 xml/acls-3.8.rng
97a979
97a979
diff --git a/xml/acls-3.8.rng b/xml/acls-3.8.rng
97a979
new file mode 100644
97a979
index 000000000..0fe6eed96
97a979
--- /dev/null
97a979
+++ b/xml/acls-3.8.rng
97a979
@@ -0,0 +1,80 @@
97a979
+
97a979
+
97a979
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
97a979
+  <start>
97a979
+    <optional>
97a979
+      <ref name="element-acls"/>
97a979
+    </optional>
97a979
+  </start>
97a979
+
97a979
+  <define name="element-acls">
97a979
+    <element name="acls">
97a979
+      <zeroOrMore>
97a979
+        <choice>
97a979
+          <element name="acl_target">
97a979
+            <attribute name="id"><text/></attribute>
97a979
+            <zeroOrMore>
97a979
+              <element name="role">
97a979
+                <attribute name="id"><data type="IDREF"/></attribute>
97a979
+              </element>
97a979
+            </zeroOrMore>
97a979
+          </element>
97a979
+          <element name="acl_group">
97a979
+            
97a979
+            <attribute name="id"><data type="ID"/></attribute>
97a979
+            <zeroOrMore>
97a979
+              <element name="role">
97a979
+                <attribute name="id"><data type="IDREF"/></attribute>
97a979
+              </element>
97a979
+            </zeroOrMore>
97a979
+          </element>
97a979
+          <element name="acl_role">
97a979
+            <attribute name="id"><data type="ID"/></attribute>
97a979
+            <optional>
97a979
+              <attribute name="description"><text/></attribute>
97a979
+            </optional>
97a979
+            <zeroOrMore>
97a979
+              <ref name="element-permission"/>
97a979
+            </zeroOrMore>
97a979
+          </element>
97a979
+        </choice>
97a979
+      </zeroOrMore>
97a979
+    </element>
97a979
+  </define>
97a979
+
97a979
+  <define name="element-permission">
97a979
+    <element name="acl_permission">
97a979
+      <attribute name="id"><data type="ID"/></attribute>
97a979
+
97a979
+      <attribute name="kind">
97a979
+        <choice>
97a979
+          <value>read</value>
97a979
+          <value>write</value>
97a979
+          <value>deny</value>
97a979
+        </choice>
97a979
+      </attribute>
97a979
+
97a979
+      <choice>
97a979
+        <attribute name="xpath"><text/></attribute>
97a979
+         
97a979
+        <attribute name="reference"><data type="IDREF"/></attribute>
97a979
+        <group>
97a979
+          
97a979
+          <attribute name="object-type"><text/></attribute>
97a979
+          <optional>
97a979
+            
97a979
+                 does not make sense with anything other than object-type
97a979
+                 xpath and reference are already sufficiently specific
97a979
+            -->
97a979
+            <attribute name="attribute"><text/></attribute>
97a979
+          </optional>
97a979
+        </group>
97a979
+      </choice>
97a979
+
97a979
+      <optional>
97a979
+        <attribute name="description"><text/></attribute>
97a979
+      </optional>
97a979
+    </element>
97a979
+  </define>
97a979
+
97a979
+</grammar>
97a979
-- 
97a979
2.27.0
97a979
97a979
97a979
From 7838213fc639236bdedf5f15320152d973f1bdad Mon Sep 17 00:00:00 2001
97a979
From: Grace Chin <gchin@redhat.com>
97a979
Date: Fri, 5 Nov 2021 11:40:48 -0400
97a979
Subject: [PATCH 2/3] Add a 'name' attribute to acl_target and acl_group
97a979
 elements
97a979
97a979
---
97a979
 xml/acls-3.8.rng | 6 ++++++
97a979
 1 file changed, 6 insertions(+)
97a979
97a979
diff --git a/xml/acls-3.8.rng b/xml/acls-3.8.rng
97a979
index 0fe6eed96..48bcdffe3 100644
97a979
--- a/xml/acls-3.8.rng
97a979
+++ b/xml/acls-3.8.rng
97a979
@@ -13,6 +13,9 @@
97a979
         <choice>
97a979
           <element name="acl_target">
97a979
             <attribute name="id"><text/></attribute>
97a979
+            <optional>
97a979
+              <attribute name="name"><text/></attribute>
97a979
+            </optional>
97a979
             <zeroOrMore>
97a979
               <element name="role">
97a979
                 <attribute name="id"><data type="IDREF"/></attribute>
97a979
@@ -22,6 +25,9 @@
97a979
           <element name="acl_group">
97a979
             
97a979
             <attribute name="id"><data type="ID"/></attribute>
97a979
+            <optional>
97a979
+              <attribute name="name"><text/></attribute>
97a979
+            </optional>
97a979
             <zeroOrMore>
97a979
               <element name="role">
97a979
                 <attribute name="id"><data type="IDREF"/></attribute>
97a979
-- 
97a979
2.27.0
97a979
97a979
97a979
From c3c498f4636f57e29670f8e385b625024ed222d7 Mon Sep 17 00:00:00 2001
97a979
From: Grace Chin <gchin@redhat.com>
97a979
Date: Fri, 5 Nov 2021 11:42:48 -0400
97a979
Subject: [PATCH 3/3] Changes made by run of 'cts/cts-cli -s'
97a979
97a979
---
97a979
 cts/cli/regression.upgrade.exp  |  7 +++++--
97a979
 cts/cli/regression.validity.exp | 22 ++++++++++++++++++----
97a979
 2 files changed, 23 insertions(+), 6 deletions(-)
97a979
97a979
diff --git a/cts/cli/regression.upgrade.exp b/cts/cli/regression.upgrade.exp
97a979
index e38adebdd..7ce7ec13b 100644
97a979
--- a/cts/cli/regression.upgrade.exp
97a979
+++ b/cts/cli/regression.upgrade.exp
97a979
@@ -91,8 +91,11 @@ update_validation 	debug: Configuration valid for schema: pacemaker-3.6
97a979
 update_validation 	debug: pacemaker-3.6-style configuration is also valid for pacemaker-3.7
97a979
 update_validation 	debug: Testing 'pacemaker-3.7' validation (21 of X)
97a979
 update_validation 	debug: Configuration valid for schema: pacemaker-3.7
97a979
-update_validation 	trace: Stopping at pacemaker-3.7
97a979
-update_validation 	info: Transformed the configuration from pacemaker-2.10 to pacemaker-3.7
97a979
+update_validation 	debug: pacemaker-3.7-style configuration is also valid for pacemaker-3.8
97a979
+update_validation 	debug: Testing 'pacemaker-3.8' validation (22 of X)
97a979
+update_validation 	debug: Configuration valid for schema: pacemaker-3.8
97a979
+update_validation 	trace: Stopping at pacemaker-3.8
97a979
+update_validation 	info: Transformed the configuration from pacemaker-2.10 to pacemaker-3.8
97a979
 =#=#=#= Current cib after: Upgrade to latest CIB schema (trigger 2.10.xsl + the wrapping) =#=#=#=
97a979
 <cib epoch="2" num_updates="0" admin_epoch="1">
97a979
   <configuration>
97a979
diff --git a/cts/cli/regression.validity.exp b/cts/cli/regression.validity.exp
97a979
index 5ace430e7..125035a47 100644
97a979
--- a/cts/cli/regression.validity.exp
97a979
+++ b/cts/cli/regression.validity.exp
97a979
@@ -121,7 +121,11 @@ update_validation 	debug: Testing 'pacemaker-3.7' validation (21 of X)
97a979
 element rsc_order: Relax-NG validity error : Invalid attribute first-action for element rsc_order
97a979
 element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
 update_validation 	trace: pacemaker-3.7 validation failed
97a979
-Cannot upgrade configuration (claiming schema pacemaker-1.2) to at least pacemaker-3.0 because it does not validate with any schema from pacemaker-1.2 to pacemaker-3.7
97a979
+update_validation 	debug: Testing 'pacemaker-3.8' validation (22 of X)
97a979
+element rsc_order: Relax-NG validity error : Invalid attribute first-action for element rsc_order
97a979
+element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
+update_validation 	trace: pacemaker-3.8 validation failed
97a979
+Cannot upgrade configuration (claiming schema pacemaker-1.2) to at least pacemaker-3.0 because it does not validate with any schema from pacemaker-1.2 to pacemaker-3.8
97a979
 =#=#=#= End test: Run crm_simulate with invalid CIB (enum violation) - Invalid configuration (78) =#=#=#=
97a979
 * Passed: crm_simulate   - Run crm_simulate with invalid CIB (enum violation)
97a979
 =#=#=#= Begin test: Try to make resulting CIB invalid (unrecognized validate-with) =#=#=#=
97a979
@@ -226,7 +230,10 @@ update_validation 	trace: pacemaker-3.6 validation failed
97a979
 update_validation 	debug: Testing 'pacemaker-3.7' validation (21 of X)
97a979
 element cib: Relax-NG validity error : Invalid attribute validate-with for element cib
97a979
 update_validation 	trace: pacemaker-3.7 validation failed
97a979
-Cannot upgrade configuration (claiming schema pacemaker-9999.0) to at least pacemaker-3.0 because it does not validate with any schema from unknown to pacemaker-3.7
97a979
+update_validation 	debug: Testing 'pacemaker-3.8' validation (22 of X)
97a979
+element cib: Relax-NG validity error : Invalid attribute validate-with for element cib
97a979
+update_validation 	trace: pacemaker-3.8 validation failed
97a979
+Cannot upgrade configuration (claiming schema pacemaker-9999.0) to at least pacemaker-3.0 because it does not validate with any schema from unknown to pacemaker-3.8
97a979
 =#=#=#= End test: Run crm_simulate with invalid CIB (unrecognized validate-with) - Invalid configuration (78) =#=#=#=
97a979
 * Passed: crm_simulate   - Run crm_simulate with invalid CIB (unrecognized validate-with)
97a979
 =#=#=#= Begin test: Try to make resulting CIB invalid, but possibly recoverable (valid with X.Y+1) =#=#=#=
97a979
@@ -326,8 +333,11 @@ update_validation 	debug: Configuration valid for schema: pacemaker-3.6
97a979
 update_validation 	debug: pacemaker-3.6-style configuration is also valid for pacemaker-3.7
97a979
 update_validation 	debug: Testing 'pacemaker-3.7' validation (21 of X)
97a979
 update_validation 	debug: Configuration valid for schema: pacemaker-3.7
97a979
-update_validation 	trace: Stopping at pacemaker-3.7
97a979
-update_validation 	info: Transformed the configuration from pacemaker-1.2 to pacemaker-3.7
97a979
+update_validation 	debug: pacemaker-3.7-style configuration is also valid for pacemaker-3.8
97a979
+update_validation 	debug: Testing 'pacemaker-3.8' validation (22 of X)
97a979
+update_validation 	debug: Configuration valid for schema: pacemaker-3.8
97a979
+update_validation 	trace: Stopping at pacemaker-3.8
97a979
+update_validation 	info: Transformed the configuration from pacemaker-1.2 to pacemaker-3.8
97a979
 unpack_resources 	error: Resource start-up disabled since no STONITH resources have been defined
97a979
 unpack_resources 	error: Either configure some or disable STONITH with the stonith-enabled option
97a979
 unpack_resources 	error: NOTE: Clusters with shared data need STONITH to ensure data integrity
97a979
@@ -437,6 +447,8 @@ element rsc_order: Relax-NG validity error : Invalid attribute first-action for
97a979
 element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
 element rsc_order: Relax-NG validity error : Invalid attribute first-action for element rsc_order
97a979
 element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
+element rsc_order: Relax-NG validity error : Invalid attribute first-action for element rsc_order
97a979
+element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
 =#=#=#= Current cib after: Make resulting CIB invalid, and without validate-with attribute =#=#=#=
97a979
 <cib epoch="41" num_updates="0" admin_epoch="0" validate-with="none">
97a979
   <configuration>
97a979
@@ -502,6 +514,8 @@ validity.bad.xml:10: element rsc_order: Relax-NG validity error : Invalid attrib
97a979
 validity.bad.xml:10: element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
 validity.bad.xml:10: element rsc_order: Relax-NG validity error : Invalid attribute first-action for element rsc_order
97a979
 validity.bad.xml:10: element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
+validity.bad.xml:10: element rsc_order: Relax-NG validity error : Invalid attribute first-action for element rsc_order
97a979
+validity.bad.xml:10: element rsc_order: Relax-NG validity error : Element constraints has extra content: rsc_order
97a979
 unpack_resources 	error: Resource start-up disabled since no STONITH resources have been defined
97a979
 unpack_resources 	error: Either configure some or disable STONITH with the stonith-enabled option
97a979
 unpack_resources 	error: NOTE: Clusters with shared data need STONITH to ensure data integrity
97a979
-- 
97a979
2.27.0
97a979