Merge "Remove deprecated patrole.enable_rbac configuration option"
This commit is contained in:
commit
f82dee3e42
|
@ -40,7 +40,6 @@ function install_patrole_tempest_plugin {
|
|||
iniset $TEMPEST_CONFIG policy-feature-enabled removed_nova_policies_stein False
|
||||
fi
|
||||
|
||||
iniset $TEMPEST_CONFIG patrole enable_rbac True
|
||||
iniset $TEMPEST_CONFIG patrole rbac_test_role $RBAC_TEST_ROLE
|
||||
}
|
||||
|
||||
|
|
|
@ -24,16 +24,6 @@ PatroleGroup = [
|
|||
default='admin',
|
||||
help="""The current RBAC role against which to run
|
||||
Patrole tests."""),
|
||||
cfg.BoolOpt('enable_rbac',
|
||||
default=True,
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason="""This is a legacy option that was
|
||||
meaningful when Patrole existed downstream as a suite of tests inside Tempest.
|
||||
Installing the Patrole plugin necessarily means that RBAC tests should be run.
|
||||
This option is paradoxical with the Tempest plugin architecture.
|
||||
""",
|
||||
deprecated_since='R',
|
||||
help="Enables Patrole RBAC tests."),
|
||||
cfg.ListOpt('custom_policy_files',
|
||||
default=['/etc/%s/policy.json'],
|
||||
help="""List of the paths to search for policy files. Each
|
||||
|
|
|
@ -18,7 +18,6 @@ import sys
|
|||
import time
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_log import versionutils
|
||||
from oslo_utils import excutils
|
||||
|
||||
from tempest import clients
|
||||
|
@ -243,18 +242,6 @@ class RbacUtilsMixin(object):
|
|||
"""
|
||||
return [cls.os_primary.auth_provider]
|
||||
|
||||
@classmethod
|
||||
def skip_rbac_checks(cls):
|
||||
if not CONF.patrole.enable_rbac:
|
||||
deprecation_msg = ("The `[patrole].enable_rbac` option is "
|
||||
"deprecated and will be removed in the S "
|
||||
"release. Patrole tests will always be enabled "
|
||||
"following installation of the Patrole Tempest "
|
||||
"plugin. Use a regex to skip tests")
|
||||
versionutils.report_deprecated_feature(LOG, deprecation_msg)
|
||||
raise cls.skipException(
|
||||
'Patrole testing not enabled so skipping %s.' % cls.__name__)
|
||||
|
||||
@classmethod
|
||||
def setup_rbac_utils(cls):
|
||||
cls.rbac_utils = RbacUtils(cls)
|
||||
|
|
|
@ -21,11 +21,6 @@ from patrole_tempest_plugin import rbac_utils
|
|||
class BaseV2ComputeRbacTest(rbac_utils.RbacUtilsMixin,
|
||||
compute_base.BaseV2ComputeTest):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseV2ComputeRbacTest, cls).skip_checks()
|
||||
cls.skip_rbac_checks()
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(BaseV2ComputeRbacTest, cls).setup_clients()
|
||||
|
|
|
@ -27,11 +27,6 @@ LOG = logging.getLogger(__name__)
|
|||
class BaseIdentityRbacTest(rbac_utils.RbacUtilsMixin,
|
||||
base.BaseIdentityTest):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseIdentityRbacTest, cls).skip_checks()
|
||||
cls.skip_rbac_checks()
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(BaseIdentityRbacTest, cls).setup_clients()
|
||||
|
|
|
@ -19,11 +19,6 @@ from patrole_tempest_plugin import rbac_utils
|
|||
class BaseV2ImageRbacTest(rbac_utils.RbacUtilsMixin,
|
||||
image_base.BaseV2ImageTest):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseV2ImageRbacTest, cls).skip_checks()
|
||||
cls.skip_rbac_checks()
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(BaseV2ImageRbacTest, cls).setup_clients()
|
||||
|
|
|
@ -21,11 +21,6 @@ from patrole_tempest_plugin import rbac_utils
|
|||
class BaseNetworkRbacTest(rbac_utils.RbacUtilsMixin,
|
||||
network_base.BaseNetworkTest):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseNetworkRbacTest, cls).skip_checks()
|
||||
cls.skip_rbac_checks()
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(BaseNetworkRbacTest, cls).setup_clients()
|
||||
|
|
|
@ -28,11 +28,6 @@ class BaseVolumeRbacTest(rbac_utils.RbacUtilsMixin,
|
|||
# subclasses if necessary.
|
||||
_api_version = 3
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseVolumeRbacTest, cls).skip_checks()
|
||||
cls.skip_rbac_checks()
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(BaseVolumeRbacTest, cls).setup_clients()
|
||||
|
|
|
@ -207,11 +207,6 @@ class RBACUtilsMixinTest(base.TestCase):
|
|||
|
||||
class FakeRbacTest(rbac_utils.RbacUtilsMixin, test.BaseTestCase):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(FakeRbacTest, cls).skip_checks()
|
||||
cls.skip_rbac_checks()
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(FakeRbacTest, cls).setup_clients()
|
||||
|
@ -237,21 +232,3 @@ class RBACUtilsMixinTest(base.TestCase):
|
|||
|
||||
self.assertTrue(hasattr(child_test, 'rbac_utils'))
|
||||
self.assertIsInstance(child_test.rbac_utils, rbac_utils.RbacUtils)
|
||||
|
||||
def test_skip_rbac_checks(self):
|
||||
"""Validate that the child class is skipped if `[patrole] enable_rbac`
|
||||
is False and that the child class's name is in the skip message.
|
||||
"""
|
||||
self.useFixture(patrole_fixtures.ConfPatcher(enable_rbac=False,
|
||||
group='patrole'))
|
||||
|
||||
class ChildRbacTest(self.parent_class):
|
||||
pass
|
||||
|
||||
child_test = ChildRbacTest()
|
||||
|
||||
with testtools.ExpectedException(
|
||||
testtools.TestCase.skipException,
|
||||
value_re=('Patrole testing not enabled so skipping %s.'
|
||||
% ChildRbacTest.__name__)):
|
||||
child_test.setUpClass()
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Remove deprecated ``[patrole].enable_rbac`` configuration option. To skip
|
||||
Patrole tests going forward, use an appropriate regex.
|
Loading…
Reference in New Issue