[Fix gate]: Cinder policy change handling in tests

Cinder policies are made more granular and now we need
to adjust the patrole tests to handle those changed policies.

This commit introduces a new flag so that we test the old
policies in stable branches and new one in Xena onwards.

Change-Id: I4be60e3e92704f8e55d3acdb0e025078ae5b21f1
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 10c44c0..9ccc4d7 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -84,6 +84,9 @@
        # TODO(gmann): Remove these once stable/victoria becomes EOL.
        # These policies were removed in Wallaby.
        iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_wallaby False
+
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
     fi
 
     if [[ ${DEVSTACK_SERIES} == 'rocky' ]]; then
@@ -106,6 +109,9 @@
        # TODO(gmann): Remove these once stable/victoria becomes EOL.
        # These policies were removed in Wallaby.
        iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_wallaby False
+
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
     fi
 
     if [[ ${DEVSTACK_SERIES} == 'stein' ]]; then
@@ -123,6 +129,8 @@
        # TODO(gmann): Remove these once stable/victoria becomes EOL.
        # These policies were removed in Wallaby.
        iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_wallaby False
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
     fi
 
     if [[ ${DEVSTACK_SERIES} == 'train' ]]; then
@@ -132,6 +140,8 @@
        # TODO(gmann): Remove these once stable/victoria becomes EOL.
        # These policies were removed in Wallaby.
        iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_wallaby False
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
     fi
 
     if [[ ${DEVSTACK_SERIES} == 'ussuri' ]]; then
@@ -140,14 +150,21 @@
        # TODO(gmann): Remove these once stable/victoria becomes EOL.
        # These policies were removed in Wallaby.
        iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_wallaby False
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
     fi
 
     if [[ ${DEVSTACK_SERIES} == 'victoria' ]]; then
        # TODO(gmann): Remove these once stable/victoria becomes EOL.
        # These policies were removed in Wallaby.
        iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_wallaby False
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
     fi
-
+    if [[ ${DEVSTACK_SERIES} == 'wallaby' ]]; then
+       # TODO(gmann): Remove these once stable/xena becomes EOL.
+       iniset $TEMPEST_CONFIG policy-feature-enabled changed_cinder_policies_xena False
+    fi
     iniset $TEMPEST_CONFIG patrole rbac_test_roles $RBAC_TEST_ROLES
 }