Fix deprecations

Update the code to reflect the deprecation of os_adm (replaced by
os_admin) and is_extension_enabled's move to tempest.common.utils.

Change-Id: Ic47f053a994d9ced276d61fbc920209fe51e2cc8
This commit is contained in:
Artom Lifshitz 2018-05-28 12:28:41 -04:00
parent 9ee2dd4529
commit 24967f89de
2 changed files with 5 additions and 5 deletions

View File

@ -19,9 +19,9 @@ import testtools
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
from tempest.api.compute import base from tempest.api.compute import base
from tempest.common import utils
from tempest.common import waiters from tempest.common import waiters
from tempest import config from tempest import config
from tempest import test
CONF = config.CONF CONF = config.CONF
@ -85,15 +85,15 @@ class CPUPolicyTest(base.BaseV2ComputeAdminTest):
@classmethod @classmethod
def skip_checks(cls): def skip_checks(cls):
super(CPUPolicyTest, cls).skip_checks() super(CPUPolicyTest, cls).skip_checks()
if not test.is_extension_enabled('OS-FLV-EXT-DATA', 'compute'): if not utils.is_extension_enabled('OS-FLV-EXT-DATA', 'compute'):
msg = "OS-FLV-EXT-DATA extension not enabled." msg = "OS-FLV-EXT-DATA extension not enabled."
raise cls.skipException(msg) raise cls.skipException(msg)
@classmethod @classmethod
def setup_clients(cls): def setup_clients(cls):
super(CPUPolicyTest, cls).setup_clients() super(CPUPolicyTest, cls).setup_clients()
cls.flavors_client = cls.os_adm.flavors_client cls.flavors_client = cls.os_admin.flavors_client
cls.servers_client = cls.os_adm.servers_client cls.servers_client = cls.os_admin.servers_client
@classmethod @classmethod
def resource_setup(cls): def resource_setup(cls):

View File

@ -81,7 +81,7 @@ class NUMAServersTest(base.BaseV2ComputeAdminTest):
@classmethod @classmethod
def setup_clients(cls): def setup_clients(cls):
super(NUMAServersTest, cls).setup_clients() super(NUMAServersTest, cls).setup_clients()
cls.flavors_client = cls.os_adm.flavors_client cls.flavors_client = cls.os_admin.flavors_client
cls.client = cls.servers_client cls.client = cls.servers_client
@classmethod @classmethod