summaryrefslogtreecommitdiff
path: root/tempest/api/orchestration/base.py
diff options
context:
space:
mode:
authorAndrea Frittoli <andrea.frittoli@hp.com>2015-02-06 20:12:38 +0000
committerAndrea Frittoli <andrea.frittoli@hp.com>2015-04-27 15:23:13 +0100
commitb21de6ce451272dfbc418d1aa2bfc6bb46d510ef (patch)
treea6788e0f85df74973adf4c45ed024bebd3b73eba /tempest/api/orchestration/base.py
parent7f63f7d3835a5d6fb468a4759ca31ecc4cb105cc (diff)
downloadtempest-b21de6ce451272dfbc418d1aa2bfc6bb46d510ef.tar.gz
Initial class creds creation in test base class
Each test class may now define at class level which credentials are needed, and they will be allocated automatically by the base class. To start using this a test class that requires network resources must implement the setup_credentials method and define the required resources before super is invoked. In this patch this only affects the creation of credentials as defined in the various base classes. Other tests will be migrated as part of the resource-cleanup bp. Note that this changes baremetal, identity and orchestration tests to honour the tenant isolation settings. Partially-implements: bp resource-cleanup Change-Id: Id36a6ebddb618a78cee7025c9537cd1e2746190e
Diffstat (limited to 'tempest/api/orchestration/base.py')
-rw-r--r--tempest/api/orchestration/base.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index d4b107e7a..beb4ac8eb 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -18,7 +18,6 @@ from tempest_lib import exceptions as lib_exc
import yaml
from tempest import clients
-from tempest.common import credentials
from tempest import config
import tempest.test
@@ -30,6 +29,8 @@ LOG = logging.getLogger(__name__)
class BaseOrchestrationTest(tempest.test.BaseTestCase):
"""Base test case class for all Orchestration API tests."""
+ credentials = ['primary']
+
@classmethod
def skip_checks(cls):
super(BaseOrchestrationTest, cls).skip_checks()
@@ -39,10 +40,6 @@ class BaseOrchestrationTest(tempest.test.BaseTestCase):
@classmethod
def setup_credentials(cls):
super(BaseOrchestrationTest, cls).setup_credentials()
- if (not hasattr(cls, 'isolated_creds') or
- not cls.isolated_creds.name == cls.__name__):
- cls.isolated_creds = credentials.get_isolated_credentials(
- name=cls.__name__, network_resources=cls.network_resources)
stack_owner_role = CONF.orchestration.stack_owner_role
if not cls.isolated_creds.is_role_available(stack_owner_role):
skip_msg = ("%s skipped because the configured credential provider"