diff --git a/releasenotes/notes/api_v2_admin_flag-dea5ca9bc2ce63bc.yaml b/releasenotes/notes/api_v2_admin_flag-dea5ca9bc2ce63bc.yaml new file mode 100644 index 0000000000..0c33b69ac9 --- /dev/null +++ b/releasenotes/notes/api_v2_admin_flag-dea5ca9bc2ce63bc.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + A new configuration flag api_v2_admin is introduced in the identity + feature flag group to allow for enabling/disabling all identity v2 + admin tests. The new flag only applies when the existing api_v2 flag + is set to True diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py index 06cc1202cc..365c0d431d 100644 --- a/tempest/api/identity/base.py +++ b/tempest/api/identity/base.py @@ -126,6 +126,12 @@ class BaseIdentityV2AdminTest(BaseIdentityV2Test): # executed, so this will not impact the ability to execute tests. force_tenant_isolation = True + @classmethod + def skip_checks(cls): + super(BaseIdentityV2AdminTest, cls).skip_checks() + if not CONF.identity_feature_enabled.api_v2_admin: + raise cls.skipException('Identity v2 admin not available') + @classmethod def setup_clients(cls): super(BaseIdentityV2AdminTest, cls).setup_clients() diff --git a/tempest/config.py b/tempest/config.py index 00c69b0141..75fa1bb90e 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -208,6 +208,10 @@ IdentityFeatureGroup = [ cfg.BoolOpt('api_v2', default=True, help='Is the v2 identity API enabled'), + cfg.BoolOpt('api_v2_admin', + default=True, + help="Is the v2 identity admin API available? This setting " + "only applies if api_v2 is set to True."), cfg.BoolOpt('api_v3', default=True, help='Is the v3 identity API enabled'),