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

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