Update tests to do not use deprecated test.services()
Function 'tempest.test.services()' has moved to 'tempest.common.utils.services()' in version 'Pike'. This commit update tests accordingly. Change-Id: I427a28e4483a7ac4733f3682f6983f974e60c849
This commit is contained in:
parent
26e9460889
commit
d45df6cedd
|
@ -14,11 +14,11 @@
|
|||
# under the License.
|
||||
|
||||
from tempest import clients
|
||||
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
|
||||
from tempest import test
|
||||
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
||||
|
@ -50,7 +50,7 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
self.os_admin.congress_client, 'glancev2')
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('image')
|
||||
@utils.services('image')
|
||||
def test_glancev2_images_table(self):
|
||||
image_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
@ -97,7 +97,7 @@ class TestGlanceV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('image')
|
||||
@utils.services('image')
|
||||
def test_glancev2_tags_table(self):
|
||||
def _check_data_table_glance_images():
|
||||
# Fetch data from glance each time, because this test may start
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
import random
|
||||
import string
|
||||
|
||||
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
|
||||
from tempest import test
|
||||
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
||||
|
@ -49,7 +49,7 @@ class TestMuranoDriver(manager_congress.ScenarioPolicyBase):
|
|||
self.os_admin.congress_client)
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('compute')
|
||||
@utils.services('compute')
|
||||
def test_murano_predeployment(self):
|
||||
|
||||
def _delete_policy_rules(policy_name):
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
import time
|
||||
|
||||
from tempest import clients
|
||||
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
|
||||
from tempest import test
|
||||
|
||||
from congress_tempest_tests.tests.scenario import helper
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
@ -57,7 +57,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
self.os_admin.congress_client, 'neutronv2')
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@utils.services('network')
|
||||
def test_neutronv2_networks_table(self):
|
||||
|
||||
@helper.retry_on_exception
|
||||
|
@ -90,7 +90,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@utils.services('network')
|
||||
def test_neutronv2_ports_tables(self):
|
||||
port_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
@ -167,7 +167,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@utils.services('network')
|
||||
def test_neutronv2_subnets_tables(self):
|
||||
subnet_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
@ -262,7 +262,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@utils.services('network')
|
||||
def test_neutronv2_routers_tables(self):
|
||||
router_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
@ -316,7 +316,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@utils.services('network')
|
||||
def test_neutronv2_security_groups_table(self):
|
||||
sg_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
@ -353,7 +353,7 @@ class TestNeutronV2Driver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@utils.services('network')
|
||||
def test_neutronv2_security_group_rules_table(self):
|
||||
sgrs_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
|
|
@ -20,7 +20,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 helper
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
@ -133,7 +132,7 @@ class TestNeutronV2QosDriver(manager_congress.ScenarioPolicyBase):
|
|||
return qos_rule
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('network')
|
||||
@tempest_utils.services('network')
|
||||
def test_neutronv2_ports_tables(self):
|
||||
port_schema = (
|
||||
self.os_admin.congress_client.show_datasource_table_schema(
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
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
|
||||
from tempest import test
|
||||
|
||||
from congress_tempest_tests.tests.scenario import helper
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
@ -49,7 +49,7 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
self.os_admin.congress_client, 'nova')
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_nova_datasource_driver_servers(self):
|
||||
self._setup_network_and_servers()
|
||||
|
||||
|
@ -105,7 +105,7 @@ class TestNovaDriver(manager_congress.ScenarioPolicyBase):
|
|||
"or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_nova_datasource_driver_flavors(self):
|
||||
|
||||
@helper.retry_on_exception
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
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
|
||||
from tempest import test
|
||||
|
||||
from congress_tempest_tests.tests.scenario import helper
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
@ -90,7 +90,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
|
|||
return instance
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_execution_action(self):
|
||||
metadata = {'testkey1': 'value3'}
|
||||
res = {'meta': {'testkey1': 'value3'}}
|
||||
|
@ -119,7 +119,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
|
|||
helper.retry_check_function_return_value(f, res)
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_policy_basic_op(self):
|
||||
self._setup_network_and_servers()
|
||||
body = {"rule": "port_security_group(id, security_group_name) "
|
||||
|
@ -161,7 +161,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
|
|||
"Data did not converge in time or failure in server")
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
@test.services('compute', 'network')
|
||||
@utils.services('compute', 'network')
|
||||
def test_reactive_enforcement(self):
|
||||
servers_client = self.os_admin.servers_client
|
||||
server_name = 'server_under_test'
|
||||
|
|
Loading…
Reference in New Issue