Add new config option for nova policy available defaults

Nova adds the new default manager role in their policies
and we need to control the test testing the new default
for current release and old defaults for stable releases.

Adding a new config option which will tell tempest if the
new defaults is present in testing env.

[1] https://review.opendev.org/c/openstack/nova/+/941347

Needed-by: https://review.opendev.org/c/openstack/devstack/+/954167

Change-Id: Ia6c735aaf03ea29e86df7d24125b96ce428d6ad7
Signed-off-by: Ghanshyam Mann <gmaan@ghanshyammann.com>
diff --git a/releasenotes/notes/add-config-nova-policy-roles-37fc4ef511f97f50.yaml b/releasenotes/notes/add-config-nova-policy-roles-37fc4ef511f97f50.yaml
new file mode 100644
index 0000000..f357b00
--- /dev/null
+++ b/releasenotes/notes/add-config-nova-policy-roles-37fc4ef511f97f50.yaml
@@ -0,0 +1,7 @@
+---
+features:
+  - |
+    A new config option ``nova_policy_roles`` is added in the
+    ``compute-feature-enabled`` section. This can be used to
+    configure the available roles that are used as default in
+    nova policy rules.
diff --git a/tempest/config.py b/tempest/config.py
index 9c288ff..5e5890b 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -627,6 +627,14 @@
     cfg.BoolOpt('unified_limits',
                 default=False,
                 help='Does the test environment support unified limits?'),
+    cfg.ListOpt('nova_policy_roles',
+                default=['admin', 'member', 'reader'],
+                help='Compute service API policies roles list. List all the '
+                     'roles which are used as default in Nova policy rules. '
+                     'This config option value is used to run the tests with '
+                     'the available roles in Nova. For example, if manager '
+                     'role is not present in the nova release then tempest '
+                     'will use old defaults role token to call nova APIs'),
 ]