Remove deprecated attrs usage in tempest plugin

Closes-Bug:#1689479
Change-Id: I94c92d4498f2259a0ac4e32d21cc553d045788d9
This commit is contained in:
Anusha Ramineni 2017-05-09 12:01:45 +05:30
parent 5abfb65abe
commit 16d583ae0f
14 changed files with 45 additions and 42 deletions

View File

@ -16,8 +16,8 @@
from tempest import clients
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -46,7 +46,7 @@ class TestKeystoneV2Driver(manager_congress.ScenarioPolicyBase):
cls.datasource_id = manager_congress.get_datasource_id(
cls.admin_manager.congress_client, 'keystone')
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_keystone_users_table(self):
user_schema = (
self.admin_manager.congress_client.show_datasource_table_schema(
@ -89,7 +89,7 @@ class TestKeystoneV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_keystone_roles_table(self):
role_schema = (
self.admin_manager.congress_client.show_datasource_table_schema(
@ -125,7 +125,7 @@ class TestKeystoneV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_keystone_tenants_table(self):
tenant_schema = (
self.admin_manager.congress_client.show_datasource_table_schema(
@ -161,7 +161,7 @@ class TestKeystoneV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('keystone'),

View File

@ -15,8 +15,8 @@
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -40,7 +40,7 @@ class TestAodhDriver(manager_congress.ScenarioPolicyBase):
cls.datasource_id = manager_congress.get_datasource_id(
cls.admin_manager.congress_client, 'aodh')
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_aodh_alarms_table(self):
# Add test alarm
rule = {'meter_name': 'cpu_util',
@ -97,7 +97,7 @@ class TestAodhDriver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('aodh'),

View File

@ -15,8 +15,8 @@
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -40,7 +40,7 @@ class TestCeilometerDriver(manager_congress.ScenarioPolicyBase):
cls.datasource_id = manager_congress.get_datasource_id(
cls.admin_manager.congress_client, 'ceilometer')
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_ceilometer_meters_table(self):
meter_schema = (
self.admin_manager.congress_client.show_datasource_table_schema(
@ -76,7 +76,7 @@ class TestCeilometerDriver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('ceilometer'),

View File

@ -17,8 +17,8 @@ from oslo_log import log as logging
from tempest import clients
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -53,7 +53,7 @@ class TestCinderDriver(manager_congress.ScenarioPolicyBase):
consistencygroup_id=None, metadata={})
LOG.debug('result of creating new volume: %s', res)
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_cinder_volumes_table(self):
volume_schema = (
self.admin_manager.congress_client.show_datasource_table_schema(
@ -106,7 +106,7 @@ class TestCinderDriver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('cinder'),

View File

@ -13,8 +13,8 @@
# under the License.
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import helper
from congress_tempest_tests.tests.scenario import manager_congress
@ -40,7 +40,7 @@ class TestDoctorDriver(manager_congress.ScenarioPolicyBase):
def _list_datasource_rows(self, datasource, table):
return self.client.list_datasource_rows(datasource, table)
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_doctor_event_tables(self):
rows = [
{

View File

@ -16,6 +16,7 @@
from tempest import clients
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -47,7 +48,7 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
cls.datasource_id = manager_congress.get_datasource_id(
cls.admin_manager.congress_client, 'glancev2')
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('image')
def test_glancev2_images_table(self):
image_schema = (
@ -94,7 +95,7 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('image')
def test_glancev2_tags_table(self):
def _check_data_table_glance_images():
@ -125,7 +126,7 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('glancev2'),

View File

@ -15,8 +15,8 @@
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -36,7 +36,7 @@ class TestHeatDriver(manager_congress.ScenarioPolicyBase):
# TODO(testing): checks on correctness of data in updates
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('heat'),

View File

@ -15,8 +15,8 @@
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -36,7 +36,7 @@ class TestIronicDriver(manager_congress.ScenarioPolicyBase):
# TODO(testing): checks on correctness of data in updates
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('ironic'),

View File

@ -16,6 +16,7 @@ import string
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -47,7 +48,7 @@ class TestMuranoDriver(manager_congress.ScenarioPolicyBase):
self.congress_client = (
self.admin_manager.congress_client)
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('compute')
def test_murano_predeployment(self):
@ -198,7 +199,7 @@ class TestMuranoDriver(manager_congress.ScenarioPolicyBase):
result = _simulate_policy(policy_name, sim_query2)
self.assertEqual('predeploy_error("env_uuid")', result[0])
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('murano'),

View File

@ -17,6 +17,7 @@ import time
from tempest import clients
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -54,7 +55,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
cls.datasource_id = manager_congress.get_datasource_id(
cls.admin_manager.congress_client, 'neutronv2')
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('network')
def test_neutronv2_networks_table(self):
@ -87,7 +88,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('network')
def test_neutronv2_ports_tables(self):
port_schema = (
@ -164,7 +165,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('network')
def test_neutronv2_subnets_tables(self):
subnet_schema = (
@ -259,7 +260,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('network')
def test_neutronv2_routers_tables(self):
router_schema = (
@ -313,7 +314,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('network')
def test_neutronv2_security_groups_table(self):
sg_schema = (
@ -350,7 +351,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('network')
def test_neutronv2_security_group_rules_table(self):
sgrs_schema = (
@ -388,7 +389,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('neutronv2'),

View File

@ -15,6 +15,7 @@
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -47,7 +48,7 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
self.datasource_id = manager_congress.get_datasource_id(
self.admin_manager.congress_client, 'nova')
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('compute', 'network')
def test_nova_datasource_driver_servers(self):
self._setup_network_and_servers()
@ -103,7 +104,7 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('compute', 'network')
def test_nova_datasource_driver_flavors(self):
@ -142,7 +143,7 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
raise exceptions.TimeoutException("Data did not converge in time "
"or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('nova'),

View File

@ -17,7 +17,6 @@ from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from congress_tempest_tests.tests.scenario import manager_congress
@ -39,7 +38,7 @@ class TestSwiftDriver(manager_congress.ScenarioPolicyBase):
# swift driver experiences auth error in test
@decorators.skip_because(bug="980688")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_update_no_error(self):
if not test_utils.call_until_true(
func=lambda: self.check_datasource_no_error('swift'),

View File

@ -25,7 +25,6 @@ from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import manager as tempestmanager
from tempest import test
from urllib3 import exceptions as urllib3_exceptions
from congress_tempest_tests.services.policy import policy_client
@ -205,7 +204,7 @@ class TestHA(manager_congress.ScenarioPolicyBase):
return ret['id']
@decorators.skip_because(bug="1689220")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_datasource_db_sync_add_remove(self):
# Verify that a replica adds a datasource when a datasource
# appears in the database.

View File

@ -16,6 +16,7 @@
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -88,7 +89,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
**create_kwargs)
return instance
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('compute', 'network')
def test_execution_action(self):
metadata = {'testkey1': 'value3'}
@ -117,7 +118,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
False, body)
helper.retry_check_function_return_value(f, res)
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('compute', 'network')
def test_policy_basic_op(self):
self._setup_network_and_servers()
@ -159,7 +160,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
self.assertTrue(check_data(),
"Data did not converge in time or failure in server")
@test.attr(type='smoke')
@decorators.attr(type='smoke')
@test.services('compute', 'network')
def test_reactive_enforcement(self):
servers_client = self.admin_manager.servers_client