diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-28 09:55:27 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-28 09:55:27 +0100 |
commit | d30a79ce464a596a29cb1385b88dd00ac42a2c61 (patch) | |
tree | 7209b9dd6e16be8cd2f2b1637e0e6a0e0f0ace35 /xtesting/core | |
parent | 2aab5c48df64b044ab9bae6e883e6e0acaabbf52 (diff) |
Remove all OpenStack operations in vnf.py
Change-Id: I356305f3c59b51f97f5fb1335369834a77fda9b1
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/core')
-rw-r--r-- | xtesting/core/vnf.py | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/xtesting/core/vnf.py b/xtesting/core/vnf.py index 95ebde04..8aab2337 100644 --- a/xtesting/core/vnf.py +++ b/xtesting/core/vnf.py @@ -13,14 +13,7 @@ import logging import time import uuid -from snaps.config.user import UserConfig -from snaps.config.project import ProjectConfig -from snaps.openstack.create_user import OpenStackUser -from snaps.openstack.create_project import OpenStackProject -from snaps.openstack.tests import openstack_tests - from xtesting.core import testcase -from xtesting.utils import constants __author__ = ("Morgan Richomme <morgan.richomme@orange.com>, " "Valentin Boucher <valentin.boucher@orange.com>") @@ -97,43 +90,12 @@ class VnfOnBoarding(testcase.TestCase): """ Prepare the environment for VNF testing: - * Creation of a user, - * Creation of a tenant, - * Allocation admin role to the user on this tenant - Returns base.TestCase.EX_OK if preparation is successfull Raise VnfPreparationException in case of problem """ - try: - self.__logger.info( - "Prepare VNF: %s, description: %s", self.case_name, - self.tenant_description) - snaps_creds = openstack_tests.get_credentials( - os_env_file=constants.ENV_FILE) - - self.os_project = OpenStackProject( - snaps_creds, - ProjectConfig( - name=self.tenant_name, - description=self.tenant_description - )) - self.os_project.create() - self.created_object.append(self.os_project) - user_creator = OpenStackUser( - snaps_creds, - UserConfig( - name=self.user_name, - password=str(uuid.uuid4()), - roles={'admin': self.tenant_name})) - user_creator.create() - self.created_object.append(user_creator) - self.snaps_creds = user_creator.get_os_creds(self.tenant_name) - - return testcase.TestCase.EX_OK - except Exception: # pylint: disable=broad-except - self.__logger.exception("Exception raised during VNF preparation") - raise VnfPreparationException + self.__logger.exception("VNF must be prepared") + raise VnfPreparationException def deploy_orchestrator(self): """ |