Merge "Enable tempest offline by use_custom_images=True"
[functest.git] / functest / opnfv_tests / openstack / vping / vping_base.py
index 8e71bf8..856d5f2 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright (c) 2015 All rights reserved
 # This program and the accompanying materials
@@ -13,7 +13,7 @@ import os
 import time
 import uuid
 
-from functest.core.testcase import TestCase
+from functest.core import testcase
 from functest.utils import functest_utils
 from functest.utils.constants import CONST
 
@@ -24,7 +24,7 @@ from snaps.openstack.tests import openstack_tests
 from snaps.openstack.utils import deploy_utils, nova_utils
 
 
-class VPingBase(TestCase):
+class VPingBase(testcase.OSGCTestCase):
 
     """
     Base class for vPing tests that check connectivity between two VMs shared
@@ -79,7 +79,7 @@ class VPingBase(TestCase):
 
         scenario = functest_utils.get_scenario()
 
-        self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_ANY
+        self.flavor_metadata = None
         if 'ovs' in scenario or 'fdio' in scenario:
             self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE
 
@@ -152,12 +152,12 @@ class VPingBase(TestCase):
         else:
             raise Exception('VMs never became active')
 
-        if result == TestCase.EX_RUN_ERROR:
-            return TestCase.EX_RUN_ERROR
+        if result == testcase.TestCase.EX_RUN_ERROR:
+            return testcase.TestCase.EX_RUN_ERROR
 
         self.stop_time = time.time()
         self.result = 100
-        return TestCase.EX_OK
+        return testcase.TestCase.EX_OK
 
     def _cleanup(self):
         """