Add enforce_scope config option for Manila
Add config option to enbale the scoped token.
This option allows running Manila rbac tests.
Change-Id: Ief906f23ac5d898f993fc3c0909ff7d58c25a57a
diff --git a/manila_tempest_tests/config.py b/manila_tempest_tests/config.py
index 6f9813c..92cf7ba 100644
--- a/manila_tempest_tests/config.py
+++ b/manila_tempest_tests/config.py
@@ -21,6 +21,15 @@
help="Whether or not manila is expected to be "
"available")
+manila_scope_enforcement = cfg.BoolOpt('manila',
+ default=False,
+ help="Does the Share service API "
+ "policies enforce scope? "
+ "This configuration value should "
+ "be same as manila.conf: "
+ "[oslo_policy].enforce_scope "
+ "option.")
+
share_group = cfg.OptGroup(name="share", title="Share Service Options")
ShareGroup = [
diff --git a/manila_tempest_tests/plugin.py b/manila_tempest_tests/plugin.py
index 0c32ce1..148a368 100644
--- a/manila_tempest_tests/plugin.py
+++ b/manila_tempest_tests/plugin.py
@@ -33,6 +33,8 @@
def register_opts(self, conf):
conf.register_opt(config_share.service_option,
group='service_available')
+ conf.register_opt(config_share.manila_scope_enforcement,
+ group='enforce_scope')
conf.register_group(config_share.share_group)
conf.register_opts(config_share.ShareGroup, group='share')
@@ -54,7 +56,8 @@
def get_opt_lists(self):
return [(config_share.share_group.name, config_share.ShareGroup),
- ('service_available', [config_share.service_option])]
+ ('service_available', [config_share.service_option]),
+ ('enforce_scope', [config_share.manila_scope_enforcement])]
def get_service_clients(self):
shares_config = config.service_client_config('share')