Add config option to use system token in keystone tests

Keystone suports both system as well as project scoped
token. All OpenStack services except ironic use the project
scoped token to talk to keystone. By default, Tempest will
test the keystone using project scoped token but add a
config option if system scoped token needs to be used
for testing.

Change-Id: I88128d935ac4bc1775ab986155bdd6b7ef8ae7c4
Signed-off-by: Ghanshyam Maan <gmaan@ghanshyammann.com>
diff --git a/releasenotes/notes/add-keystone-system-token-config-1658eb05ed07e4da.yaml b/releasenotes/notes/add-keystone-system-token-config-1658eb05ed07e4da.yaml
new file mode 100644
index 0000000..2a752eb
--- /dev/null
+++ b/releasenotes/notes/add-keystone-system-token-config-1658eb05ed07e4da.yaml
@@ -0,0 +1,7 @@
+---
+features:
+  - |
+    Added a new config option in the `identity` section, `use_system_token`,
+    which will tell Tempest to use system scope token to test the
+    keystone APIs. By default is disabled which means Tempest will use project
+    scoped token.
diff --git a/tempest/config.py b/tempest/config.py
index fec7692..b81e13f 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -219,7 +219,13 @@
                     "identity-feature-enabled.security_compliance is set to "
                     "'True'. For more details, refer to keystone config "
                     "options "
-                    "keystone.conf:security_compliance.minimum_password_age.")
+                    "keystone.conf:security_compliance.minimum_password_age."),
+    cfg.BoolOpt('use_system_token',
+                default=False,
+                help="Keystone supports both system as well as project "
+                     "scoped token. This config option tells tempest to "
+                     "use the system scoped token for keystone identity "
+                     "tests.")
 ]
 
 service_clients_group = cfg.OptGroup(name='service-clients',