aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vping/vping_ssh.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-01 15:20:10 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-02 09:31:43 +0100
commit5cb9051a0418815636a1d5df66940e168c4e0a56 (patch)
tree04e2c7a4361f36b324fb8a11ccaa448b229ba68c /functest/opnfv_tests/openstack/vping/vping_ssh.py
parent67363022f2139fea4049743bc00b32cf8e5f453e (diff)
Leverage on Xtesting
It removes all the files which have moved to Xtesting. Vnf inheritances and env management will be improved in other changes. It keeps the same tree thanks to a symlink to allow publishing artifacts. Change-Id: I551bbd3f344cdab0158a50b7b09e541576695631 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/vping/vping_ssh.py')
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_ssh.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py
index e6c6bf351..19d47f57f 100644
--- a/functest/opnfv_tests/openstack/vping/vping_ssh.py
+++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py
@@ -14,19 +14,19 @@ import time
from scp import SCPClient
import pkg_resources
-from functest.core.testcase import TestCase
-from functest.energy import energy
-from functest.opnfv_tests.openstack.vping import vping_base
-from functest.utils import config
-
from snaps.config.keypair import KeypairConfig
from snaps.config.network import PortConfig
from snaps.config.security_group import (
Direction, Protocol, SecurityGroupConfig, SecurityGroupRuleConfig)
from snaps.config.vm_inst import FloatingIpConfig, VmInstanceConfig
-
from snaps.openstack.utils import deploy_utils
+from xtesting.core import testcase
+from xtesting.energy import energy
+
+from functest.opnfv_tests.openstack.vping import vping_base
+from functest.utils import config
+
class VPingSSH(vping_base.VPingBase):
"""
@@ -122,7 +122,7 @@ class VPingSSH(vping_base.VPingBase):
return self._execute()
except Exception as exc: # pylint: disable=broad-except
self.logger.error('Unexpected error running test - ' + exc.message)
- return TestCase.EX_RUN_ERROR
+ return testcase.TestCase.EX_RUN_ERROR
finally:
self._cleanup()
@@ -135,10 +135,10 @@ class VPingSSH(vping_base.VPingBase):
if vm_creator.vm_ssh_active(block=True):
ssh = vm_creator.ssh_client()
if not self._transfer_ping_script(ssh):
- return TestCase.EX_RUN_ERROR
+ return testcase.TestCase.EX_RUN_ERROR
return self._do_vping_ssh(ssh, test_ip)
else:
- return TestCase.EX_RUN_ERROR
+ return testcase.TestCase.EX_RUN_ERROR
def _transfer_ping_script(self, ssh):
"""
@@ -175,7 +175,7 @@ class VPingSSH(vping_base.VPingBase):
:param test_ip: the IP for the ping command to use
:return: exit_code (int)
"""
- exit_code = TestCase.EX_TESTCASE_FAILED
+ exit_code = testcase.TestCase.EX_TESTCASE_FAILED
self.logger.info("Waiting for ping...")
sec = 0
@@ -190,7 +190,7 @@ class VPingSSH(vping_base.VPingBase):
for line in output:
if "vPing OK" in line:
self.logger.info("vPing detected!")
- exit_code = TestCase.EX_OK
+ exit_code = testcase.TestCase.EX_OK
flag = True
break