Replace deprecated tempest decorators

The function 'tempest.test.attr()' has been moved in Pike to
'tempest.lib.decorators.attr()' and will be removed in a future
version[1]. This patch replaces 'tempest.test.attr()' with
'tempest.lib.decorators.attr().'

[1] Iaafbb112b6eee458089cc49918359a8a8d0485e2

Change-Id: I2598c6ad24fe4df172db56b79f4aaa4a96a2d23e
This commit is contained in:
Hiroaki Kobayashi 2017-04-21 14:28:41 +09:00 committed by Masahito Muroi
parent 124ac0557a
commit 7b8d6765c5
2 changed files with 3 additions and 3 deletions

View File

@ -18,9 +18,9 @@ import time
from oslo_log import log as logging
from tempest.common import waiters
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest.scenario import resource_reservation_scenario as rrs
from tempest import test
CONF = config.CONF
@ -78,7 +78,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest):
raise exceptions.NotFound(err_msg)
return aggr
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_host_reservation(self):
def wait_until_aggregated(aggregate_name, host_name):

View File

@ -140,7 +140,7 @@ class TestInstanceReservationScenario(rrs.ResourceReservationScenarioTest):
# TODO(cmart): add blazar to services after pushing this code into tempest
@decorators.skip_because('Instance reservation is not supported yet.',
bug='1659200')
@test.attr(type='slow')
@decorators.attr(type='slow')
@test.services('compute', 'network')
def test_server_basic_resource_reservation_operation(self):
start_date = datetime.datetime.utcnow() + datetime.timedelta(minutes=1)