diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-20 10:45:20 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-20 11:20:58 +0200 |
commit | 51f3e7a3cc4409fb9dda03bffa1252a8660f38b0 (patch) | |
tree | ec03a206710003bc15bf9f665eaf4e5d8cb07211 /functest/opnfv_tests/vnf/ims | |
parent | 5bd8c86c423e59c7a24b15b9855f9e04ba8500c5 (diff) |
Allow overriding the default role
It allows testing controllers which implements other RBAC policies.
Defining NEW_USER_ROLE=admin will easily raise side effects for
orchestrators such as Juju and Cloudify.
Change-Id: Ia78a25381aeb8aa81fd1872661629e1c08432b8f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/ims')
-rw-r--r-- | functest/opnfv_tests/vnf/ims/cloudify_ims.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py index 9786ff271..36862bd43 100644 --- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py +++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py @@ -24,6 +24,7 @@ import six from functest.core import cloudify from functest.opnfv_tests.vnf.ims import clearwater_ims_base from functest.utils import config +from functest.utils import env __author__ = "Valentin Boucher <valentin.boucher@orange.com>" @@ -90,6 +91,13 @@ class CloudifyIms(cloudify.Cloudify): self.image_alt = None self.flavor_alt = None + def check_requirements(self): + if env.get('NEW_USER_ROLE').lower() == "admin": + self.__logger.warn( + "Defining NEW_USER_ROLE=admin will easily break the testcase " + "because Cloudify doesn't manage tenancy (e.g. subnet " + "overlapping)") + def execute(self): assert super(CloudifyIms, self).execute() == 0 # pylint: disable=too-many-locals,too-many-statements |