cls.os is deprecated use cls.os_primary

Fixing a couple of cases left over from the patch where the
deprecation was introduced.

Change-Id: Ic1875708e0f6e8e9ff04b124d2443a7dfd08e972
This commit is contained in:
Andrea Frittoli 2017-05-24 10:44:46 +01:00
parent 0bb68d7128
commit cf999a83f0
1 changed files with 4 additions and 4 deletions

View File

@ -373,9 +373,9 @@ class BaseTestCase(testtools.testcase.WithAttributes,
@classmethod
def resource_setup(cls):
"""Class level resource setup for test cases."""
if hasattr(cls, "os"):
if hasattr(cls, "os_primary"):
cls.validation_resources = vresources.create_validation_resources(
cls.os, cls.validation_resources)
cls.os_primary, cls.validation_resources)
else:
LOG.warning("Client manager not found, validation resources not"
" created")
@ -388,8 +388,8 @@ class BaseTestCase(testtools.testcase.WithAttributes,
resources, in case a failure during `resource_setup` should happen.
"""
if cls.validation_resources:
if hasattr(cls, "os"):
vresources.clear_validation_resources(cls.os,
if hasattr(cls, "os_primary"):
vresources.clear_validation_resources(cls.os_primary,
cls.validation_resources)
cls.validation_resources = {}
else: