Switch to tempest.common.utils.requires_ext

Tempest deprecated tempest.test.requires_ext [1]
At this moment, it is available in tempest.common.utils

[1] https://review.openstack.org/#/c/493668/

Change-Id: Iea8e7425a9a16b5e4789cc8e3e2bf9dd09f7d9d6
This commit is contained in:
Nguyen Hung Phuong 2018-01-10 17:17:04 +07:00 committed by Yushiro FURUKAWA
parent f32927857d
commit 778ddb1eee
4 changed files with 8 additions and 8 deletions

View File

@ -14,12 +14,12 @@
import six
from tempest.common import utils
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
from neutron_fwaas.tests.tempest_plugin.tests.api import base
@ -56,7 +56,7 @@ class FWaaSExtensionTestJSON(base.BaseFWaaSTest):
@classmethod
def resource_setup(cls):
super(FWaaSExtensionTestJSON, cls).resource_setup()
if not test.is_extension_enabled('fwaas', 'network'):
if not utils.is_extension_enabled('fwaas', 'network'):
msg = "FWaaS Extension not enabled."
raise cls.skipException(msg)

View File

@ -15,12 +15,12 @@
import netaddr
import six
from tempest.common import utils
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
from neutron_fwaas.common import fwaas_constants
from neutron_fwaas.tests.tempest_plugin.tests.api import v2_base
@ -58,7 +58,7 @@ class FWaaSv2ExtensionTestJSON(v2_base.BaseFWaaSTest):
@classmethod
def resource_setup(cls):
super(FWaaSv2ExtensionTestJSON, cls).resource_setup()
if not test.is_extension_enabled('fwaas_v2', 'network'):
if not utils.is_extension_enabled('fwaas_v2', 'network'):
msg = "FWaaS v2 Extension not enabled."
raise cls.skipException(msg)

View File

@ -15,9 +15,9 @@
import testscenarios
from tempest.common import utils
from tempest import config
from tempest.lib import decorators
from tempest import test
from neutron_fwaas.tests.tempest_plugin.tests.scenario import base
@ -42,7 +42,7 @@ class TestFWaaS(base.FWaaSScenarioTest):
if self.router_insertion:
required_exts.append('fwaasrouterinsertion')
for ext in required_exts:
if not test.is_extension_enabled(ext, 'network'):
if not utils.is_extension_enabled(ext, 'network'):
msg = "%s Extension not enabled." % ext
raise self.skipException(msg)
self._router_ids = None

View File

@ -17,11 +17,11 @@
import testscenarios
from oslo_log import log as logging
from tempest.common import utils
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
from neutron_fwaas.tests.tempest_plugin.tests.scenario import base
@ -46,7 +46,7 @@ class TestFWaaS_v2(base.FWaaSScenarioTest_V2):
# if self.router_insertion:
# required_exts.append('fwaasrouterinsertion')
for ext in required_exts:
if not test.is_extension_enabled(ext, 'network'):
if not utils.is_extension_enabled(ext, 'network'):
msg = "%s Extension not enabled." % ext
raise self.skipException(msg)
LOG.debug("FWaaSScenarioTest Setup done.")