Merge "Neutron service client should not trim API response"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 4a43282..1095e77 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -77,9 +77,6 @@
# Enables or disables publication of error events. (boolean value)
#publish_errors = false
-# Enables or disables fatal status of deprecations. (boolean value)
-#fatal_deprecations = false
-
# The format for an instance that is passed with the log message.
# (string value)
#instance_format = "[instance: %(uuid)s] "
@@ -91,6 +88,15 @@
# Enables or disables fatal status of deprecations. (boolean value)
#fatal_deprecations = false
+#
+# From tempest.config
+#
+
+# Prefix to be added when generating the name for test resources. It
+# can be used to discover all resources associated with a specific
+# test run when running tempest on a real-life cloud (string value)
+#resources_prefix = tempest
+
[auth]
@@ -284,18 +290,10 @@
# (integer value)
#ping_count = 1
-# Timeout in seconds to wait for authentication to succeed. (integer
-# value)
-#ssh_timeout = 300
-
# Additional wait time for clean state, when there is no OS-EXT-STS
# extension available (integer value)
#ready_wait = 0
-# Timeout in seconds to wait for output from ssh channel. (integer
-# value)
-#ssh_channel_timeout = 60
-
# Name of the fixed network that is visible to all test tenants. If
# multiple networks are available for a tenant this is the network
# which will be used for creating servers if tempest does not create a
@@ -307,9 +305,6 @@
# use_floatingip_for_ssh=true or run_validation=false. (string value)
#network_for_ssh = public
-# IP version used for SSH connections. (integer value)
-#ip_version_for_ssh = 4
-
# Does SSH use Floating IPs? (boolean value)
#use_floatingip_for_ssh = true
@@ -431,6 +426,12 @@
# value)
#preserve_ports = false
+# Does the test environment support attaching an encrypted volume to a
+# running server instance? This may depend on the combination of
+# compute_driver in nova and the volume_driver(s) in cinder. (boolean
+# value)
+#attach_encrypted_volume = true
+
[dashboard]
@@ -801,7 +802,8 @@
# A list of enabled network extensions with a special entry all which
# indicates every extension is enabled. Empty list indicates all
-# extensions are disabled (list value)
+# extensions are disabled. To get the list of extensions run: 'neutron
+# ext-list' (list value)
#api_extensions = all
# Allow the execution of IPv6 subnet tests that use the extended IPv6
@@ -1115,6 +1117,7 @@
#auth_method = keypair
# Default IP version for ssh connections. (integer value)
+# Deprecated group/name - [compute]/ip_version_for_ssh
#ip_version_for_ssh = 4
# Timeout in seconds to wait for ping to succeed. (integer value)
@@ -1122,9 +1125,11 @@
# Timeout in seconds to wait for the TCP connection to be successful.
# (integer value)
+# Deprecated group/name - [compute]/ssh_channel_timeout
#connect_timeout = 60
# Timeout in seconds to wait for the ssh banner. (integer value)
+# Deprecated group/name - [compute]/ssh_timeout
#ssh_timeout = 300
diff --git a/requirements.txt b/requirements.txt
index 1d512a0..66e5b16 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,6 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr<2.0,>=0.11
+cliff>=1.13.0 # Apache-2.0
anyjson>=0.3.3
httplib2>=0.7.5
jsonschema!=2.5.0,<3.0.0,>=2.0.0
@@ -11,7 +12,7 @@
netaddr>=0.7.12
testrepository>=0.0.18
pyOpenSSL>=0.11
-oslo.concurrency>=2.0.0 # Apache-2.0
+oslo.concurrency>=2.1.0 # Apache-2.0
oslo.config>=1.11.0 # Apache-2.0
oslo.i18n>=1.5.0 # Apache-2.0
oslo.log>=1.2.0 # Apache-2.0
@@ -19,7 +20,8 @@
oslo.utils>=1.6.0 # Apache-2.0
six>=1.9.0
iso8601>=0.1.9
-fixtures>=0.3.14
+fixtures>=1.3.1
testscenarios>=0.4
-tempest-lib>=0.5.0
+tempest-lib>=0.6.1
PyYAML>=3.1.0
+stevedore>=1.5.0 # Apache-2.0
diff --git a/setup.cfg b/setup.cfg
index 3a14bba..5c78632 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,6 +25,7 @@
run-tempest-stress = tempest.cmd.run_stress:main
tempest-cleanup = tempest.cmd.cleanup:main
tempest-account-generator = tempest.cmd.account_generator:main
+ tempest = tempest.cmd.main:main
oslo.config.opts =
tempest.config = tempest.config:list_opts
diff --git a/tempest/api/baremetal/admin/base.py b/tempest/api/baremetal/admin/base.py
index 0b5d7d9..d7d2efe 100644
--- a/tempest/api/baremetal/admin/base.py
+++ b/tempest/api/baremetal/admin/base.py
@@ -12,9 +12,9 @@
import functools
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/baremetal/admin/test_chassis.py b/tempest/api/baremetal/admin/test_chassis.py
index 5ad05cc..29fc64c 100644
--- a/tempest/api/baremetal/admin/test_chassis.py
+++ b/tempest/api/baremetal/admin/test_chassis.py
@@ -12,10 +12,10 @@
# under the License.
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.baremetal.admin import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/baremetal/admin/test_nodes.py b/tempest/api/baremetal/admin/test_nodes.py
index 6b963c7..4830dcd 100644
--- a/tempest/api/baremetal/admin/test_nodes.py
+++ b/tempest/api/baremetal/admin/test_nodes.py
@@ -11,10 +11,10 @@
# under the License.
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.baremetal.admin import base
+from tempest.common.utils import data_utils
from tempest.common import waiters
from tempest import test
diff --git a/tempest/api/baremetal/admin/test_ports.py b/tempest/api/baremetal/admin/test_ports.py
index ece4471..5eaf641 100644
--- a/tempest/api/baremetal/admin/test_ports.py
+++ b/tempest/api/baremetal/admin/test_ports.py
@@ -11,11 +11,11 @@
# under the License.
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
from tempest.api.baremetal.admin import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/baremetal/admin/test_ports_negative.py b/tempest/api/baremetal/admin/test_ports_negative.py
index 3d80ee4..610758a 100644
--- a/tempest/api/baremetal/admin/test_ports_negative.py
+++ b/tempest/api/baremetal/admin/test_ports_negative.py
@@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.baremetal.admin import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py
index c9a73c7..1aa1615 100644
--- a/tempest/api/compute/admin/test_agents.py
+++ b/tempest/api/compute/admin/test_agents.py
@@ -13,10 +13,10 @@
# under the License.
from oslo_log import log
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
LOG = log.getLogger(__name__)
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 35a6479..91e55d6 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
from tempest.common import tempest_fixtures as fixtures
+from tempest.common.utils import data_utils
from tempest import test
@@ -211,5 +211,5 @@
server = self.create_test_server(name=server_name,
availability_zone=az_name,
wait_until='ACTIVE')
- body = admin_servers_client.get_server(server['id'])
+ body = admin_servers_client.show_server(server['id'])
self.assertEqual(self.host, body[self._host_key])
diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py
index 6942fdb..74a8547 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
from tempest.common import tempest_fixtures as fixtures
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index a65fda6..dc9a7ef 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -38,7 +38,7 @@
def resource_setup(cls):
super(FixedIPsTestJson, cls).resource_setup()
server = cls.create_test_server(wait_until='ACTIVE')
- server = cls.servers_client.get_server(server['id'])
+ server = cls.servers_client.show_server(server['id'])
for ip_set in server['addresses']:
for ip in server['addresses'][ip_set]:
if ip['OS-EXT-IPS:type'] == 'fixed':
diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py
index 35c719d..6698638 100644
--- a/tempest/api/compute/admin/test_fixed_ips_negative.py
+++ b/tempest/api/compute/admin/test_fixed_ips_negative.py
@@ -40,7 +40,7 @@
def resource_setup(cls):
super(FixedIPsNegativeTestJson, cls).resource_setup()
server = cls.create_test_server(wait_until='ACTIVE')
- server = cls.servers_client.get_server(server['id'])
+ server = cls.servers_client.show_server(server['id'])
for ip_set in server['addresses']:
for ip in server['addresses'][ip_set]:
if ip['OS-EXT-IPS:type'] == 'fixed':
diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index d4b8311..364d080 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_flavors_access.py b/tempest/api/compute/admin/test_flavors_access.py
index 4c743dc..2baa53e 100644
--- a/tempest/api/compute/admin/test_flavors_access.py
+++ b/tempest/api/compute/admin/test_flavors_access.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_flavors_access_negative.py b/tempest/api/compute/admin/test_flavors_access_negative.py
index be5e6cc..e5ae23b 100644
--- a/tempest/api/compute/admin/test_flavors_access_negative.py
+++ b/tempest/api/compute/admin/test_flavors_access_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_flavors_extra_specs.py b/tempest/api/compute/admin/test_flavors_extra_specs.py
index a14a61f..6866c1a 100644
--- a/tempest/api/compute/admin/test_flavors_extra_specs.py
+++ b/tempest/api/compute/admin/test_flavors_extra_specs.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py
index ba05c7f..8c5a103 100644
--- a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py
+++ b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py
@@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_hosts_negative.py b/tempest/api/compute/admin/test_hosts_negative.py
index 930d686..b2d2a04 100644
--- a/tempest/api/compute/admin/test_hosts_negative.py
+++ b/tempest/api/compute/admin/test_hosts_negative.py
@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py
index a5c2f0d..701b4bb 100644
--- a/tempest/api/compute/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/admin/test_hypervisor_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log.py b/tempest/api/compute/admin/test_instance_usage_audit_log.py
index 9da7901..189c316 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log.py
@@ -44,7 +44,7 @@
def test_get_instance_usage_audit_log(self):
# Get instance usage audit log before specified time
now = datetime.datetime.now()
- body = self.adm_client.get_instance_usage_audit_log(
+ body = self.adm_client.show_instance_usage_audit_log(
urllib.quote(now.strftime("%Y-%m-%d %H:%M:%S")))
expected_items = ['total_errors', 'total_instances', 'log',
diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
index 97d665b..eea3103 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
@@ -39,12 +39,12 @@
now = datetime.datetime.now()
self.assertRaises(lib_exc.Forbidden,
self.instance_usages_audit_log_client.
- get_instance_usage_audit_log,
+ show_instance_usage_audit_log,
urllib.quote(now.strftime("%Y-%m-%d %H:%M:%S")))
@test.attr(type=['negative'])
@test.idempotent_id('9b952047-3641-41c7-ba91-a809fc5974c8')
def test_get_instance_usage_audit_logs_with_invalid_time(self):
self.assertRaises(lib_exc.BadRequest,
- self.adm_client.get_instance_usage_audit_log,
+ self.adm_client.show_instance_usage_audit_log,
"invalid_time")
diff --git a/tempest/api/compute/admin/test_live_migration.py b/tempest/api/compute/admin/test_live_migration.py
index a03439a..548cd4f 100644
--- a/tempest/api/compute/admin/test_live_migration.py
+++ b/tempest/api/compute/admin/test_live_migration.py
@@ -47,7 +47,7 @@
]
def _get_server_details(self, server_id):
- body = self.admin_servers_client.get_server(server_id)
+ body = self.admin_servers_client.show_server(server_id)
return body
def _get_host_for_server(self, server_id):
diff --git a/tempest/api/compute/admin/test_quotas.py b/tempest/api/compute/admin/test_quotas.py
index 029e578..47bdfa6 100644
--- a/tempest/api/compute/admin/test_quotas.py
+++ b/tempest/api/compute/admin/test_quotas.py
@@ -15,11 +15,11 @@
from oslo_log import log as logging
import six
-from tempest_lib.common.utils import data_utils
from testtools import matchers
from tempest.api.compute import base
from tempest.common import tempest_fixtures as fixtures
+from tempest.common.utils import data_utils
from tempest import test
LOG = logging.getLogger(__name__)
diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py
index c450a1d..20aa440 100644
--- a/tempest/api/compute/admin/test_quotas_negative.py
+++ b/tempest/api/compute/admin/test_quotas_negative.py
@@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/admin/test_security_group_default_rules.py b/tempest/api/compute/admin/test_security_group_default_rules.py
index c1fe18c..13d6cc0 100644
--- a/tempest/api/compute/admin/test_security_group_default_rules.py
+++ b/tempest/api/compute/admin/test_security_group_default_rules.py
@@ -64,7 +64,7 @@
# Delete Security Group default rule
self.adm_client.delete_security_group_default_rule(rule['id'])
self.assertRaises(lib_exc.NotFound,
- self.adm_client.get_security_group_default_rule,
+ self.adm_client.show_security_group_default_rule,
rule['id'])
@test.idempotent_id('4d752e0a-33a1-4c3a-b498-ff8667ca22e5')
@@ -125,6 +125,6 @@
cidr)
self.addCleanup(self.adm_client.delete_security_group_default_rule,
rule['id'])
- fetched_rule = self.adm_client.get_security_group_default_rule(
+ fetched_rule = self.adm_client.show_security_group_default_rule(
rule['id'])
self.assertEqual(rule, fetched_rule)
diff --git a/tempest/api/compute/admin/test_security_groups.py b/tempest/api/compute/admin/test_security_groups.py
index d8679e0..2c3c629 100644
--- a/tempest/api/compute/admin/test_security_groups.py
+++ b/tempest/api/compute/admin/test_security_groups.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
import testtools
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 9c53e71..0062c1e 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest.api.compute import base
from tempest.common import fixed_network
+from tempest.common.utils import data_utils
from tempest import test
@@ -65,7 +65,7 @@
# Reset server's state to 'active'
self.client.reset_state(self.s1_id, state='active')
# Verify server's state
- server = self.client.get_server(self.s1_id)
+ server = self.client.show_server(self.s1_id)
self.assertEqual(server['status'], 'ACTIVE')
servers = body['servers']
# Verify error server in list result
@@ -114,7 +114,7 @@
**network_kwargs)
self.addCleanup(self.client.delete_server, test_server['id'])
self.client.wait_for_server_status(test_server['id'], 'ACTIVE')
- server = self.client.get_server(test_server['id'])
+ server = self.client.show_server(test_server['id'])
self.assertEqual(server['status'], 'ACTIVE')
hostname = server[self._host_key]
params = {'host': hostname}
@@ -133,14 +133,14 @@
self.client.reset_state(self.s1_id)
# Verify server's state
- server = self.client.get_server(self.s1_id)
+ server = self.client.show_server(self.s1_id)
self.assertEqual(server['status'], 'ERROR')
# Reset server's state to 'active'
self.client.reset_state(self.s1_id, state='active')
# Verify server's state
- server = self.client.get_server(self.s1_id)
+ server = self.client.show_server(self.s1_id)
self.assertEqual(server['status'], 'ACTIVE')
@decorators.skip_because(bug="1240043")
@@ -177,7 +177,7 @@
'ACTIVE',
raise_on_error=False)
# Verify the server properties after rebuilding
- server = self.non_admin_client.get_server(rebuilt_server['id'])
+ server = self.non_admin_client.show_server(rebuilt_server['id'])
rebuilt_image_id = server['image']['id']
self.assertEqual(self.image_ref_alt, rebuilt_image_id)
diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py
index cda4bc4..6d3c4a3 100644
--- a/tempest/api/compute/admin/test_servers_negative.py
+++ b/tempest/api/compute/admin/test_servers_negative.py
@@ -14,12 +14,12 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
import testtools
from tempest.api.compute import base
from tempest.common import tempest_fixtures as fixtures
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index 98b7c5f..02085e8 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -60,7 +60,7 @@
# Get usage for a specific tenant
params = {'start': self.start,
'end': self.end}
- tenant_usage = self.adm_client.get_tenant_usage(
+ tenant_usage = self.adm_client.show_tenant_usage(
self.tenant_id, params)
self.assertEqual(len(tenant_usage), 8)
@@ -70,7 +70,7 @@
# Get usage for a specific tenant with non admin user
params = {'start': self.start,
'end': self.end}
- tenant_usage = self.client.get_tenant_usage(
+ tenant_usage = self.client.show_tenant_usage(
self.tenant_id, params)
self.assertEqual(len(tenant_usage), 8)
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
index 5a3c9a4..3c66859 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
@@ -47,7 +47,7 @@
params = {'start': self.start,
'end': self.end}
self.assertRaises(lib_exc.NotFound,
- self.adm_client.get_tenant_usage,
+ self.adm_client.show_tenant_usage,
'', params)
@test.attr(type=['negative'])
@@ -57,7 +57,7 @@
params = {'start': self.end,
'end': self.start}
self.assertRaises(lib_exc.BadRequest,
- self.adm_client.get_tenant_usage,
+ self.adm_client.show_tenant_usage,
self.client.tenant_id, params)
@test.attr(type=['negative'])
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index a1f6f99..2b36180 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -16,10 +16,11 @@
import time
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.common import compute
+from tempest.common.utils import data_utils
+from tempest.common import waiters
from tempest import config
from tempest import exceptions
import tempest.test
@@ -280,8 +281,8 @@
cls.images.append(image_id)
if 'wait_until' in kwargs:
- cls.images_client.wait_for_image_status(image_id,
- kwargs['wait_until'])
+ waiters.wait_for_image_status(cls.images_client,
+ image_id, kwargs['wait_until'])
image = cls.images_client.show_image(image_id)
if kwargs['wait_until'] == 'ACTIVE':
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
index 093f16b..2cc1b59 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute.floating_ips import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
index d22d334..c07af72 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute.floating_ips import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
index 05d3d05..75b6b55 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/images/test_image_metadata.py b/tempest/api/compute/images/test_image_metadata.py
index 9664c61..ab82d91 100644
--- a/tempest/api/compute/images/test_image_metadata.py
+++ b/tempest/api/compute/images/test_image_metadata.py
@@ -15,9 +15,9 @@
import six
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest.common import waiters
from tempest import config
from tempest import test
@@ -53,7 +53,7 @@
cls.images.append(cls.image_id)
image_file = six.StringIO(('*' * 1024))
cls.glance_client.update_image(cls.image_id, data=image_file)
- cls.client.wait_for_image_status(cls.image_id, 'ACTIVE')
+ waiters.wait_for_image_status(cls.client, cls.image_id, 'ACTIVE')
def setUp(self):
super(ImagesMetadataTestJSON, self).setUp()
@@ -93,8 +93,8 @@
@test.idempotent_id('4f5db52f-6685-4c75-b848-f4bb363f9aa6')
def test_get_image_metadata_item(self):
# The value for a specific metadata key should be returned
- meta = self.client.get_image_metadata_item(self.image_id,
- 'os_distro')
+ meta = self.client.show_image_metadata_item(self.image_id,
+ 'os_distro')
self.assertEqual('value2', meta['os_distro'])
@test.idempotent_id('f2de776a-4778-4d90-a5da-aae63aee64ae')
diff --git a/tempest/api/compute/images/test_image_metadata_negative.py b/tempest/api/compute/images/test_image_metadata_negative.py
index e44fbfc..0f02166 100644
--- a/tempest/api/compute/images/test_image_metadata_negative.py
+++ b/tempest/api/compute/images/test_image_metadata_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
@@ -49,7 +49,7 @@
def test_get_nonexistent_image_metadata_item(self):
# Negative test: Get on non-existent image should not happen
self.assertRaises(lib_exc.NotFound,
- self.client.get_image_metadata_item,
+ self.client.show_image_metadata_item,
data_utils.rand_uuid(), 'os_version')
@test.attr(type=['negative'])
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index 2896f14..0324df2 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index 54a82e9..07eca9e 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
index 1fd165b..1741e86 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -14,9 +14,10 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest.common import waiters
from tempest import config
from tempest import test
@@ -81,7 +82,7 @@
meta = {'image_type': 'test'}
body = self.client.create_image(self.server_id, name, meta)
image_id = data_utils.parse_image_id(body.response['location'])
- self.client.wait_for_image_status(image_id, 'ACTIVE')
+ waiters.wait_for_image_status(self.client, image_id, 'ACTIVE')
# Verify the image was created correctly
image = self.client.show_image(image_id)
diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py
index 8a39d90..1cd1ab7 100644
--- a/tempest/api/compute/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/images/test_images_oneserver_negative.py
@@ -15,10 +15,10 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/images/test_list_image_filters.py b/tempest/api/compute/images/test_list_image_filters.py
index e2d4bd9..b0bbc91 100644
--- a/tempest/api/compute/images/test_list_image_filters.py
+++ b/tempest/api/compute/images/test_list_image_filters.py
@@ -17,10 +17,11 @@
from oslo_log import log as logging
import six
-from tempest_lib.common.utils import data_utils
import testtools
from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest.common import waiters
from tempest import config
from tempest import test
@@ -61,7 +62,7 @@
time.sleep(1)
image_file = six.StringIO(('*' * 1024))
cls.glance_client.update_image(image_id, data=image_file)
- cls.client.wait_for_image_status(image_id, 'ACTIVE')
+ waiters.wait_for_image_status(cls.client, image_id, 'ACTIVE')
body = cls.client.show_image(image_id)
return body
@@ -105,7 +106,7 @@
# The list of images should contain only images with the
# provided status
params = {'status': 'ACTIVE'}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
@@ -116,7 +117,7 @@
# List of all images should contain the expected images filtered
# by name
params = {'name': self.image1['name']}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
@@ -128,7 +129,7 @@
def test_list_images_filter_by_server_id(self):
# The images should contain images filtered by server id
params = {'server': self.server1['id']}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
self.assertTrue(any([i for i in images
if i['id'] == self.snapshot1_id]),
@@ -149,7 +150,7 @@
# Try all server link types
for link in server_links:
params = {'server': link['href']}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
self.assertFalse(any([i for i in images
if i['id'] == self.snapshot1_id]))
@@ -164,7 +165,7 @@
def test_list_images_filter_by_type(self):
# The list of servers should be filtered by image type
params = {'type': 'snapshot'}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
self.assertTrue(any([i for i in images
if i['id'] == self.snapshot1_id]))
@@ -179,7 +180,7 @@
def test_list_images_limit_results(self):
# Verify only the expected number of results are returned
params = {'limit': '1'}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
self.assertEqual(1, len([x for x in images if 'id' in x]))
@test.idempotent_id('18bac3ae-da27-436c-92a9-b22474d13aab')
@@ -189,7 +190,7 @@
# Becoming ACTIVE will modify the updated time
# Filter by the image's created time
params = {'changes-since': self.image3['created']}
- images = self.client.list_images(params)
+ images = self.client.list_images(**params)
found = any([i for i in images if i['id'] == self.image3_id])
self.assertTrue(found)
@@ -198,7 +199,7 @@
# Detailed list of all images should only contain images
# with the provided status
params = {'status': 'ACTIVE'}
- images = self.client.list_images_with_detail(params)
+ images = self.client.list_images(detail=True, **params)
self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
@@ -209,7 +210,7 @@
# Detailed list of all images should contain the expected
# images filtered by name
params = {'name': self.image1['name']}
- images = self.client.list_images_with_detail(params)
+ images = self.client.list_images(detail=True, **params)
self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
@@ -220,7 +221,7 @@
# Verify only the expected number of results (with full details)
# are returned
params = {'limit': '1'}
- images = self.client.list_images_with_detail(params)
+ images = self.client.list_images(detail=True, **params)
self.assertEqual(1, len(images))
@test.idempotent_id('8c78f822-203b-4bf6-8bba-56ebd551cf84')
@@ -233,7 +234,7 @@
# Try all server link types
for link in server_links:
params = {'server': link['href']}
- images = self.client.list_images_with_detail(params)
+ images = self.client.list_images(detail=True, **params)
self.assertFalse(any([i for i in images
if i['id'] == self.snapshot1_id]))
@@ -248,7 +249,7 @@
def test_list_images_with_detail_filter_by_type(self):
# The detailed list of servers should be filtered by image type
params = {'type': 'snapshot'}
- images = self.client.list_images_with_detail(params)
+ images = self.client.list_images(detail=True, **params)
self.client.show_image(self.image_ref)
self.assertTrue(any([i for i in images
@@ -267,5 +268,5 @@
# Becoming ACTIVE will modify the updated time
# Filter by the image's created time
params = {'changes-since': self.image1['created']}
- images = self.client.list_images_with_detail(params)
+ images = self.client.list_images(detail=True, **params)
self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
diff --git a/tempest/api/compute/images/test_list_image_filters_negative.py b/tempest/api/compute/images/test_list_image_filters_negative.py
index 4110619..82062bd 100644
--- a/tempest/api/compute/images/test_list_image_filters_negative.py
+++ b/tempest/api/compute/images/test_list_image_filters_negative.py
@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/images/test_list_images.py b/tempest/api/compute/images/test_list_images.py
index 5b80c72..b67378c 100644
--- a/tempest/api/compute/images/test_list_images.py
+++ b/tempest/api/compute/images/test_list_images.py
@@ -50,6 +50,6 @@
@test.idempotent_id('9f94cb6b-7f10-48c5-b911-a0b84d7d4cd6')
def test_list_images_with_detail(self):
# Detailed list of all images should contain the expected images
- images = self.client.list_images_with_detail()
+ images = self.client.list_images(detail=True)
found = any([i for i in images if i['id'] == self.image_ref])
self.assertTrue(found)
diff --git a/tempest/api/compute/keypairs/test_keypairs.py b/tempest/api/compute/keypairs/test_keypairs.py
index 01e3c86..45eaa97 100644
--- a/tempest/api/compute/keypairs/test_keypairs.py
+++ b/tempest/api/compute/keypairs/test_keypairs.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
@@ -82,7 +81,7 @@
# Keypair should be created, Got details by name and deleted
k_name = data_utils.rand_name('keypair')
self._create_keypair(k_name)
- keypair_detail = self.client.get_keypair(k_name)
+ keypair_detail = self.client.show_keypair(k_name)
self.assertIn('name', keypair_detail)
self.assertIn('public_key', keypair_detail)
self.assertEqual(keypair_detail['name'], k_name,
diff --git a/tempest/api/compute/keypairs/test_keypairs_negative.py b/tempest/api/compute/keypairs/test_keypairs_negative.py
index 78db74e..54b07f0 100644
--- a/tempest/api/compute/keypairs/test_keypairs_negative.py
+++ b/tempest/api/compute/keypairs/test_keypairs_negative.py
@@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/security_groups/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
index c654172..15e79ac 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules_negative.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute.security_groups import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 0ce26a3..491e52e 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute.security_groups import base
+from tempest.common.utils import data_utils
from tempest import test
@@ -75,7 +75,7 @@
"not equal to the requested name")
# Now fetch the created Security Group by its 'id'
fetched_group = \
- self.client.get_security_group(securitygroup['id'])
+ self.client.show_security_group(securitygroup['id'])
self.assertEqual(securitygroup, fetched_group,
"The fetched Security Group is different "
"from the created Group")
@@ -141,6 +141,6 @@
description=s_new_des)
# get the security group
fetched_group = \
- self.client.get_security_group(securitygroup_id)
+ self.client.show_security_group(securitygroup_id)
self.assertEqual(s_new_name, fetched_group['name'])
self.assertEqual(s_new_des, fetched_group['description'])
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index 06e073d..d8cbe3d 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
import testtools
from tempest.api.compute.security_groups import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -58,7 +58,7 @@
# Negative test:Should not be able to GET the details
# of non-existent Security Group
non_exist_id = self._generate_a_non_existent_security_group_id()
- self.assertRaises(lib_exc.NotFound, self.client.get_security_group,
+ self.assertRaises(lib_exc.NotFound, self.client.show_security_group,
non_exist_id)
@decorators.skip_because(bug="1161411",
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 7ce6269..396327b 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -46,6 +46,28 @@
super(AttachInterfacesTestJSON, cls).setup_clients()
cls.client = cls.os.interfaces_client
+ def wait_for_interface_status(self, server, port_id, status):
+ """Waits for a interface to reach a given status."""
+ body = self.client.show_interface(server, port_id)
+ interface_status = body['port_state']
+ start = int(time.time())
+
+ while(interface_status != status):
+ time.sleep(self.build_interval)
+ body = self.client.show_interface(server, port_id)
+ interface_status = body['port_state']
+
+ timed_out = int(time.time()) - start >= self.build_timeout
+
+ if interface_status != status and timed_out:
+ message = ('Interface %s failed to reach %s status '
+ '(current %s) within the required time (%s s).' %
+ (port_id, status, interface_status,
+ self.build_timeout))
+ raise exceptions.TimeoutException(message)
+
+ return body
+
def _check_interface(self, iface, port_id=None, network_id=None,
fixed_ip=None, mac_addr=None):
self.assertIn('port_state', iface)
@@ -61,14 +83,14 @@
def _create_server_get_interfaces(self):
server = self.create_test_server(wait_until='ACTIVE')
ifs = self.client.list_interfaces(server['id'])
- body = self.client.wait_for_interface_status(
+ body = self.wait_for_interface_status(
server['id'], ifs[0]['port_id'], 'ACTIVE')
ifs[0]['port_state'] = body['port_state']
return server, ifs
def _test_create_interface(self, server):
iface = self.client.create_interface(server['id'])
- iface = self.client.wait_for_interface_status(
+ iface = self.wait_for_interface_status(
server['id'], iface['port_id'], 'ACTIVE')
self._check_interface(iface)
return iface
@@ -77,7 +99,7 @@
network_id = ifs[0]['net_id']
iface = self.client.create_interface(server['id'],
network_id=network_id)
- iface = self.client.wait_for_interface_status(
+ iface = self.wait_for_interface_status(
server['id'], iface['port_id'], 'ACTIVE')
self._check_interface(iface, network_id=network_id)
return iface
@@ -159,7 +181,7 @@
network_id = ifs[0]['net_id']
self.client.add_fixed_ip(server['id'], network_id)
# Remove the fixed IP from server.
- server_detail = self.os.servers_client.get_server(
+ server_detail = self.os.servers_client.show_server(
server['id'])
# Get the Fixed IP from server.
fixed_ip = None
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 408d4ee..8b0e1a4 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -16,10 +16,10 @@
import base64
import netaddr
-from tempest_lib.common.utils import data_utils
import testtools
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest.common.utils.linux import remote_client
from tempest import config
from tempest import test
@@ -63,7 +63,7 @@
personality=personality,
disk_config=disk_config)
cls.password = cls.server_initial['adminPass']
- cls.server = cls.client.get_server(cls.server_initial['id'])
+ cls.server = cls.client.show_server(cls.server_initial['id'])
@test.attr(type='smoke')
@test.idempotent_id('5de47127-9977-400a-936f-abcfbec1218f')
@@ -265,13 +265,13 @@
adminPass=admin_pass,
flavor=flavor_with_eph_disk_id))
# Get partition number of server without extra specs.
- server_no_eph_disk = self.client.get_server(
+ server_no_eph_disk = self.client.show_server(
server_no_eph_disk['id'])
linux_client = remote_client.RemoteClient(server_no_eph_disk,
self.ssh_user, admin_pass)
partition_num = len(linux_client.get_partitions().split('\n'))
- server_with_eph_disk = self.client.get_server(
+ server_with_eph_disk = self.client.show_server(
server_with_eph_disk['id'])
linux_client = remote_client.RemoteClient(server_with_eph_disk,
self.ssh_user, admin_pass)
diff --git a/tempest/api/compute/servers/test_delete_server.py b/tempest/api/compute/servers/test_delete_server.py
index ac6ef4c..b36b721 100644
--- a/tempest/api/compute/servers/test_delete_server.py
+++ b/tempest/api/compute/servers/test_delete_server.py
@@ -144,7 +144,7 @@
server = self.create_test_server(wait_until='ACTIVE')
self.admin_client.reset_state(server['id'], state='error')
# Verify server's state
- server = self.non_admin_client.get_server(server['id'])
+ server = self.non_admin_client.show_server(server['id'])
self.assertEqual(server['status'], 'ERROR')
self.non_admin_client.delete_server(server['id'])
self.servers_client.wait_for_server_termination(server['id'],
diff --git a/tempest/api/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
index 8482802..00aa510 100644
--- a/tempest/api/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -43,12 +43,12 @@
cls.server_id = server['id']
def _update_server_with_disk_config(self, disk_config):
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
if disk_config != server['OS-DCF:diskConfig']:
server = self.client.update_server(self.server_id,
disk_config=disk_config)
self.client.wait_for_server_status(server['id'], 'ACTIVE')
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual(disk_config, server['OS-DCF:diskConfig'])
@test.idempotent_id('bef56b09-2e8c-4883-a370-4950812f430e')
@@ -64,7 +64,7 @@
self.client.wait_for_server_status(server['id'], 'ACTIVE')
# Verify the specified attributes are set correctly
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
@test.idempotent_id('9c9fae77-4feb-402f-8450-bf1c8b609713')
@@ -80,11 +80,11 @@
self.client.wait_for_server_status(server['id'], 'ACTIVE')
# Verify the specified attributes are set correctly
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
def _get_alternative_flavor(self):
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
if server['flavor']['id'] == self.flavor_ref:
return self.flavor_ref_alt
@@ -105,7 +105,7 @@
self.client.confirm_resize(self.server_id)
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
@test.idempotent_id('693d16f3-556c-489a-8bac-3d0ca2490bad')
@@ -122,7 +122,7 @@
self.client.confirm_resize(self.server_id)
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
@test.idempotent_id('5ef18867-358d-4de9-b3c9-94d4ba35742f')
@@ -136,5 +136,5 @@
self.client.wait_for_server_status(server['id'], 'ACTIVE')
# Verify the disk_config attribute is set correctly
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
diff --git a/tempest/api/compute/servers/test_instance_actions_negative.py b/tempest/api/compute/servers/test_instance_actions_negative.py
index afd3b7a..6567da1 100644
--- a/tempest/api/compute/servers/test_instance_actions_negative.py
+++ b/tempest/api/compute/servers/test_instance_actions_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 7a91cab..326334c 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
from tempest.api import utils
from tempest.common import fixed_network
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -273,7 +273,7 @@
if not self.fixed_network_name:
msg = 'fixed_network_name needs to be configured to run this test'
raise self.skipException(msg)
- self.s1 = self.client.get_server(self.s1['id'])
+ self.s1 = self.client.show_server(self.s1['id'])
for addr_spec in self.s1['addresses'][self.fixed_network_name]:
ip = addr_spec['addr']
if addr_spec['version'] == 4:
@@ -297,7 +297,7 @@
if not self.fixed_network_name:
msg = 'fixed_network_name needs to be configured to run this test'
raise self.skipException(msg)
- self.s1 = self.client.get_server(self.s1['id'])
+ self.s1 = self.client.show_server(self.s1['id'])
addr_spec = self.s1['addresses'][self.fixed_network_name][0]
ip = addr_spec['addr'][0:-3]
if addr_spec['version'] == 4:
diff --git a/tempest/api/compute/servers/test_multiple_create.py b/tempest/api/compute/servers/test_multiple_create.py
index 11b457b..a945411 100644
--- a/tempest/api/compute/servers/test_multiple_create.py
+++ b/tempest/api/compute/servers/test_multiple_create.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/servers/test_multiple_create_negative.py b/tempest/api/compute/servers/test_multiple_create_negative.py
index bfc98ff..8135768 100644
--- a/tempest/api/compute/servers/test_multiple_create_negative.py
+++ b/tempest/api/compute/servers/test_multiple_create_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 10b08a1..3aff595 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -17,12 +17,12 @@
import logging
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
import testtools
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest.common.utils.linux import remote_client
from tempest import config
from tempest import test
@@ -76,7 +76,7 @@
if self.run_ssh:
# Verify that the user can authenticate with the new password
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
linux_client = remote_client.RemoteClient(server, self.ssh_user,
new_password)
linux_client.validate_authentication()
@@ -84,7 +84,7 @@
def _test_reboot_server(self, reboot_type):
if self.run_ssh:
# Get the time the server was last rebooted,
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
linux_client = remote_client.RemoteClient(server, self.ssh_user,
self.password)
boot_time = linux_client.get_boot_time()
@@ -149,7 +149,7 @@
# Verify the server properties after the rebuild completes
self.client.wait_for_server_status(rebuilt_server['id'], 'ACTIVE')
- server = self.client.get_server(rebuilt_server['id'])
+ server = self.client.show_server(rebuilt_server['id'])
rebuilt_image_id = server['image']['id']
self.assertTrue(self.image_ref_alt.endswith(rebuilt_image_id))
self.assertEqual(new_name, server['name'])
@@ -164,7 +164,7 @@
def test_rebuild_server_in_stop_state(self):
# The server in stop state should be rebuilt using the provided
# image and remain in SHUTOFF state
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
old_image = server['image']['id']
new_image = (self.image_ref_alt
if old_image == self.image_ref else self.image_ref)
@@ -184,7 +184,7 @@
# Verify the server properties after the rebuild completes
self.client.wait_for_server_status(rebuilt_server['id'], 'SHUTOFF')
- server = self.client.get_server(rebuilt_server['id'])
+ server = self.client.show_server(rebuilt_server['id'])
rebuilt_image_id = server['image']['id']
self.assertEqual(new_image, rebuilt_image_id)
@@ -206,7 +206,7 @@
expected_status = 'SHUTOFF' if stop else 'ACTIVE'
self.client.wait_for_server_status(self.server_id, expected_status)
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
self.assertEqual(self.flavor_ref_alt, server['flavor']['id'])
if stop:
@@ -242,7 +242,7 @@
self.client.revert_resize(self.server_id)
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
self.assertEqual(self.flavor_ref, server['flavor']['id'])
@test.idempotent_id('b963d4f1-94b3-4c40-9e97-7b583f46e470')
@@ -427,10 +427,10 @@
self.client.wait_for_server_status(self.server_id,
'SHELVED_OFFLOADED')
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
image_name = server['name'] + '-shelved'
params = {'name': image_name}
- images = self.images_client.list_images(params)
+ images = self.images_client.list_images(**params)
self.assertEqual(1, len(images))
self.assertEqual(image_name, images[0]['name'])
@@ -448,7 +448,7 @@
def test_lock_unlock_server(self):
# Lock the server,try server stop(exceptions throw),unlock it and retry
self.servers_client.lock_server(self.server_id)
- server = self.servers_client.get_server(self.server_id)
+ server = self.servers_client.show_server(self.server_id)
self.assertEqual(server['status'], 'ACTIVE')
# Locked server is not allowed to be stopped by non-admin user
self.assertRaises(lib_exc.Conflict,
diff --git a/tempest/api/compute/servers/test_server_group.py b/tempest/api/compute/servers/test_server_group.py
index ca808dd..f6dd5e3 100644
--- a/tempest/api/compute/servers/test_server_group.py
+++ b/tempest/api/compute/servers/test_server_group.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py
index a8f7597..c42ec3d 100644
--- a/tempest/api/compute/servers/test_server_metadata_negative.py
+++ b/tempest/api/compute/servers/test_server_metadata_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py
index 4e3ce47..20bc77f 100644
--- a/tempest/api/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/servers/test_server_rescue_negative.py b/tempest/api/compute/servers/test_server_rescue_negative.py
index 7798005..9cc9e9b 100644
--- a/tempest/api/compute/servers/test_server_rescue_negative.py
+++ b/tempest/api/compute/servers/test_server_rescue_negative.py
@@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
import testtools
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/servers/test_servers.py b/tempest/api/compute/servers/test_servers.py
index 31078e3..a7ebc09 100644
--- a/tempest/api/compute/servers/test_servers.py
+++ b/tempest/api/compute/servers/test_servers.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import test
@@ -52,9 +51,9 @@
wait_until='ACTIVE')
id2 = server['id']
self.assertNotEqual(id1, id2, "Did not create a new server")
- server = self.client.get_server(id1)
+ server = self.client.show_server(id1)
name1 = server['name']
- server = self.client.get_server(id2)
+ server = self.client.show_server(id2)
name2 = server['name']
self.assertEqual(name1, name2)
@@ -68,7 +67,7 @@
self.keypairs_client.list_keypairs()
server = self.create_test_server(key_name=key_name)
self.client.wait_for_server_status(server['id'], 'ACTIVE')
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual(key_name, server['key_name'])
def _update_server_name(self, server_id, status):
@@ -80,7 +79,7 @@
self.client.wait_for_server_status(server_id, status)
# Verify the name of the server has changed
- server = self.client.get_server(server_id)
+ server = self.client.show_server(server_id)
self.assertEqual(new_name, server['name'])
return server
@@ -112,7 +111,7 @@
self.client.wait_for_server_status(server['id'], 'ACTIVE')
# Verify the access addresses have been updated
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual('1.1.1.1', server['accessIPv4'])
self.assertEqual('::babe:202:202', server['accessIPv6'])
@@ -121,5 +120,5 @@
# Create a server without an IPv4 address(only IPv6 address).
server = self.create_test_server(accessIPv6='2001:2001::3')
self.client.wait_for_server_status(server['id'], 'ACTIVE')
- server = self.client.get_server(server['id'])
+ server = self.client.show_server(server['id'])
self.assertEqual('2001:2001::3', server['accessIPv6'])
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index 82ef7f5..d13d9d6 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -15,11 +15,11 @@
import sys
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
import testtools
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -326,7 +326,7 @@
def test_get_non_existent_server(self):
# Get a non existent server details
nonexistent_server = data_utils.rand_uuid()
- self.assertRaises(lib_exc.NotFound, self.client.get_server,
+ self.assertRaises(lib_exc.NotFound, self.client.show_server,
nonexistent_server)
@test.attr(type=['negative'])
@@ -472,10 +472,10 @@
self.client.wait_for_server_status(self.server_id,
'SHELVED')
- server = self.client.get_server(self.server_id)
+ server = self.client.show_server(self.server_id)
image_name = server['name'] + '-shelved'
params = {'name': image_name}
- images = self.images_client.list_images(params)
+ images = self.images_client.list_images(**params)
self.assertEqual(1, len(images))
self.assertEqual(image_name, images[0]['name'])
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index 63b78a0..58c2206 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -16,10 +16,10 @@
import six
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -62,7 +62,7 @@
def resource_setup(cls):
super(AuthorizationTestJSON, cls).resource_setup()
server = cls.create_test_server(wait_until='ACTIVE')
- cls.server = cls.client.get_server(server['id'])
+ cls.server = cls.client.show_server(server['id'])
name = data_utils.rand_name('image')
body = cls.glance_client.create_image(name=name,
@@ -103,7 +103,7 @@
@test.idempotent_id('56816e4a-bd34-47b5-aee9-268c3efeb5d4')
def test_get_server_for_alt_account_fails(self):
# A GET request for a server on another user's account should fail
- self.assertRaises(lib_exc.NotFound, self.alt_client.get_server,
+ self.assertRaises(lib_exc.NotFound, self.alt_client.show_server,
self.server['id'])
@test.idempotent_id('fb8a4870-6d9d-44ad-8375-95d52e98d9f6')
@@ -219,7 +219,7 @@
def test_get_keypair_of_alt_account_fails(self):
# A GET request for another user's keypair should fail
self.assertRaises(lib_exc.NotFound,
- self.alt_keypairs_client.get_keypair,
+ self.alt_keypairs_client.show_keypair,
self.keypairname)
@test.idempotent_id('6d841683-a8e0-43da-a1b8-b339f7692b61')
@@ -271,7 +271,7 @@
def test_get_security_group_of_alt_account_fails(self):
# A GET request for another user's security group should fail
self.assertRaises(lib_exc.NotFound,
- self.alt_security_client.get_security_group,
+ self.alt_security_client.show_security_group,
self.security_group['id'])
@test.idempotent_id('155387a5-2bbc-4acf-ab06-698dae537ea5')
@@ -356,7 +356,7 @@
self.images_client.set_image_metadata(self.image['id'],
req_metadata)
self.assertRaises(lib_exc.NotFound,
- self.alt_images_client.get_image_metadata_item,
+ self.alt_images_client.show_image_metadata_item,
self.image['id'], 'meta1')
@test.idempotent_id('79531e2e-e721-493c-8b30-a35db36fdaa6')
diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py
index 5ee76ca..47251b2 100644
--- a/tempest/api/compute/test_live_block_migration_negative.py
+++ b/tempest/api/compute/test_live_block_migration_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/compute/test_tenant_networks.py b/tempest/api/compute/test_tenant_networks.py
index a37dce1..ad5adaa 100644
--- a/tempest/api/compute/test_tenant_networks.py
+++ b/tempest/api/compute/test_tenant_networks.py
@@ -29,5 +29,5 @@
self.assertNotEmpty(tenant_networks, "No tenant networks found.")
for net in tenant_networks:
- tenant_network = self.client.get_tenant_network(net['id'])
+ tenant_network = self.client.show_tenant_network(net['id'])
self.assertEqual(net['id'], tenant_network['id'])
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index d96dcc2..1a64b22 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from testtools import matchers
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -58,7 +58,7 @@
# Wait for Volume status to become ACTIVE
self.client.wait_for_volume_status(volume['id'], 'available')
# GET Volume
- fetched_volume = self.client.get_volume(volume['id'])
+ fetched_volume = self.client.show_volume(volume['id'])
# Verification of details of fetched Volume
self.assertEqual(v_name,
fetched_volume['displayName'],
diff --git a/tempest/api/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py
index fdece0c..7ba62b0 100644
--- a/tempest/api/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -57,7 +56,7 @@
volume = cls.client.create_volume(display_name=v_name,
metadata=metadata)
cls.client.wait_for_volume_status(volume['id'], 'available')
- volume = cls.client.get_volume(volume['id'])
+ volume = cls.client.show_volume(volume['id'])
cls.volume_list.append(volume)
cls.volume_id_list.append(volume['id'])
except Exception:
@@ -102,7 +101,7 @@
def test_volume_list_with_details(self):
# Should return the list of Volumes with details
# Fetch all Volumes
- fetched_list = self.client.list_volumes_with_detail()
+ fetched_list = self.client.list_volumes(detail=True)
# Now check if all the Volumes created in setup are in fetched list
missing_volumes = [
v for v in self.volume_list if v not in fetched_list
@@ -117,7 +116,7 @@
def test_volume_list_param_limit(self):
# Return the list of volumes based on limit set
params = {'limit': 2}
- fetched_vol_list = self.client.list_volumes(params=params)
+ fetched_vol_list = self.client.list_volumes(**params)
self.assertEqual(len(fetched_vol_list), params['limit'],
"Failed to list volumes by limit set")
@@ -126,7 +125,7 @@
def test_volume_list_with_detail_param_limit(self):
# Return the list of volumes with details based on limit set.
params = {'limit': 2}
- fetched_vol_list = self.client.list_volumes_with_detail(params=params)
+ fetched_vol_list = self.client.list_volumes(detail=True, **params)
self.assertEqual(len(fetched_vol_list), params['limit'],
"Failed to list volume details by limit set")
@@ -137,7 +136,7 @@
# get all volumes list
all_vol_list = self.client.list_volumes()
params = {'offset': 1, 'limit': 1}
- fetched_vol_list = self.client.list_volumes(params=params)
+ fetched_vol_list = self.client.list_volumes(**params)
# Validating length of the fetched volumes
self.assertEqual(len(fetched_vol_list), params['limit'],
@@ -152,9 +151,9 @@
def test_volume_list_with_detail_param_offset_and_limit(self):
# Return the list of volumes details based on offset and limit set.
# get all volumes list
- all_vol_list = self.client.list_volumes_with_detail()
+ all_vol_list = self.client.list_volumes(detail=True)
params = {'offset': 1, 'limit': 1}
- fetched_vol_list = self.client.list_volumes_with_detail(params=params)
+ fetched_vol_list = self.client.list_volumes(detail=True, **params)
# Validating length of the fetched volumes
self.assertEqual(len(fetched_vol_list), params['limit'],
diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py
index 65d9def..01a0baf 100644
--- a/tempest/api/compute/volumes/test_volumes_negative.py
+++ b/tempest/api/compute/volumes/test_volumes_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.compute import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -45,7 +45,7 @@
# Negative: Should not be able to get details of nonexistent volume
# Creating a nonexistent volume id
# Trying to GET a non existent volume
- self.assertRaises(lib_exc.NotFound, self.client.get_volume,
+ self.assertRaises(lib_exc.NotFound, self.client.show_volume,
str(uuid.uuid4()))
@test.attr(type=['negative'])
@@ -91,13 +91,13 @@
def test_get_invalid_volume_id(self):
# Negative: Should not be able to get volume with invalid id
self.assertRaises(lib_exc.NotFound,
- self.client.get_volume, '#$%%&^&^')
+ self.client.show_volume, '#$%%&^&^')
@test.attr(type=['negative'])
@test.idempotent_id('62bab09a-4c03-4617-8cca-8572bc94af9b')
def test_get_volume_without_passing_volume_id(self):
# Negative: Should not be able to get volume when empty ID is passed
- self.assertRaises(lib_exc.NotFound, self.client.get_volume, '')
+ self.assertRaises(lib_exc.NotFound, self.client.show_volume, '')
@test.attr(type=['negative'])
@test.idempotent_id('62972737-124b-4513-b6cf-2f019f178494')
diff --git a/tempest/api/data_processing/test_cluster_templates.py b/tempest/api/data_processing/test_cluster_templates.py
index cebf493..e357a85 100644
--- a/tempest/api/data_processing/test_cluster_templates.py
+++ b/tempest/api/data_processing/test_cluster_templates.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
from tempest import exceptions
from tempest import test
diff --git a/tempest/api/data_processing/test_data_sources.py b/tempest/api/data_processing/test_data_sources.py
index 5d2ed2d..dd16b2f 100644
--- a/tempest/api/data_processing/test_data_sources.py
+++ b/tempest/api/data_processing/test_data_sources.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/data_processing/test_job_binaries.py b/tempest/api/data_processing/test_job_binaries.py
index 694cf25..fb21270 100644
--- a/tempest/api/data_processing/test_job_binaries.py
+++ b/tempest/api/data_processing/test_job_binaries.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/data_processing/test_job_binary_internals.py b/tempest/api/data_processing/test_job_binary_internals.py
index ee4e68a..3d76ebe 100644
--- a/tempest/api/data_processing/test_job_binary_internals.py
+++ b/tempest/api/data_processing/test_job_binary_internals.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/data_processing/test_jobs.py b/tempest/api/data_processing/test_jobs.py
index b155615..83eb54d 100644
--- a/tempest/api/data_processing/test_jobs.py
+++ b/tempest/api/data_processing/test_jobs.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/data_processing/test_node_group_templates.py b/tempest/api/data_processing/test_node_group_templates.py
index 4068027..102799d 100644
--- a/tempest/api/data_processing/test_node_group_templates.py
+++ b/tempest/api/data_processing/test_node_group_templates.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.data_processing import base as dp_base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_roles.py b/tempest/api/identity/admin/v2/test_roles.py
index 4e89bfe..1babc45 100644
--- a/tempest/api/identity/admin/v2/test_roles.py
+++ b/tempest/api/identity/admin/v2/test_roles.py
@@ -14,9 +14,9 @@
# under the License.
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_roles_negative.py b/tempest/api/identity/admin/v2/test_roles_negative.py
index 3654f9c..b38b7dd 100644
--- a/tempest/api/identity/admin/v2/test_roles_negative.py
+++ b/tempest/api/identity/admin/v2/test_roles_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_services.py b/tempest/api/identity/admin/v2/test_services.py
index de1d091..ef93981 100644
--- a/tempest/api/identity/admin/v2/test_services.py
+++ b/tempest/api/identity/admin/v2/test_services.py
@@ -14,10 +14,10 @@
# under the License.
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_tenant_negative.py b/tempest/api/identity/admin/v2/test_tenant_negative.py
index 367b699..bccb5ca 100644
--- a/tempest/api/identity/admin/v2/test_tenant_negative.py
+++ b/tempest/api/identity/admin/v2/test_tenant_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_tenants.py b/tempest/api/identity/admin/v2/test_tenants.py
index cfd3d7f..f828f66 100644
--- a/tempest/api/identity/admin/v2/test_tenants.py
+++ b/tempest/api/identity/admin/v2/test_tenants.py
@@ -14,9 +14,9 @@
# under the License.
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_tokens.py b/tempest/api/identity/admin/v2/test_tokens.py
index ee2530b..66d00d1 100644
--- a/tempest/api/identity/admin/v2/test_tokens.py
+++ b/tempest/api/identity/admin/v2/test_tokens.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_users.py b/tempest/api/identity/admin/v2/test_users.py
index 8eac80c..bfbcfe7 100644
--- a/tempest/api/identity/admin/v2/test_users.py
+++ b/tempest/api/identity/admin/v2/test_users.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from testtools import matchers
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v2/test_users_negative.py b/tempest/api/identity/admin/v2/test_users_negative.py
index 3c15006..85f7411 100644
--- a/tempest/api/identity/admin/v2/test_users_negative.py
+++ b/tempest/api/identity/admin/v2/test_users_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index 98ab093..662d06c 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_default_project_id.py b/tempest/api/identity/admin/v3/test_default_project_id.py
index 0b9d60e..98fff09 100644
--- a/tempest/api/identity/admin/v3/test_default_project_id.py
+++ b/tempest/api/identity/admin/v3/test_default_project_id.py
@@ -11,10 +11,10 @@
# under the License.
from tempest_lib import auth
-from tempest_lib.common.utils import data_utils
from tempest.api.identity import base
from tempest import clients
+from tempest.common.utils import data_utils
from tempest import config
from tempest import manager
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_domains.py b/tempest/api/identity/admin/v3/test_domains.py
index 94aab5b..5bfb981 100644
--- a/tempest/api/identity/admin/v3/test_domains.py
+++ b/tempest/api/identity/admin/v3/test_domains.py
@@ -14,11 +14,10 @@
# under the License.
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
-from tempest_lib.common.utils import data_utils
-
CONF = config.CONF
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 9ca10a4..9a8104f 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py
index 7972dbb..b043415 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_groups.py b/tempest/api/identity/admin/v3/test_groups.py
index fed4dc2..88e2959 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_list_projects.py b/tempest/api/identity/admin/v3/test_list_projects.py
index d88b00d..12d80bb 100644
--- a/tempest/api/identity/admin/v3/test_list_projects.py
+++ b/tempest/api/identity/admin/v3/test_list_projects.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_list_users.py b/tempest/api/identity/admin/v3/test_list_users.py
index eeee3bb..d3d51b4 100644
--- a/tempest/api/identity/admin/v3/test_list_users.py
+++ b/tempest/api/identity/admin/v3/test_list_users.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_policies.py b/tempest/api/identity/admin/v3/test_policies.py
index 6c5599a..8b67945 100644
--- a/tempest/api/identity/admin/v3/test_policies.py
+++ b/tempest/api/identity/admin/v3/test_policies.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_projects.py b/tempest/api/identity/admin/v3/test_projects.py
index 41cf840..17712f3 100644
--- a/tempest/api/identity/admin/v3/test_projects.py
+++ b/tempest/api/identity/admin/v3/test_projects.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_projects_negative.py b/tempest/api/identity/admin/v3/test_projects_negative.py
index 37ec071..d5ee5a7 100644
--- a/tempest/api/identity/admin/v3/test_projects_negative.py
+++ b/tempest/api/identity/admin/v3/test_projects_negative.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py
index 986007a..7eb92bc 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index 7857e11..f58a5c5 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
index b2a75aa..95a7dcc 100644
--- a/tempest/api/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py
index 41d67c7..951bc78 100644
--- a/tempest/api/identity/admin/v3/test_tokens.py
+++ b/tempest/api/identity/admin/v3/test_tokens.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index 8a2d797..1ac34eb 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -14,12 +14,12 @@
import re
from oslo_utils import timeutils
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.identity import base
from tempest import clients
from tempest.common import cred_provider
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index c2456c4..19cb24e 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.identity import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 913e807..0654f37 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -14,10 +14,10 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.common import cred_provider
+from tempest.common.utils import data_utils
from tempest import config
import tempest.test
diff --git a/tempest/api/identity/v2/test_tokens.py b/tempest/api/identity/v2/test_tokens.py
index 5a8afa0..3b508f4 100644
--- a/tempest/api/identity/v2/test_tokens.py
+++ b/tempest/api/identity/v2/test_tokens.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_utils import timeutils
+import six
from tempest.api.identity import base
from tempest import test
@@ -30,9 +32,19 @@
password = creds.password
tenant_name = creds.tenant_name
- body = token_client.auth(username,
- password,
- tenant_name)
+ body = token_client.auth(username, password, tenant_name)
+ self.assertNotEmpty(body['token']['id'])
+ self.assertIsInstance(body['token']['id'], six.string_types)
+
+ now = timeutils.utcnow()
+ expires_at = timeutils.normalize_time(
+ timeutils.parse_isotime(body['token']['expires']))
+ self.assertGreater(expires_at, now)
+
+ self.assertEqual(body['token']['tenant']['id'],
+ creds.credentials.tenant_id)
self.assertEqual(body['token']['tenant']['name'],
tenant_name)
+
+ self.assertEqual(body['user']['id'], creds.credentials.user_id)
diff --git a/tempest/api/identity/v3/test_tokens.py b/tempest/api/identity/v3/test_tokens.py
index ab4a09f..3151763 100644
--- a/tempest/api/identity/v3/test_tokens.py
+++ b/tempest/api/identity/v3/test_tokens.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_utils import timeutils
+import six
from tempest.api.identity import base
from tempest import test
@@ -26,8 +28,25 @@
user_id = creds.user_id
username = creds.username
password = creds.password
- resp = self.non_admin_token.auth(user_id=user_id,
- password=password)
- subject_name = resp['token']['user']['name']
+ token_id, resp = self.non_admin_token.get_token(user_id=user_id,
+ password=password,
+ auth_data=True)
+
+ self.assertNotEmpty(token_id)
+ self.assertIsInstance(token_id, six.string_types)
+
+ now = timeutils.utcnow()
+ expires_at = timeutils.normalize_time(
+ timeutils.parse_isotime(resp['expires_at']))
+ self.assertGreater(resp['expires_at'],
+ resp['issued_at'])
+ self.assertGreater(expires_at, now)
+
+ subject_id = resp['user']['id']
+ self.assertEqual(subject_id, user_id)
+
+ subject_name = resp['user']['name']
self.assertEqual(subject_name, username)
+
+ self.assertEqual(resp['methods'][0], 'password')
diff --git a/tempest/api/image/base.py b/tempest/api/image/base.py
index dc38cab..87013db 100644
--- a/tempest/api/image/base.py
+++ b/tempest/api/image/base.py
@@ -14,9 +14,9 @@
from oslo_log import log as logging
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
+from tempest.common.utils import data_utils
from tempest import config
import tempest.test
diff --git a/tempest/api/image/v1/test_image_members_negative.py b/tempest/api/image/v1/test_image_members_negative.py
index df0e88a..50f5048 100644
--- a/tempest/api/image/v1/test_image_members_negative.py
+++ b/tempest/api/image/v1/test_image_members_negative.py
@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.image import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/image/v1/test_images.py b/tempest/api/image/v1/test_images.py
index 3f71fcb..8beed32 100644
--- a/tempest/api/image/v1/test_images.py
+++ b/tempest/api/image/v1/test_images.py
@@ -14,9 +14,9 @@
# under the License.
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest.api.image import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index 2859cfe..20e9bca 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -17,9 +17,9 @@
import random
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest.api.image import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/image/v2/test_images_tags.py b/tempest/api/image/v2/test_images_tags.py
index e38136e..42a4b87 100644
--- a/tempest/api/image/v2/test_images_tags.py
+++ b/tempest/api/image/v2/test_images_tags.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.image import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/image/v2/test_images_tags_negative.py b/tempest/api/image/v2/test_images_tags_negative.py
index 571b1f7..a3f4ca8 100644
--- a/tempest/api/image/v2/test_images_tags_negative.py
+++ b/tempest/api/image/v2/test_images_tags_negative.py
@@ -14,10 +14,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.image import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/messaging/base.py b/tempest/api/messaging/base.py
index 34ac860..64a7fd5 100644
--- a/tempest/api/messaging/base.py
+++ b/tempest/api/messaging/base.py
@@ -14,8 +14,8 @@
# limitations under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/messaging/test_claims.py b/tempest/api/messaging/test_claims.py
index 34e1fe8..e54bed1 100644
--- a/tempest/api/messaging/test_claims.py
+++ b/tempest/api/messaging/test_claims.py
@@ -16,10 +16,10 @@
import logging
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest.api.messaging import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/messaging/test_messages.py b/tempest/api/messaging/test_messages.py
index c8640b3..efbbf56 100644
--- a/tempest/api/messaging/test_messages.py
+++ b/tempest/api/messaging/test_messages.py
@@ -15,9 +15,8 @@
import logging
-from tempest_lib.common.utils import data_utils
-
from tempest.api.messaging import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/messaging/test_queues.py b/tempest/api/messaging/test_queues.py
index a3541b3..df49663 100644
--- a/tempest/api/messaging/test_queues.py
+++ b/tempest/api/messaging/test_queues.py
@@ -16,11 +16,11 @@
import logging
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from testtools import matchers
from tempest.api.messaging import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/network/admin/test_external_network_extension.py b/tempest/api/network/admin/test_external_network_extension.py
index 75f2719..d942641 100644
--- a/tempest/api/network/admin/test_external_network_extension.py
+++ b/tempest/api/network/admin/test_external_network_extension.py
@@ -10,9 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/network/admin/test_floating_ips_admin_actions.py b/tempest/api/network/admin/test_floating_ips_admin_actions.py
index d4e94ca..dfe7307 100644
--- a/tempest/api/network/admin/test_floating_ips_admin_actions.py
+++ b/tempest/api/network/admin/test_floating_ips_admin_actions.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 38d68c2..d5556b8 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import exceptions
from tempest import test
diff --git a/tempest/api/network/admin/test_quotas.py b/tempest/api/network/admin/test_quotas.py
index f6046d3..cb113a7 100644
--- a/tempest/api/network/admin/test_quotas.py
+++ b/tempest/api/network/admin/test_quotas.py
@@ -14,9 +14,9 @@
# under the License.
import six
-from tempest_lib.common.utils import data_utils
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/network/admin/test_routers_dvr.py b/tempest/api/network/admin/test_routers_dvr.py
index e59be02..9e2d080 100644
--- a/tempest/api/network/admin/test_routers_dvr.py
+++ b/tempest/api/network/admin/test_routers_dvr.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.network import base_routers as base
+from tempest.common.utils import data_utils
from tempest import test
@@ -36,10 +35,10 @@
super(RoutersTestDVR, cls).resource_setup()
name = data_utils.rand_name('pretest-check')
router = cls.admin_client.create_router(name)
- if 'distributed' not in router['router']:
- msg = "'distributed' attribute not found. DVR Possibly not enabled"
- raise cls.skipException(msg)
cls.admin_client.delete_router(router['router']['id'])
+ if 'distributed' not in router['router']:
+ msg = "'distributed' flag not found. DVR Possibly not enabled"
+ raise cls.skipException(msg)
@test.idempotent_id('08a2a0a8-f1e4-4b34-8e30-e522e836c44e')
def test_distributed_router_creation(self):
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index bbefc25..fda8fc3 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -15,9 +15,9 @@
import netaddr
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
import tempest.test
diff --git a/tempest/api/network/base_security_groups.py b/tempest/api/network/base_security_groups.py
index 6699bf7..1cef2cc 100644
--- a/tempest/api/network/base_security_groups.py
+++ b/tempest/api/network/base_security_groups.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.network import base
+from tempest.common.utils import data_utils
class BaseSecGroupTest(base.BaseNetworkTest):
diff --git a/tempest/api/network/test_dhcp_ipv6.py b/tempest/api/network/test_dhcp_ipv6.py
index 5d798e3..f362f85 100644
--- a/tempest/api/network/test_dhcp_ipv6.py
+++ b/tempest/api/network/test_dhcp_ipv6.py
@@ -17,10 +17,10 @@
import random
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/test_extra_dhcp_options.py b/tempest/api/network/test_extra_dhcp_options.py
index 72ac821..87e3413 100644
--- a/tempest/api/network/test_extra_dhcp_options.py
+++ b/tempest/api/network/test_extra_dhcp_options.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index 57dab5f..f0923d2 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -14,9 +14,9 @@
# under the License.
import netaddr
-from tempest_lib.common.utils import data_utils
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/test_floating_ips_negative.py b/tempest/api/network/test_floating_ips_negative.py
index 8790102..e8624d8 100644
--- a/tempest/api/network/test_floating_ips_negative.py
+++ b/tempest/api/network/test_floating_ips_negative.py
@@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/test_metering_extensions.py b/tempest/api/network/test_metering_extensions.py
index 68bc3cd..ee0dcb0 100644
--- a/tempest/api/network/test_metering_extensions.py
+++ b/tempest/api/network/test_metering_extensions.py
@@ -13,9 +13,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 7a96f34..842a56d 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -16,11 +16,11 @@
import netaddr
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.network import base
from tempest.common import custom_matchers
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/test_networks_negative.py b/tempest/api/network/test_networks_negative.py
index ae530c2..5dc1c21 100644
--- a/tempest/api/network/test_networks_negative.py
+++ b/tempest/api/network/test_networks_negative.py
@@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.network import base
+from tempest.common.utils import data_utils
from tempest import test
@@ -57,3 +57,38 @@
non_exist_id = data_utils.rand_name('network')
self.assertRaises(lib_exc.NotFound, self.client.delete_network,
non_exist_id)
+
+ @test.attr(type=['negative'])
+ @test.idempotent_id('1cc47884-ac52-4415-a31c-e7ce5474a868')
+ def test_update_non_existent_subnet(self):
+ non_exist_id = data_utils.rand_uuid()
+ self.assertRaises(lib_exc.NotFound, self.client.update_subnet,
+ non_exist_id, name='new_name')
+
+ @test.attr(type=['negative'])
+ @test.idempotent_id('a176c859-99fb-42ec-a208-8a85b552a239')
+ def test_delete_non_existent_subnet(self):
+ non_exist_id = data_utils.rand_uuid()
+ self.assertRaises(lib_exc.NotFound,
+ self.client.delete_subnet, non_exist_id)
+
+ @test.attr(type=['negative'])
+ @test.idempotent_id('13d3b106-47e6-4b9b-8d53-dae947f092fe')
+ def test_create_port_on_non_existent_network(self):
+ non_exist_net_id = data_utils.rand_uuid()
+ self.assertRaises(lib_exc.NotFound,
+ self.client.create_port, network_id=non_exist_net_id)
+
+ @test.attr(type=['negative'])
+ @test.idempotent_id('cf8eef21-4351-4f53-adcd-cc5cb1e76b92')
+ def test_update_non_existent_port(self):
+ non_exist_port_id = data_utils.rand_uuid()
+ self.assertRaises(lib_exc.NotFound, self.client.update_port,
+ non_exist_port_id, name='new_name')
+
+ @test.attr(type=['negative'])
+ @test.idempotent_id('49ec2bbd-ac2e-46fd-8054-798e679ff894')
+ def test_delete_non_existent_port(self):
+ non_exist_port_id = data_utils.rand_uuid()
+ self.assertRaises(lib_exc.NotFound,
+ self.client.delete_port, non_exist_port_id)
diff --git a/tempest/api/network/test_ports.py b/tempest/api/network/test_ports.py
index 29600c5..4f54562 100644
--- a/tempest/api/network/test_ports.py
+++ b/tempest/api/network/test_ports.py
@@ -16,11 +16,11 @@
import socket
import netaddr
-from tempest_lib.common.utils import data_utils
from tempest.api.network import base
from tempest.api.network import base_security_groups as sec_base
from tempest.common import custom_matchers
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
@@ -344,8 +344,6 @@
super(PortsAdminExtendedAttrsTestJSON, cls).resource_setup()
cls.network = cls.create_network()
cls.host_id = socket.gethostname()
- cls.tenant = cls.identity_client.get_tenant_by_name(
- CONF.identity.tenant_name)
@test.idempotent_id('8e8569c1-9ac7-44db-8bc1-f5fb2814f29b')
def test_create_port_binding_ext_attr(self):
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index 35072b4..50671d0 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -15,9 +15,9 @@
import netaddr
import six
-from tempest_lib.common.utils import data_utils
from tempest.api.network import base_routers as base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/test_routers_negative.py b/tempest/api/network/test_routers_negative.py
index d2afcba..90da6fd 100644
--- a/tempest/api/network/test_routers_negative.py
+++ b/tempest/api/network/test_routers_negative.py
@@ -14,10 +14,10 @@
# under the License.
import netaddr
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.network import base_routers as base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index 05f0de4..ccc5232 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -14,9 +14,9 @@
# under the License.
import six
-from tempest_lib.common.utils import data_utils
from tempest.api.network import base_security_groups as base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_account_quotas.py b/tempest/api/object_storage/test_account_quotas.py
index bbdf367..78707d8 100644
--- a/tempest/api/object_storage/test_account_quotas.py
+++ b/tempest/api/object_storage/test_account_quotas.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_account_quotas_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py
index e945e1e..2bf331a 100644
--- a/tempest/api/object_storage/test_account_quotas_negative.py
+++ b/tempest/api/object_storage/test_account_quotas_negative.py
@@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py
index ac41148..6bab9b3 100644
--- a/tempest/api/object_storage/test_account_services.py
+++ b/tempest/api/object_storage/test_account_services.py
@@ -16,11 +16,11 @@
import random
from six import moves
-from tempest_lib.common.utils import data_utils
import testtools
from tempest.api.object_storage import base
from tempest.common import custom_matchers
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_container_acl.py b/tempest/api/object_storage/test_container_acl.py
index 4df813d..c1b6711 100644
--- a/tempest/api/object_storage/test_container_acl.py
+++ b/tempest/api/object_storage/test_container_acl.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_container_acl_negative.py b/tempest/api/object_storage/test_container_acl_negative.py
index 1c42e97..3bb47f0 100644
--- a/tempest/api/object_storage/test_container_acl_negative.py
+++ b/tempest/api/object_storage/test_container_acl_negative.py
@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_container_quotas.py b/tempest/api/object_storage/test_container_quotas.py
index 2217d18..c78b4c3 100644
--- a/tempest/api/object_storage/test_container_quotas.py
+++ b/tempest/api/object_storage/test_container_quotas.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_container_staticweb.py b/tempest/api/object_storage/test_container_staticweb.py
index 20452ab..4b4b499 100644
--- a/tempest/api/object_storage/test_container_staticweb.py
+++ b/tempest/api/object_storage/test_container_staticweb.py
@@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
from tempest.common import custom_matchers
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py
index 06e700b..0e39b7e 100644
--- a/tempest/api/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -16,12 +16,12 @@
import time
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
import testtools
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py
index b263050..1c9d582 100644
--- a/tempest/api/object_storage/test_object_expiry.py
+++ b/tempest/api/object_storage/test_object_expiry.py
@@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
import time
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/object_storage/test_object_formpost.py b/tempest/api/object_storage/test_object_formpost.py
index ce587d7..356f560 100644
--- a/tempest/api/object_storage/test_object_formpost.py
+++ b/tempest/api/object_storage/test_object_formpost.py
@@ -17,9 +17,9 @@
import time
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/object_storage/test_object_formpost_negative.py b/tempest/api/object_storage/test_object_formpost_negative.py
index 89deca2..7d9e115 100644
--- a/tempest/api/object_storage/test_object_formpost_negative.py
+++ b/tempest/api/object_storage/test_object_formpost_negative.py
@@ -17,10 +17,10 @@
import time
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/object_storage/test_object_services.py b/tempest/api/object_storage/test_object_services.py
index 3396d8f..2198753 100644
--- a/tempest/api/object_storage/test_object_services.py
+++ b/tempest/api/object_storage/test_object_services.py
@@ -21,10 +21,10 @@
import six
from six import moves
-from tempest_lib.common.utils import data_utils
from tempest.api.object_storage import base
from tempest.common import custom_matchers
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_object_slo.py b/tempest/api/object_storage/test_object_slo.py
index 6fc7821..9aa1b82 100644
--- a/tempest/api/object_storage/test_object_slo.py
+++ b/tempest/api/object_storage/test_object_slo.py
@@ -15,11 +15,11 @@
import hashlib
import json
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
from tempest.common import custom_matchers
+from tempest.common.utils import data_utils
from tempest import test
# Each segment, except for the final one, must be at least 1 megabyte
diff --git a/tempest/api/object_storage/test_object_temp_url.py b/tempest/api/object_storage/test_object_temp_url.py
index 8748269..3d28f6e 100644
--- a/tempest/api/object_storage/test_object_temp_url.py
+++ b/tempest/api/object_storage/test_object_temp_url.py
@@ -17,9 +17,9 @@
import time
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/object_storage/test_object_temp_url_negative.py b/tempest/api/object_storage/test_object_temp_url_negative.py
index 233cced..6d06143 100644
--- a/tempest/api/object_storage/test_object_temp_url_negative.py
+++ b/tempest/api/object_storage/test_object_temp_url_negative.py
@@ -17,10 +17,10 @@
import time
from six.moves.urllib import parse as urlparse
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/object_storage/test_object_version.py b/tempest/api/object_storage/test_object_version.py
index 923166a..24ec3f5 100644
--- a/tempest/api/object_storage/test_object_version.py
+++ b/tempest/api/object_storage/test_object_version.py
@@ -15,9 +15,8 @@
import testtools
-from tempest_lib.common.utils import data_utils
-
from tempest.api.object_storage import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index af97794..266f726 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -13,10 +13,10 @@
import os.path
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
import yaml
+from tempest.common.utils import data_utils
from tempest import config
import tempest.test
diff --git a/tempest/api/orchestration/stacks/test_environment.py b/tempest/api/orchestration/stacks/test_environment.py
index ecb824b..0416bc7 100644
--- a/tempest/api/orchestration/stacks/test_environment.py
+++ b/tempest/api/orchestration/stacks/test_environment.py
@@ -12,9 +12,8 @@
import logging
-from tempest_lib.common.utils import data_utils
-
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_limits.py b/tempest/api/orchestration/stacks/test_limits.py
index 4291d76..bb5b89d 100644
--- a/tempest/api/orchestration/stacks/test_limits.py
+++ b/tempest/api/orchestration/stacks/test_limits.py
@@ -12,10 +12,10 @@
import logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index a0706ff..b27d6c9 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -14,10 +14,10 @@
import logging
import netaddr
-from tempest_lib.common.utils import data_utils
from tempest.api.orchestration import base
from tempest import clients
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
from tempest import test
@@ -183,7 +183,7 @@
def test_created_server(self):
"""Verifies created sever."""
server_id = self.test_resources.get('Server')['physical_resource_id']
- server = self.servers_client.get_server(server_id)
+ server = self.servers_client.show_server(server_id)
self.assertEqual(self.keypair_name, server['key_name'])
self.assertEqual('ACTIVE', server['status'])
network = server['addresses'][self.neutron_basic_template['resources'][
diff --git a/tempest/api/orchestration/stacks/test_non_empty_stack.py b/tempest/api/orchestration/stacks/test_non_empty_stack.py
index bffc306..494b6fd 100644
--- a/tempest/api/orchestration/stacks/test_non_empty_stack.py
+++ b/tempest/api/orchestration/stacks/test_non_empty_stack.py
@@ -12,9 +12,8 @@
import logging
-from tempest_lib.common.utils import data_utils
-
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
index c79c3c3..6a04dbd 100644
--- a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
+++ b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
@@ -13,9 +13,8 @@
import logging
-from tempest_lib.common.utils import data_utils
-
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_soft_conf.py b/tempest/api/orchestration/stacks/test_soft_conf.py
index 13f0a6c..34d93e4 100644
--- a/tempest/api/orchestration/stacks/test_soft_conf.py
+++ b/tempest/api/orchestration/stacks/test_soft_conf.py
@@ -11,10 +11,10 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_stacks.py b/tempest/api/orchestration/stacks/test_stacks.py
index 9ce8ebeb..abec906 100644
--- a/tempest/api/orchestration/stacks/test_stacks.py
+++ b/tempest/api/orchestration/stacks/test_stacks.py
@@ -11,9 +11,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_swift_resources.py b/tempest/api/orchestration/stacks/test_swift_resources.py
index dadabfa..30166df 100644
--- a/tempest/api/orchestration/stacks/test_swift_resources.py
+++ b/tempest/api/orchestration/stacks/test_swift_resources.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_templates.py b/tempest/api/orchestration/stacks/test_templates.py
index 5ccfdfb..9154175 100644
--- a/tempest/api/orchestration/stacks/test_templates.py
+++ b/tempest/api/orchestration/stacks/test_templates.py
@@ -10,9 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/orchestration/stacks/test_volumes.py b/tempest/api/orchestration/stacks/test_volumes.py
index f40ca02..d8f117e 100644
--- a/tempest/api/orchestration/stacks/test_volumes.py
+++ b/tempest/api/orchestration/stacks/test_volumes.py
@@ -12,10 +12,10 @@
import logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/telemetry/base.py b/tempest/api/telemetry/base.py
index cce8e2a..3be807b 100644
--- a/tempest/api/telemetry/base.py
+++ b/tempest/api/telemetry/base.py
@@ -13,9 +13,9 @@
import time
from oslo_utils import timeutils
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
import tempest.test
diff --git a/tempest/api/telemetry/test_telemetry_alarming_api.py b/tempest/api/telemetry/test_telemetry_alarming_api.py
index 99b5c37..13da9cb 100644
--- a/tempest/api/telemetry/test_telemetry_alarming_api.py
+++ b/tempest/api/telemetry/test_telemetry_alarming_api.py
@@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.telemetry import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index b8047b2..c7e989d 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -11,9 +11,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index b885f7d..c860b4b 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index ec8e040..1a48204 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -13,9 +13,9 @@
# under the License.
import six
-from tempest_lib.common.utils import data_utils
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import test
QUOTA_KEYS = ['gigabytes', 'snapshots', 'volumes']
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index ea9864e..b79c185 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
index 2feb062..c840697 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index a70a940..e49e8b2 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/volume/admin/test_volumes_actions.py b/tempest/api/volume/admin/test_volumes_actions.py
index 8a30a10..4288d58 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils as utils
-
from tempest.api.volume import base
+from tempest.common.utils import data_utils as utils
from tempest import test
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 8b85da3..2c545a7 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -14,9 +14,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 7f56b18..f8ae5eb 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -14,10 +14,10 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.common import fixed_network
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
import tempest.test
diff --git a/tempest/api/volume/test_qos.py b/tempest/api/volume/test_qos.py
index 863a698..84fd7f6 100644
--- a/tempest/api/volume/test_qos.py
+++ b/tempest/api/volume/test_qos.py
@@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils as utils
-
from tempest.api.volume import base
+from tempest.common.utils import data_utils as utils
from tempest import test
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index 375d34a..0ebcf3a 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
import testtools
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 8337f8d..29c21ed 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
from testtools import matchers
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index da0d5aa..3847877 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -16,10 +16,10 @@
import operator
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from testtools import matchers
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import test
LOG = logging.getLogger(__name__)
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index b591a1a..da8f52a 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -15,10 +15,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import test
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 550c3b6..340f019 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -11,9 +11,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py
index 77f8552..b604360 100644
--- a/tempest/api/volume/test_volumes_snapshots_negative.py
+++ b/tempest/api/volume/test_volumes_snapshots_negative.py
@@ -12,10 +12,10 @@
import uuid
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.api.volume import base
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
diff --git a/tempest/api_schema/response/compute/v2_1/fixed_ips.py b/tempest/api_schema/response/compute/v2_1/fixed_ips.py
index 6d5ba67..3586b70 100644
--- a/tempest/api_schema/response/compute/v2_1/fixed_ips.py
+++ b/tempest/api_schema/response/compute/v2_1/fixed_ips.py
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest.api_schema.response.compute.v2_1 import parameter_types
+
get_fixed_ip = {
'status_code': [200],
'response_body': {
@@ -20,10 +22,7 @@
'fixed_ip': {
'type': 'object',
'properties': {
- 'address': {
- 'type': 'string',
- 'format': 'ip-address'
- },
+ 'address': parameter_types.ip_address,
'cidr': {'type': 'string'},
'host': {'type': 'string'},
'hostname': {'type': 'string'}
diff --git a/tempest/api_schema/response/compute/v2_1/floating_ips.py b/tempest/api_schema/response/compute/v2_1/floating_ips.py
index 28dd40a..3551681 100644
--- a/tempest/api_schema/response/compute/v2_1/floating_ips.py
+++ b/tempest/api_schema/response/compute/v2_1/floating_ips.py
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest.api_schema.response.compute.v2_1 import parameter_types
+
common_floating_ip_info = {
'type': 'object',
'properties': {
@@ -21,14 +23,8 @@
'id': {'type': ['integer', 'string']},
'pool': {'type': ['string', 'null']},
'instance_id': {'type': ['string', 'null']},
- 'ip': {
- 'type': 'string',
- 'format': 'ip-address'
- },
- 'fixed_ip': {
- 'type': ['string', 'null'],
- 'format': 'ip-address'
- }
+ 'ip': parameter_types.ip_address,
+ 'fixed_ip': parameter_types.ip_address
},
'additionalProperties': False,
'required': ['id', 'pool', 'instance_id',
@@ -131,18 +127,12 @@
'items': {
'type': 'object',
'properties': {
- 'address': {
- 'type': 'string',
- 'format': 'ip-address'
- },
+ 'address': parameter_types.ip_address,
'instance_uuid': {'type': ['string', 'null']},
'interface': {'type': ['string', 'null']},
'pool': {'type': ['string', 'null']},
'project_id': {'type': ['string', 'null']},
- 'fixed_ip': {
- 'type': ['string', 'null'],
- 'format': 'ip-address'
- }
+ 'fixed_ip': parameter_types.ip_address
},
'additionalProperties': False,
# NOTE: fixed_ip is introduced after JUNO release,
diff --git a/tempest/api_schema/response/compute/v2_1/hypervisors.py b/tempest/api_schema/response/compute/v2_1/hypervisors.py
index e24389d..05901b6 100644
--- a/tempest/api_schema/response/compute/v2_1/hypervisors.py
+++ b/tempest/api_schema/response/compute/v2_1/hypervisors.py
@@ -14,6 +14,8 @@
import copy
+from tempest.api_schema.response.compute.v2_1 import parameter_types
+
get_hypervisor_statistics = {
'status_code': [200],
'response_body': {
@@ -57,10 +59,7 @@
'cpu_info': {'type': 'string'},
'current_workload': {'type': 'integer'},
'disk_available_least': {'type': ['integer', 'null']},
- 'host_ip': {
- 'type': 'string',
- 'format': 'ip-address'
- },
+ 'host_ip': parameter_types.ip_address,
'free_disk_gb': {'type': 'integer'},
'free_ram_mb': {'type': 'integer'},
'hypervisor_hostname': {'type': 'string'},
diff --git a/tempest/api_schema/response/compute/v2_1/interfaces.py b/tempest/api_schema/response/compute/v2_1/interfaces.py
index b18fba6..130775b 100644
--- a/tempest/api_schema/response/compute/v2_1/interfaces.py
+++ b/tempest/api_schema/response/compute/v2_1/interfaces.py
@@ -27,10 +27,7 @@
'type': 'string',
'format': 'uuid'
},
- 'ip_address': {
- 'type': 'string',
- 'format': 'ipv4'
- }
+ 'ip_address': parameter_types.ip_address
},
'additionalProperties': False,
'required': ['subnet_id', 'ip_address']
diff --git a/tempest/api_schema/response/compute/v2_1/parameter_types.py b/tempest/api_schema/response/compute/v2_1/parameter_types.py
index 7b4264c..07cc890 100644
--- a/tempest/api_schema/response/compute/v2_1/parameter_types.py
+++ b/tempest/api_schema/response/compute/v2_1/parameter_types.py
@@ -33,14 +33,27 @@
'pattern': '(?:[a-f0-9]{2}:){5}[a-f0-9]{2}'
}
+ip_address = {
+ 'oneOf': [
+ {
+ 'type': 'string',
+ 'oneOf': [
+ {'format': 'ipv4'},
+ {'format': 'ipv6'}
+ ]
+ },
+ {'type': 'null'}
+ ]
+}
+
access_ip_v4 = {
'type': 'string',
- 'anyOf': [{'format': 'ipv4'}, {'enum': ['']}]
+ 'oneOf': [{'format': 'ipv4'}, {'enum': ['']}]
}
access_ip_v6 = {
'type': 'string',
- 'anyOf': [{'format': 'ipv6'}, {'enum': ['']}]
+ 'oneOf': [{'format': 'ipv6'}, {'enum': ['']}]
}
addresses = {
@@ -55,7 +68,7 @@
'version': {'type': 'integer'},
'addr': {
'type': 'string',
- 'anyOf': [
+ 'oneOf': [
{'format': 'ipv4'},
{'format': 'ipv6'}
]
diff --git a/tempest/clients.py b/tempest/clients.py
index f0aedd5..ab6bd43 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -25,117 +25,117 @@
from tempest import exceptions
from tempest import manager
from tempest.services.baremetal.v1.json.baremetal_client import \
- BaremetalClientJSON
+ BaremetalClient
from tempest.services import botoclients
from tempest.services.compute.json.agents_client import \
- AgentsClientJSON
+ AgentsClient
from tempest.services.compute.json.aggregates_client import \
- AggregatesClientJSON
+ AggregatesClient
from tempest.services.compute.json.availability_zone_client import \
- AvailabilityZoneClientJSON
+ AvailabilityZoneClient
from tempest.services.compute.json.baremetal_nodes_client import \
- BaremetalNodesClientJSON
+ BaremetalNodesClient
from tempest.services.compute.json.certificates_client import \
- CertificatesClientJSON
+ CertificatesClient
from tempest.services.compute.json.extensions_client import \
- ExtensionsClientJSON
-from tempest.services.compute.json.fixed_ips_client import FixedIPsClientJSON
-from tempest.services.compute.json.flavors_client import FlavorsClientJSON
+ ExtensionsClient
+from tempest.services.compute.json.fixed_ips_client import FixedIPsClient
+from tempest.services.compute.json.flavors_client import FlavorsClient
from tempest.services.compute.json.floating_ips_client import \
- FloatingIPsClientJSON
-from tempest.services.compute.json.hosts_client import HostsClientJSON
+ FloatingIPsClient
+from tempest.services.compute.json.hosts_client import HostsClient
from tempest.services.compute.json.hypervisor_client import \
- HypervisorClientJSON
-from tempest.services.compute.json.images_client import ImagesClientJSON
+ HypervisorClient
+from tempest.services.compute.json.images_client import ImagesClient
from tempest.services.compute.json.instance_usage_audit_log_client import \
- InstanceUsagesAuditLogClientJSON
+ InstanceUsagesAuditLogClient
from tempest.services.compute.json.interfaces_client import \
- InterfacesClientJSON
-from tempest.services.compute.json.keypairs_client import KeyPairsClientJSON
-from tempest.services.compute.json.limits_client import LimitsClientJSON
+ InterfacesClient
+from tempest.services.compute.json.keypairs_client import KeyPairsClient
+from tempest.services.compute.json.limits_client import LimitsClient
from tempest.services.compute.json.migrations_client import \
- MigrationsClientJSON
-from tempest.services.compute.json.networks_client import NetworksClientJSON
+ MigrationsClient
+from tempest.services.compute.json.networks_client import NetworksClient
from tempest.services.compute.json.quota_classes_client import \
- QuotaClassesClientJSON
-from tempest.services.compute.json.quotas_client import QuotasClientJSON
+ QuotaClassesClient
+from tempest.services.compute.json.quotas_client import QuotasClient
from tempest.services.compute.json.security_group_default_rules_client import \
- SecurityGroupDefaultRulesClientJSON
+ SecurityGroupDefaultRulesClient
from tempest.services.compute.json.security_groups_client import \
- SecurityGroupsClientJSON
-from tempest.services.compute.json.servers_client import ServersClientJSON
-from tempest.services.compute.json.services_client import ServicesClientJSON
+ SecurityGroupsClient
+from tempest.services.compute.json.servers_client import ServersClient
+from tempest.services.compute.json.services_client import ServicesClient
from tempest.services.compute.json.tenant_networks_client import \
- TenantNetworksClientJSON
+ TenantNetworksClient
from tempest.services.compute.json.tenant_usages_client import \
- TenantUsagesClientJSON
+ TenantUsagesClient
from tempest.services.compute.json.volumes_extensions_client import \
- VolumesExtensionsClientJSON
+ VolumesExtensionsClient
from tempest.services.data_processing.v1_1.data_processing_client import \
DataProcessingClient
from tempest.services.database.json.flavors_client import \
- DatabaseFlavorsClientJSON
+ DatabaseFlavorsClient
from tempest.services.database.json.limits_client import \
- DatabaseLimitsClientJSON
+ DatabaseLimitsClient
from tempest.services.database.json.versions_client import \
- DatabaseVersionsClientJSON
+ DatabaseVersionsClient
from tempest.services.identity.v2.json.identity_client import \
- IdentityClientJSON
+ IdentityClient
from tempest.services.identity.v3.json.credentials_client import \
- CredentialsClientJSON
+ CredentialsClient
from tempest.services.identity.v3.json.endpoints_client import \
- EndPointClientJSON
+ EndPointClient
from tempest.services.identity.v3.json.identity_client import \
- IdentityV3ClientJSON
-from tempest.services.identity.v3.json.policy_client import PolicyClientJSON
-from tempest.services.identity.v3.json.region_client import RegionClientJSON
+ IdentityV3Client
+from tempest.services.identity.v3.json.policy_client import PolicyClient
+from tempest.services.identity.v3.json.region_client import RegionClient
from tempest.services.identity.v3.json.service_client import \
- ServiceClientJSON
-from tempest.services.image.v1.json.image_client import ImageClientJSON
-from tempest.services.image.v2.json.image_client import ImageClientV2JSON
+ ServiceClient
+from tempest.services.image.v1.json.image_client import ImageClient
+from tempest.services.image.v2.json.image_client import ImageClientV2
from tempest.services.messaging.json.messaging_client import \
- MessagingClientJSON
-from tempest.services.network.json.network_client import NetworkClientJSON
+ MessagingClient
+from tempest.services.network.json.network_client import NetworkClient
from tempest.services.object_storage.account_client import AccountClient
from tempest.services.object_storage.container_client import ContainerClient
from tempest.services.object_storage.object_client import ObjectClient
from tempest.services.orchestration.json.orchestration_client import \
OrchestrationClient
from tempest.services.telemetry.json.telemetry_client import \
- TelemetryClientJSON
+ TelemetryClient
from tempest.services.volume.json.admin.volume_hosts_client import \
- VolumeHostsClientJSON
+ VolumeHostsClient
from tempest.services.volume.json.admin.volume_quotas_client import \
- VolumeQuotasClientJSON
+ VolumeQuotasClient
from tempest.services.volume.json.admin.volume_services_client import \
- VolumesServicesClientJSON
+ VolumesServicesClient
from tempest.services.volume.json.admin.volume_types_client import \
- VolumeTypesClientJSON
+ VolumeTypesClient
from tempest.services.volume.json.availability_zone_client import \
- VolumeAvailabilityZoneClientJSON
-from tempest.services.volume.json.backups_client import BackupsClientJSON
+ VolumeAvailabilityZoneClient
+from tempest.services.volume.json.backups_client import BackupsClient
from tempest.services.volume.json.extensions_client import \
- ExtensionsClientJSON as VolumeExtensionClientJSON
-from tempest.services.volume.json.qos_client import QosSpecsClientJSON
-from tempest.services.volume.json.snapshots_client import SnapshotsClientJSON
-from tempest.services.volume.json.volumes_client import VolumesClientJSON
+ ExtensionsClient as VolumeExtensionClient
+from tempest.services.volume.json.qos_client import QosSpecsClient
+from tempest.services.volume.json.snapshots_client import SnapshotsClient
+from tempest.services.volume.json.volumes_client import VolumesClient
from tempest.services.volume.v2.json.admin.volume_hosts_client import \
- VolumeHostsV2ClientJSON
+ VolumeHostsV2Client
from tempest.services.volume.v2.json.admin.volume_quotas_client import \
VolumeQuotasV2Client
from tempest.services.volume.v2.json.admin.volume_services_client import \
- VolumesServicesV2ClientJSON
+ VolumesServicesV2Client
from tempest.services.volume.v2.json.admin.volume_types_client import \
- VolumeTypesV2ClientJSON
+ VolumeTypesV2Client
from tempest.services.volume.v2.json.availability_zone_client import \
- VolumeV2AvailabilityZoneClientJSON
-from tempest.services.volume.v2.json.backups_client import BackupsClientV2JSON
+ VolumeV2AvailabilityZoneClient
+from tempest.services.volume.v2.json.backups_client import BackupsClientV2
from tempest.services.volume.v2.json.extensions_client import \
- ExtensionsV2ClientJSON as VolumeV2ExtensionClientJSON
-from tempest.services.volume.v2.json.qos_client import QosSpecsV2ClientJSON
+ ExtensionsV2Client as VolumeV2ExtensionClient
+from tempest.services.volume.v2.json.qos_client import QosSpecsV2Client
from tempest.services.volume.v2.json.snapshots_client import \
- SnapshotsV2ClientJSON
-from tempest.services.volume.v2.json.volumes_client import VolumesV2ClientJSON
+ SnapshotsV2Client
+from tempest.services.volume.v2.json.volumes_client import VolumesV2Client
CONF = config.CONF
LOG = logging.getLogger(__name__)
@@ -171,13 +171,13 @@
self._set_volume_clients()
self._set_object_storage_clients()
- self.baremetal_client = BaremetalClientJSON(
+ self.baremetal_client = BaremetalClient(
self.auth_provider,
CONF.baremetal.catalog_type,
CONF.identity.region,
endpoint_type=CONF.baremetal.endpoint_type,
**self.default_params_with_timeout_values)
- self.network_client = NetworkClientJSON(
+ self.network_client = NetworkClient(
self.auth_provider,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
@@ -185,20 +185,20 @@
build_interval=CONF.network.build_interval,
build_timeout=CONF.network.build_timeout,
**self.default_params)
- self.messaging_client = MessagingClientJSON(
+ self.messaging_client = MessagingClient(
self.auth_provider,
CONF.messaging.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
if CONF.service_available.ceilometer:
- self.telemetry_client = TelemetryClientJSON(
+ self.telemetry_client = TelemetryClient(
self.auth_provider,
CONF.telemetry.catalog_type,
CONF.identity.region,
endpoint_type=CONF.telemetry.endpoint_type,
**self.default_params_with_timeout_values)
if CONF.service_available.glance:
- self.image_client = ImageClientJSON(
+ self.image_client = ImageClient(
self.auth_provider,
CONF.image.catalog_type,
CONF.image.region or CONF.identity.region,
@@ -206,7 +206,7 @@
build_interval=CONF.image.build_interval,
build_timeout=CONF.image.build_timeout,
**self.default_params)
- self.image_client_v2 = ImageClientV2JSON(
+ self.image_client_v2 = ImageClientV2(
self.auth_provider,
CONF.image.catalog_type,
CONF.image.region or CONF.identity.region,
@@ -250,51 +250,51 @@
}
params.update(self.default_params)
- self.agents_client = AgentsClientJSON(self.auth_provider, **params)
- self.networks_client = NetworksClientJSON(self.auth_provider, **params)
- self.migrations_client = MigrationsClientJSON(self.auth_provider,
- **params)
+ self.agents_client = AgentsClient(self.auth_provider, **params)
+ self.networks_client = NetworksClient(self.auth_provider, **params)
+ self.migrations_client = MigrationsClient(self.auth_provider,
+ **params)
self.security_group_default_rules_client = (
- SecurityGroupDefaultRulesClientJSON(self.auth_provider, **params))
- self.certificates_client = CertificatesClientJSON(self.auth_provider,
- **params)
- self.servers_client = ServersClientJSON(
+ SecurityGroupDefaultRulesClient(self.auth_provider, **params))
+ self.certificates_client = CertificatesClient(self.auth_provider,
+ **params)
+ self.servers_client = ServersClient(
self.auth_provider,
enable_instance_password=CONF.compute_feature_enabled
.enable_instance_password,
**params)
- self.limits_client = LimitsClientJSON(self.auth_provider, **params)
- self.images_client = ImagesClientJSON(self.auth_provider, **params)
- self.keypairs_client = KeyPairsClientJSON(self.auth_provider, **params)
- self.quotas_client = QuotasClientJSON(self.auth_provider, **params)
- self.quota_classes_client = QuotaClassesClientJSON(self.auth_provider,
- **params)
- self.flavors_client = FlavorsClientJSON(self.auth_provider, **params)
- self.extensions_client = ExtensionsClientJSON(self.auth_provider,
- **params)
- self.floating_ips_client = FloatingIPsClientJSON(self.auth_provider,
- **params)
- self.security_groups_client = SecurityGroupsClientJSON(
+ self.limits_client = LimitsClient(self.auth_provider, **params)
+ self.images_client = ImagesClient(self.auth_provider, **params)
+ self.keypairs_client = KeyPairsClient(self.auth_provider, **params)
+ self.quotas_client = QuotasClient(self.auth_provider, **params)
+ self.quota_classes_client = QuotaClassesClient(self.auth_provider,
+ **params)
+ self.flavors_client = FlavorsClient(self.auth_provider, **params)
+ self.extensions_client = ExtensionsClient(self.auth_provider,
+ **params)
+ self.floating_ips_client = FloatingIPsClient(self.auth_provider,
+ **params)
+ self.security_groups_client = SecurityGroupsClient(
self.auth_provider, **params)
- self.interfaces_client = InterfacesClientJSON(self.auth_provider,
- **params)
- self.fixed_ips_client = FixedIPsClientJSON(self.auth_provider,
- **params)
- self.availability_zone_client = AvailabilityZoneClientJSON(
+ self.interfaces_client = InterfacesClient(self.auth_provider,
+ **params)
+ self.fixed_ips_client = FixedIPsClient(self.auth_provider,
+ **params)
+ self.availability_zone_client = AvailabilityZoneClient(
self.auth_provider, **params)
- self.aggregates_client = AggregatesClientJSON(self.auth_provider,
- **params)
- self.services_client = ServicesClientJSON(self.auth_provider, **params)
- self.tenant_usages_client = TenantUsagesClientJSON(self.auth_provider,
- **params)
- self.hosts_client = HostsClientJSON(self.auth_provider, **params)
- self.hypervisor_client = HypervisorClientJSON(self.auth_provider,
- **params)
+ self.aggregates_client = AggregatesClient(self.auth_provider,
+ **params)
+ self.services_client = ServicesClient(self.auth_provider, **params)
+ self.tenant_usages_client = TenantUsagesClient(self.auth_provider,
+ **params)
+ self.hosts_client = HostsClient(self.auth_provider, **params)
+ self.hypervisor_client = HypervisorClient(self.auth_provider,
+ **params)
self.instance_usages_audit_log_client = \
- InstanceUsagesAuditLogClientJSON(self.auth_provider, **params)
+ InstanceUsagesAuditLogClient(self.auth_provider, **params)
self.tenant_networks_client = \
- TenantNetworksClientJSON(self.auth_provider, **params)
- self.baremetal_nodes_client = BaremetalNodesClientJSON(
+ TenantNetworksClient(self.auth_provider, **params)
+ self.baremetal_nodes_client = BaremetalNodesClient(
self.auth_provider, **params)
# NOTE: The following client needs special timeout values because
@@ -304,22 +304,22 @@
'build_interval': CONF.volume.build_interval,
'build_timeout': CONF.volume.build_timeout
})
- self.volumes_extensions_client = VolumesExtensionsClientJSON(
+ self.volumes_extensions_client = VolumesExtensionsClient(
self.auth_provider, default_volume_size=CONF.volume.volume_size,
**params_volume)
def _set_database_clients(self):
- self.database_flavors_client = DatabaseFlavorsClientJSON(
+ self.database_flavors_client = DatabaseFlavorsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
- self.database_limits_client = DatabaseLimitsClientJSON(
+ self.database_limits_client = DatabaseLimitsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
**self.default_params_with_timeout_values)
- self.database_versions_client = DatabaseVersionsClientJSON(
+ self.database_versions_client = DatabaseVersionsClient(
self.auth_provider,
CONF.database.catalog_type,
CONF.identity.region,
@@ -333,17 +333,17 @@
}
params.update(self.default_params_with_timeout_values)
- self.identity_client = IdentityClientJSON(self.auth_provider,
- **params)
- self.identity_v3_client = IdentityV3ClientJSON(self.auth_provider,
- **params)
- self.endpoints_client = EndPointClientJSON(self.auth_provider,
+ self.identity_client = IdentityClient(self.auth_provider,
+ **params)
+ self.identity_v3_client = IdentityV3Client(self.auth_provider,
**params)
- self.service_client = ServiceClientJSON(self.auth_provider, **params)
- self.policy_client = PolicyClientJSON(self.auth_provider, **params)
- self.region_client = RegionClientJSON(self.auth_provider, **params)
- self.credentials_client = CredentialsClientJSON(self.auth_provider,
- **params)
+ self.endpoints_client = EndPointClient(self.auth_provider,
+ **params)
+ self.service_client = ServiceClient(self.auth_provider, **params)
+ self.policy_client = PolicyClient(self.auth_provider, **params)
+ self.region_client = RegionClient(self.auth_provider, **params)
+ self.credentials_client = CredentialsClient(self.auth_provider,
+ **params)
# Token clients do not use the catalog. They only need default_params.
# They read auth_url, so they should only be set if the corresponding
# API version is marked as enabled
@@ -372,46 +372,46 @@
}
params.update(self.default_params)
- self.volume_qos_client = QosSpecsClientJSON(self.auth_provider,
- **params)
- self.volume_qos_v2_client = QosSpecsV2ClientJSON(
+ self.volume_qos_client = QosSpecsClient(self.auth_provider,
+ **params)
+ self.volume_qos_v2_client = QosSpecsV2Client(
self.auth_provider, **params)
- self.volume_services_v2_client = VolumesServicesV2ClientJSON(
+ self.volume_services_v2_client = VolumesServicesV2Client(
self.auth_provider, **params)
- self.backups_client = BackupsClientJSON(self.auth_provider, **params)
- self.backups_v2_client = BackupsClientV2JSON(self.auth_provider,
+ self.backups_client = BackupsClient(self.auth_provider, **params)
+ self.backups_v2_client = BackupsClientV2(self.auth_provider,
+ **params)
+ self.snapshots_client = SnapshotsClient(self.auth_provider,
+ **params)
+ self.snapshots_v2_client = SnapshotsV2Client(self.auth_provider,
**params)
- self.snapshots_client = SnapshotsClientJSON(self.auth_provider,
- **params)
- self.snapshots_v2_client = SnapshotsV2ClientJSON(self.auth_provider,
- **params)
- self.volumes_client = VolumesClientJSON(
+ self.volumes_client = VolumesClient(
self.auth_provider, default_volume_size=CONF.volume.volume_size,
**params)
- self.volumes_v2_client = VolumesV2ClientJSON(
+ self.volumes_v2_client = VolumesV2Client(
self.auth_provider, default_volume_size=CONF.volume.volume_size,
**params)
- self.volume_types_client = VolumeTypesClientJSON(self.auth_provider,
- **params)
- self.volume_services_client = VolumesServicesClientJSON(
+ self.volume_types_client = VolumeTypesClient(self.auth_provider,
+ **params)
+ self.volume_services_client = VolumesServicesClient(
self.auth_provider, **params)
- self.volume_hosts_client = VolumeHostsClientJSON(self.auth_provider,
- **params)
- self.volume_hosts_v2_client = VolumeHostsV2ClientJSON(
+ self.volume_hosts_client = VolumeHostsClient(self.auth_provider,
+ **params)
+ self.volume_hosts_v2_client = VolumeHostsV2Client(
self.auth_provider, **params)
- self.volume_quotas_client = VolumeQuotasClientJSON(self.auth_provider,
- **params)
+ self.volume_quotas_client = VolumeQuotasClient(self.auth_provider,
+ **params)
self.volume_quotas_v2_client = VolumeQuotasV2Client(self.auth_provider,
**params)
- self.volumes_extension_client = VolumeExtensionClientJSON(
+ self.volumes_extension_client = VolumeExtensionClient(
self.auth_provider, **params)
- self.volumes_v2_extension_client = VolumeV2ExtensionClientJSON(
+ self.volumes_v2_extension_client = VolumeV2ExtensionClient(
self.auth_provider, **params)
self.volume_availability_zone_client = \
- VolumeAvailabilityZoneClientJSON(self.auth_provider, **params)
+ VolumeAvailabilityZoneClient(self.auth_provider, **params)
self.volume_v2_availability_zone_client = \
- VolumeV2AvailabilityZoneClientJSON(self.auth_provider, **params)
- self.volume_types_v2_client = VolumeTypesV2ClientJSON(
+ VolumeV2AvailabilityZoneClient(self.auth_provider, **params)
+ self.volume_types_v2_client = VolumeTypesV2Client(
self.auth_provider, **params)
def _set_object_storage_clients(self):
diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py
index fbfbbb7..0360146 100755
--- a/tempest/cmd/account_generator.py
+++ b/tempest/cmd/account_generator.py
@@ -128,7 +128,7 @@
'build_interval': CONF.compute.build_interval,
'build_timeout': CONF.compute.build_timeout
}
- identity_admin = identity_client.IdentityClientJSON(
+ identity_admin = identity_client.IdentityClient(
_auth,
CONF.identity.catalog_type,
CONF.identity.region,
@@ -138,7 +138,7 @@
network_admin = None
if (CONF.service_available.neutron and
CONF.auth.create_isolated_networks):
- network_admin = network_client.NetworkClientJSON(
+ network_admin = network_client.NetworkClient(
_auth,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 5871628..f091cd3 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -188,25 +188,25 @@
}
_auth = auth.KeystoneV2AuthProvider(
_creds, CONF.identity.uri, **auth_provider_params)
- self.identity = identity_client.IdentityClientJSON(
+ self.identity = identity_client.IdentityClient(
_auth,
CONF.identity.catalog_type,
CONF.identity.region,
endpoint_type='adminURL',
**default_params_with_timeout_values)
- self.servers = servers_client.ServersClientJSON(_auth,
- **compute_params)
- self.flavors = flavors_client.FlavorsClientJSON(_auth,
- **compute_params)
- self.floating_ips = floating_ips_client.FloatingIPsClientJSON(
+ self.servers = servers_client.ServersClient(_auth,
+ **compute_params)
+ self.flavors = flavors_client.FlavorsClient(_auth,
+ **compute_params)
+ self.floating_ips = floating_ips_client.FloatingIPsClient(
_auth, **compute_params)
- self.secgroups = security_groups_client.SecurityGroupsClientJSON(
+ self.secgroups = security_groups_client.SecurityGroupsClient(
_auth, **compute_params)
self.objects = object_client.ObjectClient(_auth,
**object_storage_params)
self.containers = container_client.ContainerClient(
_auth, **object_storage_params)
- self.images = image_client.ImageClientV2JSON(
+ self.images = image_client.ImageClientV2(
_auth,
CONF.image.catalog_type,
CONF.image.region or CONF.identity.region,
@@ -214,13 +214,13 @@
build_interval=CONF.image.build_interval,
build_timeout=CONF.image.build_timeout,
**default_params)
- self.telemetry = telemetry_client.TelemetryClientJSON(
+ self.telemetry = telemetry_client.TelemetryClient(
_auth,
CONF.telemetry.catalog_type,
CONF.identity.region,
endpoint_type=CONF.telemetry.endpoint_type,
**default_params_with_timeout_values)
- self.volumes = volumes_client.VolumesClientJSON(
+ self.volumes = volumes_client.VolumesClient(
_auth,
CONF.volume.catalog_type,
CONF.volume.region or CONF.identity.region,
@@ -228,7 +228,7 @@
build_interval=CONF.volume.build_interval,
build_timeout=CONF.volume.build_timeout,
**default_params)
- self.networks = network_client.NetworkClientJSON(
+ self.networks = network_client.NetworkClient(
_auth,
CONF.network.catalog_type,
CONF.network.region or CONF.identity.region,
@@ -453,7 +453,7 @@
found,
"Couldn't find expected server %s" % server['name'])
- found = client.servers.get_server(found['id'])
+ found = client.servers.show_server(found['id'])
# validate neutron is enabled and ironic disabled:
if (CONF.service_available.neutron and
not CONF.baremetal.driver_enabled):
diff --git a/tempest/cmd/main.py b/tempest/cmd/main.py
new file mode 100644
index 0000000..762e982
--- /dev/null
+++ b/tempest/cmd/main.py
@@ -0,0 +1,52 @@
+# Copyright 2015 Dell Inc.
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import logging
+import sys
+
+from cliff import app
+from cliff import commandmanager
+
+TEMPEST_CLI_VERSION = '0.1'
+
+
+class Main(app.App):
+
+ log = logging.getLogger(__name__)
+
+ def __init__(self):
+ super(Main, self).__init__(
+ description='Tempest cli application',
+ version=TEMPEST_CLI_VERSION,
+ command_manager=commandmanager.CommandManager('tempest.cm'),
+ )
+
+ def initialize_app(self, argv):
+ self.log.debug('tempest initialize_app')
+
+ def prepare_to_run_command(self, cmd):
+ self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__)
+
+ def clean_up(self, cmd, result, err):
+ self.log.debug('tempest clean_up %s', cmd.__class__.__name__)
+ if err:
+ self.log.debug('tempest got an error: %s', err)
+
+
+def main(argv=sys.argv[1:]):
+ the_app = Main()
+ return the_app.run(argv)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py
index 461097f..2b7e0db 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -98,20 +98,17 @@
@six.add_metaclass(abc.ABCMeta)
class CredentialProvider(object):
- def __init__(self, identity_version=None, name=None, password='pass',
+ def __init__(self, identity_version=None, name=None,
network_resources=None):
"""A CredentialProvider supplies credentials to test classes.
- :param identity_version If specified it will return credentials of the
- corresponding identity version, otherwise it
- uses auth_version from configuration
- :param name Name of the calling test. Included in provisioned
- credentials when credentials are provisioned on the fly
- :param password Used for provisioned credentials when credentials are
- provisioned on the fly
- :param network_resources Network resources required for the credentials
+ :param identity_version: If specified it will return credentials of the
+ corresponding identity version, otherwise it
+ uses auth_version from configuration
+ :param name: Name of the calling test. Included in provisioned
+ credentials when credentials are provisioned on the fly
+ :param network_resources: Network resources required for the
+ credentials
"""
- # TODO(andreaf) name and password are tenant isolation specific, and
- # could be removed from this abstract class
self.name = name or "test_creds"
self.identity_version = identity_version or CONF.identity.auth_version
if not auth.is_identity_version_supported(self.identity_version):
diff --git a/tempest/common/fixed_network.py b/tempest/common/fixed_network.py
index de44c4d..9ec0ec6 100644
--- a/tempest/common/fixed_network.py
+++ b/tempest/common/fixed_network.py
@@ -27,7 +27,7 @@
"""Get a full network dict from just a network name
:param str name: the name of the network to use
- :param NetworksClientJSON compute_networks_client: The network client
+ :param NetworksClient compute_networks_client: The network client
object to use for making the network lists api request
:return: The full dictionary for the network in question
:rtype: dict
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index 5ded3ee..2102638 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -16,11 +16,11 @@
import netaddr
from oslo_log import log as logging
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest import clients
from tempest.common import cred_provider
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
from tempest.services.identity.v2.json import identity_client as v2_identity
@@ -128,7 +128,7 @@
def get_creds_client(identity_client, project_domain_name=None):
- if isinstance(identity_client, v2_identity.IdentityClientJSON):
+ if isinstance(identity_client, v2_identity.IdentityClient):
return V2CredsClient(identity_client)
else:
return V3CredsClient(identity_client, project_domain_name)
@@ -136,14 +136,13 @@
class IsolatedCreds(cred_provider.CredentialProvider):
- def __init__(self, identity_version=None, name=None, password='pass',
+ def __init__(self, identity_version=None, name=None,
network_resources=None):
- super(IsolatedCreds, self).__init__(identity_version, name, password,
+ super(IsolatedCreds, self).__init__(identity_version, name,
network_resources)
self.network_resources = network_resources
self.isolated_creds = {}
self.ports = []
- self.password = password
self.default_admin_creds = cred_provider.get_configured_credentials(
'identity_admin', fill_in=True,
identity_version=self.identity_version)
@@ -193,9 +192,10 @@
name=project_name, description=project_desc)
username = data_utils.rand_name(root) + suffix
+ user_password = data_utils.rand_password()
email = data_utils.rand_name(root) + suffix + "@example.com"
user = self.creds_client.create_user(
- username, self.password, project, email)
+ username, user_password, project, email)
if admin:
self.creds_client.assign_user_role(user, project,
CONF.identity.admin_role)
@@ -206,7 +206,7 @@
if roles:
for role in roles:
self.creds_client.assign_user_role(user, project, role)
- creds = self.creds_client.get_credentials(user, project, self.password)
+ creds = self.creds_client.get_credentials(user, project, user_password)
return cred_provider.TestResources(creds)
def _create_network_resources(self, tenant_id):
diff --git a/tempest/common/utils/__init__.py b/tempest/common/utils/__init__.py
index 04d898d..81b8110 100644
--- a/tempest/common/utils/__init__.py
+++ b/tempest/common/utils/__init__.py
@@ -1,3 +1,45 @@
+# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from functools import partial
+
+from tempest import config
+
+from tempest_lib.common.utils import data_utils as lib_data_utils
+
+CONF = config.CONF
+
PING_IPV4_COMMAND = 'ping -c 3 '
PING_IPV6_COMMAND = 'ping6 -c 3 '
PING_PACKET_LOSS_REGEX = '(\d{1,3})\.?\d*\% packet loss'
+
+
+class DataUtils(object):
+ def __getattr__(self, attr):
+ if attr in self.__dict__:
+ return self.__dict__[attr]
+
+ if attr == 'rand_name':
+ # NOTE(flwang): This is a proxy to generate a random name that
+ # includes a random number and a prefix if one is configured in
+ # CONF.resources_prefix
+ attr_obj = partial(lib_data_utils.rand_name,
+ prefix=CONF.resources_prefix)
+ else:
+ attr_obj = getattr(lib_data_utils, attr)
+
+ self.__dict__[attr] = attr_obj
+ return attr_obj
+
+data_utils = DataUtils()
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index d4e6eb8..93c2c10 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -30,10 +30,10 @@
# NOTE(afazekas): It should always get an address instead of server
def __init__(self, server, username, password=None, pkey=None):
- ssh_timeout = CONF.compute.ssh_timeout
+ ssh_timeout = CONF.validation.ssh_timeout
network = CONF.compute.network_for_ssh
- ip_version = CONF.compute.ip_version_for_ssh
- ssh_channel_timeout = CONF.compute.ssh_channel_timeout
+ ip_version = CONF.validation.ip_version_for_ssh
+ connect_timeout = CONF.validation.connect_timeout
if isinstance(server, six.string_types):
ip_address = server
else:
@@ -46,7 +46,7 @@
raise exceptions.ServerUnreachable()
self.ssh_client = ssh.Client(ip_address, username, password,
ssh_timeout, pkey=pkey,
- channel_timeout=ssh_channel_timeout)
+ channel_timeout=connect_timeout)
def exec_command(self, cmd):
# Shell options below add more clearness on failures,
@@ -72,8 +72,7 @@
return output.split()[1]
def get_number_of_vcpus(self):
- command = 'cat /proc/cpuinfo | grep processor | wc -l'
- output = self.exec_command(command)
+ output = self.exec_command('grep -c processor /proc/cpuinfo')
return int(output)
def get_partitions(self):
diff --git a/tempest/common/validation_resources.py b/tempest/common/validation_resources.py
index d370ebc..18f0b1d 100644
--- a/tempest/common/validation_resources.py
+++ b/tempest/common/validation_resources.py
@@ -14,9 +14,10 @@
from oslo_log import log as logging
from tempest import config
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
+from tempest.common.utils import data_utils
+
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index 249bac9..bdbd6bc 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -33,7 +33,7 @@
# NOTE(afazekas): UNKNOWN status possible on ERROR
# or in a very early stage.
- body = client.get_server(server_id)
+ body = client.show_server(server_id)
old_status = server_status = body['status']
old_task_state = task_state = _get_task_state(body)
start_time = int(time.time())
@@ -60,7 +60,7 @@
return
time.sleep(client.build_interval)
- body = client.get_server(server_id)
+ body = client.show_server(server_id)
server_status = body['status']
task_state = _get_task_state(body)
if (server_status != old_status) or (task_state != old_task_state):
diff --git a/tempest/config.py b/tempest/config.py
index fc55723..7382088 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -31,9 +31,10 @@
def register_opt_group(conf, opt_group, options):
- conf.register_group(opt_group)
+ if opt_group:
+ conf.register_group(opt_group)
for opt in options:
- conf.register_opt(opt, group=opt_group.name)
+ conf.register_opt(opt, group=getattr(opt_group, 'name', None))
auth_group = cfg.OptGroup(name='auth',
@@ -239,18 +240,10 @@
default=1,
help="The number of ping packets originating from remote "
"linux hosts"),
- cfg.IntOpt('ssh_timeout',
- default=300,
- help="Timeout in seconds to wait for authentication to "
- "succeed."),
cfg.IntOpt('ready_wait',
default=0,
help="Additional wait time for clean state, when there is "
"no OS-EXT-STS extension available"),
- cfg.IntOpt('ssh_channel_timeout',
- default=60,
- help="Timeout in seconds to wait for output from ssh "
- "channel."),
cfg.StrOpt('fixed_network_name',
help="Name of the fixed network that is visible to all test "
"tenants. If multiple networks are available for a tenant"
@@ -262,9 +255,6 @@
default='public',
help="Network used for SSH connections. Ignored if "
"use_floatingip_for_ssh=true or run_validation=false."),
- cfg.IntOpt('ip_version_for_ssh',
- default=4,
- help="IP version used for SSH connections."),
cfg.BoolOpt('use_floatingip_for_ssh',
default=True,
help="Does SSH use Floating IPs?"),
@@ -391,7 +381,13 @@
default=False,
help='Does Nova preserve preexisting ports from Neutron '
'when deleting an instance? This should be set to True '
- 'if testing Kilo+ Nova.')
+ 'if testing Kilo+ Nova.'),
+ cfg.BoolOpt('attach_encrypted_volume',
+ default=True,
+ help='Does the test environment support attaching an '
+ 'encrypted volume to a running server instance? This may '
+ 'depend on the combination of compute_driver in nova and '
+ 'the volume_driver(s) in cinder.'),
]
@@ -520,9 +516,10 @@
help="Allow the execution of IPv6 tests"),
cfg.ListOpt('api_extensions',
default=['all'],
- help='A list of enabled network extensions with a special '
- 'entry all which indicates every extension is enabled. '
- 'Empty list indicates all extensions are disabled'),
+ help="A list of enabled network extensions with a special "
+ "entry all which indicates every extension is enabled. "
+ "Empty list indicates all extensions are disabled. "
+ "To get the list of extensions run: 'neutron ext-list'"),
cfg.BoolOpt('ipv6_subnet_attributes',
default=False,
help="Allow the execution of IPv6 subnet tests that use "
@@ -594,17 +591,23 @@
'Additional methods will be handled in a separate spec.'),
cfg.IntOpt('ip_version_for_ssh',
default=4,
- help='Default IP version for ssh connections.'),
+ help='Default IP version for ssh connections.',
+ deprecated_opts=[cfg.DeprecatedOpt('ip_version_for_ssh',
+ group='compute')]),
cfg.IntOpt('ping_timeout',
default=120,
help='Timeout in seconds to wait for ping to succeed.'),
cfg.IntOpt('connect_timeout',
default=60,
help='Timeout in seconds to wait for the TCP connection to be '
- 'successful.'),
+ 'successful.',
+ deprecated_opts=[cfg.DeprecatedOpt('ssh_channel_timeout',
+ group='compute')]),
cfg.IntOpt('ssh_timeout',
default=300,
- help='Timeout in seconds to wait for the ssh banner.'),
+ help='Timeout in seconds to wait for the ssh banner.',
+ deprecated_opts=[cfg.DeprecatedOpt('ssh_timeout',
+ group='compute')]),
]
volume_group = cfg.OptGroup(name='volume',
@@ -1137,6 +1140,15 @@
help="Test generator class for all negative tests"),
]
+DefaultGroup = [
+ cfg.StrOpt('resources_prefix',
+ default='tempest',
+ help="Prefix to be added when generating the name for "
+ "test resources. It can be used to discover all "
+ "resources associated with a specific test run when "
+ "running tempest on a real-life cloud"),
+]
+
_opts = [
(auth_group, AuthGroup),
(compute_group, ComputeGroup),
@@ -1166,7 +1178,8 @@
(debug_group, DebugGroup),
(baremetal_group, BaremetalGroup),
(input_scenario_group, InputScenarioGroup),
- (negative_group, NegativeGroup)
+ (negative_group, NegativeGroup),
+ (None, DefaultGroup)
]
@@ -1181,7 +1194,7 @@
The purpose of this is to allow tools like the Oslo sample config file
generator to discover the options exposed to users.
"""
- return [(g.name, o) for g, o in _opts]
+ return [(getattr(g, 'name', None), o) for g, o in _opts]
# this should never be called outside of this class
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index fff8a5c..8f0b4dc 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -19,11 +19,11 @@
import netaddr
from oslo_log import log
import six
-from tempest_lib.common.utils import data_utils
from tempest_lib.common.utils import misc as misc_utils
from tempest_lib import exceptions as lib_exc
from tempest.common import fixed_network
+from tempest.common.utils import data_utils
from tempest.common.utils.linux import remote_client
from tempest import config
from tempest import exceptions
@@ -182,7 +182,7 @@
# The instance retrieved on creation is missing network
# details, necessitating retrieval after it becomes active to
# ensure correct details.
- server = self.servers_client.get_server(server['id'])
+ server = self.servers_client.show_server(server['id'])
self.assertEqual(server['name'], name)
return server
@@ -1229,7 +1229,7 @@
self.servers_client.wait_for_server_status(self.instance['id'],
'ACTIVE')
self.node = self.get_node(instance_id=self.instance['id'])
- self.instance = self.servers_client.get_server(self.instance['id'])
+ self.instance = self.servers_client.show_server(self.instance['id'])
def terminate_instance(self):
self.servers_client.delete_server(self.instance['id'])
diff --git a/tempest/scenario/test_aggregates_basic_ops.py b/tempest/scenario/test_aggregates_basic_ops.py
index 0e158ed..02d1171 100644
--- a/tempest/scenario/test_aggregates_basic_ops.py
+++ b/tempest/scenario/test_aggregates_basic_ops.py
@@ -14,9 +14,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest.common import tempest_fixtures as fixtures
+from tempest.common.utils import data_utils
from tempest.scenario import manager
from tempest import test
diff --git a/tempest/scenario/test_encrypted_cinder_volumes.py b/tempest/scenario/test_encrypted_cinder_volumes.py
index e6912d8..b66eb59 100644
--- a/tempest/scenario/test_encrypted_cinder_volumes.py
+++ b/tempest/scenario/test_encrypted_cinder_volumes.py
@@ -13,9 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest import config
from tempest.scenario import manager
from tempest import test
+CONF = config.CONF
+
class TestEncryptedCinderVolumes(manager.EncryptionScenarioTest):
@@ -31,6 +34,12 @@
* Attaches and detaches the encrypted volume to the instance
"""
+ @classmethod
+ def skip_checks(cls):
+ super(TestEncryptedCinderVolumes, cls).skip_checks()
+ if not CONF.compute_feature_enabled.attach_encrypted_volume:
+ raise cls.skipException('Encrypted volume attach is not supported')
+
def launch_instance(self):
self.glance_image_create()
self.nova_boot()
diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py
index 56d4c7d..ffb35fb 100644
--- a/tempest/scenario/test_large_ops.py
+++ b/tempest/scenario/test_large_ops.py
@@ -14,10 +14,10 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import exceptions as lib_exc
from tempest.common import fixed_network
+from tempest.common.utils import data_utils
from tempest import config
from tempest.scenario import manager
from tempest import test
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index 45923ce..6057cd3 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -60,7 +60,7 @@
self.assertIn(self.server['id'], [x['id'] for x in servers])
def nova_show(self):
- got_server = self.servers_client.get_server(self.server['id'])
+ got_server = self.servers_client.show_server(self.server['id'])
self.assertThat(
self.server, custom_matchers.MatchesDictExceptForKeys(
got_server, excluded_keys=['OS-EXT-AZ:availability_zone']))
@@ -110,7 +110,7 @@
self.server['id'], secgroup['name'])
def wait_for_secgroup_add():
- body = self.servers_client.get_server(self.server['id'])
+ body = self.servers_client.show_server(self.server['id'])
return {'name': secgroup['name']} in body['security_groups']
if not test.call_until_true(wait_for_secgroup_add,
diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
index 3d6abff..c864379 100644
--- a/tempest/scenario/test_network_advanced_server_ops.py
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -14,9 +14,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
import testtools
+from tempest.common.utils import data_utils
from tempest import config
from tempest.scenario import manager
from tempest import test
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index 3274ce8..6461886 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -17,9 +17,9 @@
import re
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
import testtools
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
from tempest.scenario import manager
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index 8ec10c7..18fd09d 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -14,9 +14,9 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest import clients
+from tempest.common.utils import data_utils
from tempest import config
from tempest.scenario import manager
from tempest import test
diff --git a/tempest/scenario/test_server_advanced_ops.py b/tempest/scenario/test_server_advanced_ops.py
index f45f0c9..04d5c8b 100644
--- a/tempest/scenario/test_server_advanced_ops.py
+++ b/tempest/scenario/test_server_advanced_ops.py
@@ -80,19 +80,19 @@
self.servers_client.suspend_server(instance_id)
self.servers_client.wait_for_server_status(instance_id,
'SUSPENDED')
- fetched_instance = self.servers_client.get_server(instance_id)
+ fetched_instance = self.servers_client.show_server(instance_id)
LOG.debug("Resuming instance %s. Current status: %s",
instance_id, fetched_instance['status'])
self.servers_client.resume_server(instance_id)
self.servers_client.wait_for_server_status(instance_id,
'ACTIVE')
- fetched_instance = self.servers_client.get_server(instance_id)
+ fetched_instance = self.servers_client.show_server(instance_id)
LOG.debug("Suspending instance %s. Current status: %s",
instance_id, fetched_instance['status'])
self.servers_client.suspend_server(instance_id)
self.servers_client.wait_for_server_status(instance_id,
'SUSPENDED')
- fetched_instance = self.servers_client.get_server(instance_id)
+ fetched_instance = self.servers_client.show_server(instance_id)
LOG.debug("Resuming instance %s. Current status: %s",
instance_id, fetched_instance['status'])
self.servers_client.resume_server(instance_id)
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index 51c4c59..c1d9a1b 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -16,11 +16,11 @@
import time
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
from tempest_lib import decorators
from tempest_lib import exceptions as lib_exc
import testtools
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
from tempest.scenario import manager
diff --git a/tempest/scenario/test_swift_telemetry_middleware.py b/tempest/scenario/test_swift_telemetry_middleware.py
index 302ccbe..29ce1a0 100644
--- a/tempest/scenario/test_swift_telemetry_middleware.py
+++ b/tempest/scenario/test_swift_telemetry_middleware.py
@@ -74,7 +74,7 @@
called again.
"""
results = self.telemetry_client.list_samples(
- 'storage.api.request')
+ 'storage.objects.incoming.bytes')
LOG.debug('got samples %s', results)
# Extract container info from samples.
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index 1731c48..102e9a3 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -11,8 +11,8 @@
# under the License.
from oslo_log import log
-from tempest_lib.common.utils import data_utils
+from tempest.common.utils import data_utils
from tempest import config
from tempest.scenario import manager
from tempest import test
@@ -47,7 +47,7 @@
vol_name = data_utils.rand_name('volume-origin')
return self.create_volume(name=vol_name, imageRef=img_uuid)
- def _boot_instance_from_volume(self, vol_id, keypair):
+ def _boot_instance_from_volume(self, vol_id, keypair, security_group):
# NOTE(gfidente): the syntax for block_device_mapping is
# dev_name=id:type:size:delete_on_terminate
# where type needs to be "snap" if the server is booted
@@ -56,12 +56,10 @@
'device_name': 'vda',
'volume_id': vol_id,
'delete_on_termination': '0'}]
- self.security_group = self._create_security_group()
- security_groups = [{'name': self.security_group['name']}]
create_kwargs = {
'block_device_mapping': bd_map,
'key_name': keypair['name'],
- 'security_groups': security_groups
+ 'security_groups': [{'name': security_group['name']}]
}
return self.create_server(image='', create_kwargs=create_kwargs)
@@ -134,12 +132,12 @@
@test.services('compute', 'volume', 'image')
def test_volume_boot_pattern(self):
keypair = self.create_keypair()
- self.security_group = self._create_security_group()
+ security_group = self._create_security_group()
# create an instance from volume
volume_origin = self._create_volume_from_image()
instance_1st = self._boot_instance_from_volume(volume_origin['id'],
- keypair)
+ keypair, security_group)
# write content to volume on instance
ssh_client_for_instance_1st = self._ssh_to_server(instance_1st,
@@ -151,7 +149,7 @@
# create a 2nd instance from volume
instance_2nd = self._boot_instance_from_volume(volume_origin['id'],
- keypair)
+ keypair, security_group)
# check the content of written file
ssh_client_for_instance_2nd = self._ssh_to_server(instance_2nd,
@@ -163,8 +161,9 @@
# create a 3rd instance from snapshot
volume = self._create_volume_from_snapshot(snapshot['id'])
- instance_from_snapshot = self._boot_instance_from_volume(volume['id'],
- keypair)
+ instance_from_snapshot = (
+ self._boot_instance_from_volume(volume['id'],
+ keypair, security_group))
# check the content of written file
ssh_client = self._ssh_to_server(instance_from_snapshot, keypair)
@@ -176,15 +175,16 @@
class TestVolumeBootPatternV2(TestVolumeBootPattern):
- def _boot_instance_from_volume(self, vol_id, keypair):
- bdms = [{'uuid': vol_id, 'source_type': 'volume',
- 'destination_type': 'volume', 'boot_index': 0,
- 'delete_on_termination': False}]
- self.security_group = self._create_security_group()
- security_groups = [{'name': self.security_group['name']}]
+ def _boot_instance_from_volume(self, vol_id, keypair, security_group):
+ bd_map_v2 = [{
+ 'uuid': vol_id,
+ 'source_type': 'volume',
+ 'destination_type': 'volume',
+ 'boot_index': 0,
+ 'delete_on_termination': False}]
create_kwargs = {
- 'block_device_mapping_v2': bdms,
+ 'block_device_mapping_v2': bd_map_v2,
'key_name': keypair['name'],
- 'security_groups': security_groups
+ 'security_groups': [{'name': security_group['name']}]
}
return self.create_server(image='', create_kwargs=create_kwargs)
diff --git a/tempest/services/baremetal/v1/json/baremetal_client.py b/tempest/services/baremetal/v1/json/baremetal_client.py
index 0c319f6..479402a 100644
--- a/tempest/services/baremetal/v1/json/baremetal_client.py
+++ b/tempest/services/baremetal/v1/json/baremetal_client.py
@@ -13,7 +13,7 @@
from tempest.services.baremetal import base
-class BaremetalClientJSON(base.BaremetalClient):
+class BaremetalClient(base.BaremetalClient):
"""
Base Tempest REST client for Ironic API v1.
"""
diff --git a/tempest/services/compute/json/agents_client.py b/tempest/services/compute/json/agents_client.py
index c69e483..e0e3ec3 100644
--- a/tempest/services/compute/json/agents_client.py
+++ b/tempest/services/compute/json/agents_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class AgentsClientJSON(service_client.ServiceClient):
+class AgentsClient(service_client.ServiceClient):
"""
Tests Agents API
"""
@@ -45,12 +45,12 @@
def delete_agent(self, agent_id):
"""Delete an existing agent build."""
- resp, body = self.delete("os-agents/%s" % str(agent_id))
+ resp, body = self.delete("os-agents/%s" % agent_id)
self.validate_response(schema.delete_agent, resp, body)
return service_client.ResponseBody(resp, body)
def update_agent(self, agent_id, **kwargs):
"""Update an agent build."""
put_body = json.dumps({'para': kwargs})
- resp, body = self.put('os-agents/%s' % str(agent_id), put_body)
+ resp, body = self.put('os-agents/%s' % agent_id, put_body)
return service_client.ResponseBody(resp, self._parse_resp(body))
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 6c02b63..e275895 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -21,7 +21,7 @@
from tempest.common import service_client
-class AggregatesClientJSON(service_client.ServiceClient):
+class AggregatesClient(service_client.ServiceClient):
def list_aggregates(self):
"""Get aggregate list."""
@@ -32,7 +32,7 @@
def show_aggregate(self, aggregate_id):
"""Get details of the given aggregate."""
- resp, body = self.get("os-aggregates/%s" % str(aggregate_id))
+ resp, body = self.get("os-aggregates/%s" % aggregate_id)
body = json.loads(body)
self.validate_response(schema.get_aggregate, resp, body)
return service_client.ResponseBody(resp, body['aggregate'])
@@ -53,7 +53,7 @@
'availability_zone': availability_zone
}
put_body = json.dumps({'aggregate': put_body})
- resp, body = self.put('os-aggregates/%s' % str(aggregate_id), put_body)
+ resp, body = self.put('os-aggregates/%s' % aggregate_id, put_body)
body = json.loads(body)
self.validate_response(schema.update_aggregate, resp, body)
@@ -61,7 +61,7 @@
def delete_aggregate(self, aggregate_id):
"""Deletes the given aggregate."""
- resp, body = self.delete("os-aggregates/%s" % str(aggregate_id))
+ resp, body = self.delete("os-aggregates/%s" % aggregate_id)
self.validate_response(schema.delete_aggregate, resp, body)
return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/availability_zone_client.py b/tempest/services/compute/json/availability_zone_client.py
index 925d79f..9686854 100644
--- a/tempest/services/compute/json/availability_zone_client.py
+++ b/tempest/services/compute/json/availability_zone_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class AvailabilityZoneClientJSON(service_client.ServiceClient):
+class AvailabilityZoneClient(service_client.ServiceClient):
def list_availability_zones(self, detail=False):
url = 'os-availability-zone'
diff --git a/tempest/services/compute/json/baremetal_nodes_client.py b/tempest/services/compute/json/baremetal_nodes_client.py
index d8f13c4..42caa7b 100644
--- a/tempest/services/compute/json/baremetal_nodes_client.py
+++ b/tempest/services/compute/json/baremetal_nodes_client.py
@@ -21,7 +21,7 @@
from tempest.common import service_client
-class BaremetalNodesClientJSON(service_client.ServiceClient):
+class BaremetalNodesClient(service_client.ServiceClient):
"""
Tests Baremetal API
"""
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
index 752a48e..15b019f 100644
--- a/tempest/services/compute/json/certificates_client.py
+++ b/tempest/services/compute/json/certificates_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class CertificatesClientJSON(service_client.ServiceClient):
+class CertificatesClient(service_client.ServiceClient):
def show_certificate(self, id):
url = "os-certificates/%s" % (id)
diff --git a/tempest/services/compute/json/extensions_client.py b/tempest/services/compute/json/extensions_client.py
index 265b381..ec60872 100644
--- a/tempest/services/compute/json/extensions_client.py
+++ b/tempest/services/compute/json/extensions_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class ExtensionsClientJSON(service_client.ServiceClient):
+class ExtensionsClient(service_client.ServiceClient):
def list_extensions(self):
url = 'extensions'
@@ -28,11 +28,6 @@
self.validate_response(schema.list_extensions, resp, body)
return service_client.ResponseBodyList(resp, body['extensions'])
- def is_enabled(self, extension):
- extensions = self.list_extensions()
- exts = extensions['extensions']
- return any([e for e in exts if e['name'] == extension])
-
def show_extension(self, extension_alias):
resp, body = self.get('extensions/%s' % extension_alias)
body = json.loads(body)
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 769bfdc..53a5476 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class FixedIPsClientJSON(service_client.ServiceClient):
+class FixedIPsClient(service_client.ServiceClient):
def show_fixed_ip(self, fixed_ip):
url = "os-fixed-ips/%s" % (fixed_ip)
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index ebe4117..2f7de3f 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -25,7 +25,7 @@
from tempest.common import service_client
-class FlavorsClientJSON(service_client.ServiceClient):
+class FlavorsClient(service_client.ServiceClient):
def list_flavors(self, detail=False, **params):
url = 'flavors'
@@ -43,7 +43,7 @@
return service_client.ResponseBodyList(resp, body['flavors'])
def show_flavor(self, flavor_id):
- resp, body = self.get("flavors/%s" % str(flavor_id))
+ resp, body = self.get("flavors/%s" % flavor_id)
body = json.loads(body)
self.validate_response(schema.create_get_flavor_details, resp, body)
return service_client.ResponseBody(resp, body['flavor'])
@@ -113,7 +113,7 @@
def show_flavor_extra_spec(self, flavor_id, key):
"""Gets extra Specs key-value of the mentioned flavor and key."""
- resp, body = self.get('flavors/%s/os-extra_specs/%s' % (str(flavor_id),
+ resp, body = self.get('flavors/%s/os-extra_specs/%s' % (flavor_id,
key))
body = json.loads(body)
self.validate_response(
@@ -134,7 +134,7 @@
def unset_flavor_extra_spec(self, flavor_id, key):
"""Unsets extra Specs from the mentioned flavor."""
resp, body = self.delete('flavors/%s/os-extra_specs/%s' %
- (str(flavor_id), key))
+ (flavor_id, key))
self.validate_response(schema.unset_flavor_extra_specs, resp, body)
return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 6095dc0..420037b 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -22,7 +22,7 @@
from tempest.common import service_client
-class FloatingIPsClientJSON(service_client.ServiceClient):
+class FloatingIPsClient(service_client.ServiceClient):
def list_floating_ips(self, params=None):
"""Returns a list of all floating IPs filtered by any parameters."""
@@ -37,7 +37,7 @@
def show_floating_ip(self, floating_ip_id):
"""Get the details of a floating IP."""
- url = "os-floating-ips/%s" % str(floating_ip_id)
+ url = "os-floating-ips/%s" % floating_ip_id
resp, body = self.get(url)
body = json.loads(body)
self.validate_response(schema.create_get_floating_ip, resp, body)
@@ -55,14 +55,14 @@
def delete_floating_ip(self, floating_ip_id):
"""Deletes the provided floating IP from the project."""
- url = "os-floating-ips/%s" % str(floating_ip_id)
+ url = "os-floating-ips/%s" % floating_ip_id
resp, body = self.delete(url)
self.validate_response(schema.add_remove_floating_ip, resp, body)
return service_client.ResponseBody(resp, body)
def associate_floating_ip_to_server(self, floating_ip, server_id):
"""Associate the provided floating IP to a specific server."""
- url = "servers/%s/action" % str(server_id)
+ url = "servers/%s/action" % server_id
post_body = {
'addFloatingIp': {
'address': floating_ip,
@@ -76,7 +76,7 @@
def disassociate_floating_ip_from_server(self, floating_ip, server_id):
"""Disassociate the provided floating IP from a specific server."""
- url = "servers/%s/action" % str(server_id)
+ url = "servers/%s/action" % server_id
post_body = {
'removeFloatingIp': {
'address': floating_ip,
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index 223b80f..0510104 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class HostsClientJSON(service_client.ServiceClient):
+class HostsClient(service_client.ServiceClient):
def list_hosts(self, params=None):
"""Lists all hosts."""
@@ -37,7 +37,7 @@
def show_host(self, hostname):
"""Show detail information for the host."""
- resp, body = self.get("os-hosts/%s" % str(hostname))
+ resp, body = self.get("os-hosts/%s" % hostname)
body = json.loads(body)
self.validate_response(schema.get_host_detail, resp, body)
return service_client.ResponseBodyList(resp, body['host'])
@@ -52,7 +52,7 @@
request_body.update(**kwargs)
request_body = json.dumps(request_body)
- resp, body = self.put("os-hosts/%s" % str(hostname), request_body)
+ resp, body = self.put("os-hosts/%s" % hostname, request_body)
body = json.loads(body)
self.validate_response(schema.update_host, resp, body)
return service_client.ResponseBody(resp, body)
@@ -60,7 +60,7 @@
def startup_host(self, hostname):
"""Startup a host."""
- resp, body = self.get("os-hosts/%s/startup" % str(hostname))
+ resp, body = self.get("os-hosts/%s/startup" % hostname)
body = json.loads(body)
self.validate_response(schema.startup_host, resp, body)
return service_client.ResponseBody(resp, body['host'])
@@ -68,7 +68,7 @@
def shutdown_host(self, hostname):
"""Shutdown a host."""
- resp, body = self.get("os-hosts/%s/shutdown" % str(hostname))
+ resp, body = self.get("os-hosts/%s/shutdown" % hostname)
body = json.loads(body)
self.validate_response(schema.shutdown_host, resp, body)
return service_client.ResponseBody(resp, body['host'])
@@ -76,7 +76,7 @@
def reboot_host(self, hostname):
"""reboot a host."""
- resp, body = self.get("os-hosts/%s/reboot" % str(hostname))
+ resp, body = self.get("os-hosts/%s/reboot" % hostname)
body = json.loads(body)
self.validate_response(schema.reboot_host, resp, body)
return service_client.ResponseBody(resp, body['host'])
diff --git a/tempest/services/compute/json/hypervisor_client.py b/tempest/services/compute/json/hypervisor_client.py
index 2f9f701..865c5bc 100644
--- a/tempest/services/compute/json/hypervisor_client.py
+++ b/tempest/services/compute/json/hypervisor_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class HypervisorClientJSON(service_client.ServiceClient):
+class HypervisorClient(service_client.ServiceClient):
def list_hypervisors(self, detail=False):
"""List hypervisors information."""
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 30aa962..172bbe2 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -20,10 +20,9 @@
from tempest.api_schema.response.compute.v2_1 import images as schema
from tempest.common import service_client
-from tempest.common import waiters
-class ImagesClientJSON(service_client.ServiceClient):
+class ImagesClient(service_client.ServiceClient):
def create_image(self, server_id, name, meta=None):
"""Creates an image of the original server."""
@@ -38,36 +37,30 @@
post_body['createImage']['metadata'] = meta
post_body = json.dumps(post_body)
- resp, body = self.post('servers/%s/action' % str(server_id),
+ resp, body = self.post('servers/%s/action' % server_id,
post_body)
self.validate_response(schema.create_image, resp, body)
return service_client.ResponseBody(resp, body)
- def list_images(self, params=None):
+ def list_images(self, detail=False, **params):
"""Returns a list of all images filtered by any parameters."""
url = 'images'
+ _schema = schema.list_images
+ if detail:
+ url += '/detail'
+ _schema = schema.list_images_details
+
if params:
url += '?%s' % urllib.urlencode(params)
resp, body = self.get(url)
body = json.loads(body)
- self.validate_response(schema.list_images, resp, body)
- return service_client.ResponseBodyList(resp, body['images'])
-
- def list_images_with_detail(self, params=None):
- """Returns a detailed list of images filtered by any parameters."""
- url = 'images/detail'
- if params:
- url += '?%s' % urllib.urlencode(params)
-
- resp, body = self.get(url)
- body = json.loads(body)
- self.validate_response(schema.list_images_details, resp, body)
+ self.validate_response(_schema, resp, body)
return service_client.ResponseBodyList(resp, body['images'])
def show_image(self, image_id):
"""Returns the details of a single image."""
- resp, body = self.get("images/%s" % str(image_id))
+ resp, body = self.get("images/%s" % image_id)
self.expected_success(200, resp.status)
body = json.loads(body)
self.validate_response(schema.get_image, resp, body)
@@ -75,17 +68,13 @@
def delete_image(self, image_id):
"""Deletes the provided image."""
- resp, body = self.delete("images/%s" % str(image_id))
+ resp, body = self.delete("images/%s" % image_id)
self.validate_response(schema.delete, resp, body)
return service_client.ResponseBody(resp, body)
- def wait_for_image_status(self, image_id, status):
- """Waits for an image to reach a given status."""
- waiters.wait_for_image_status(self, image_id, status)
-
def list_image_metadata(self, image_id):
"""Lists all metadata items for an image."""
- resp, body = self.get("images/%s/metadata" % str(image_id))
+ resp, body = self.get("images/%s/metadata" % image_id)
body = json.loads(body)
self.validate_response(schema.image_metadata, resp, body)
return service_client.ResponseBody(resp, body['metadata'])
@@ -93,7 +82,7 @@
def set_image_metadata(self, image_id, meta):
"""Sets the metadata for an image."""
post_body = json.dumps({'metadata': meta})
- resp, body = self.put('images/%s/metadata' % str(image_id), post_body)
+ resp, body = self.put('images/%s/metadata' % image_id, post_body)
body = json.loads(body)
self.validate_response(schema.image_metadata, resp, body)
return service_client.ResponseBody(resp, body['metadata'])
@@ -101,14 +90,14 @@
def update_image_metadata(self, image_id, meta):
"""Updates the metadata for an image."""
post_body = json.dumps({'metadata': meta})
- resp, body = self.post('images/%s/metadata' % str(image_id), post_body)
+ resp, body = self.post('images/%s/metadata' % image_id, post_body)
body = json.loads(body)
self.validate_response(schema.image_metadata, resp, body)
return service_client.ResponseBody(resp, body['metadata'])
- def get_image_metadata_item(self, image_id, key):
+ def show_image_metadata_item(self, image_id, key):
"""Returns the value for a specific image metadata key."""
- resp, body = self.get("images/%s/metadata/%s" % (str(image_id), key))
+ resp, body = self.get("images/%s/metadata/%s" % (image_id, key))
body = json.loads(body)
self.validate_response(schema.image_meta_item, resp, body)
return service_client.ResponseBody(resp, body['meta'])
@@ -116,7 +105,7 @@
def set_image_metadata_item(self, image_id, key, meta):
"""Sets the value for a specific image metadata key."""
post_body = json.dumps({'meta': meta})
- resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
+ resp, body = self.put('images/%s/metadata/%s' % (image_id, key),
post_body)
body = json.loads(body)
self.validate_response(schema.image_meta_item, resp, body)
@@ -125,7 +114,7 @@
def delete_image_metadata_item(self, image_id, key):
"""Deletes a single image metadata key/value pair."""
resp, body = self.delete("images/%s/metadata/%s" %
- (str(image_id), key))
+ (image_id, key))
self.validate_response(schema.delete, resp, body)
return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/instance_usage_audit_log_client.py b/tempest/services/compute/json/instance_usage_audit_log_client.py
index 33ba76f..c0841bf 100644
--- a/tempest/services/compute/json/instance_usage_audit_log_client.py
+++ b/tempest/services/compute/json/instance_usage_audit_log_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class InstanceUsagesAuditLogClientJSON(service_client.ServiceClient):
+class InstanceUsagesAuditLogClient(service_client.ServiceClient):
def list_instance_usage_audit_logs(self):
url = 'os-instance_usage_audit_log'
@@ -31,7 +31,7 @@
return service_client.ResponseBody(resp,
body["instance_usage_audit_logs"])
- def get_instance_usage_audit_log(self, time_before):
+ def show_instance_usage_audit_log(self, time_before):
url = 'os-instance_usage_audit_log/%s' % time_before
resp, body = self.get(url)
body = json.loads(body)
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index 223e90b..0e0ff47 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -14,15 +14,13 @@
# under the License.
import json
-import time
from tempest.api_schema.response.compute.v2_1 import interfaces as schema
from tempest.api_schema.response.compute.v2_1 import servers as servers_schema
from tempest.common import service_client
-from tempest import exceptions
-class InterfacesClientJSON(service_client.ServiceClient):
+class InterfacesClient(service_client.ServiceClient):
def list_interfaces(self, server):
resp, body = self.get('servers/%s/os-interface' % server)
@@ -60,28 +58,6 @@
self.validate_response(schema.delete_interface, resp, body)
return service_client.ResponseBody(resp, body)
- def wait_for_interface_status(self, server, port_id, status):
- """Waits for a interface to reach a given status."""
- body = self.show_interface(server, port_id)
- interface_status = body['port_state']
- start = int(time.time())
-
- while(interface_status != status):
- time.sleep(self.build_interval)
- body = self.show_interface(server, port_id)
- interface_status = body['port_state']
-
- timed_out = int(time.time()) - start >= self.build_timeout
-
- if interface_status != status and timed_out:
- message = ('Interface %s failed to reach %s status '
- '(current %s) within the required time (%s s).' %
- (port_id, status, interface_status,
- self.build_timeout))
- raise exceptions.TimeoutException(message)
-
- return body
-
def add_fixed_ip(self, server_id, network_id):
"""Add a fixed IP to input server instance."""
post_body = json.dumps({
@@ -89,7 +65,7 @@
'networkId': network_id
}
})
- resp, body = self.post('servers/%s/action' % str(server_id),
+ resp, body = self.post('servers/%s/action' % server_id,
post_body)
self.validate_response(servers_schema.server_actions_common_schema,
resp, body)
@@ -102,7 +78,7 @@
'address': ip_address
}
})
- resp, body = self.post('servers/%s/action' % str(server_id),
+ resp, body = self.post('servers/%s/action' % server_id,
post_body)
self.validate_response(servers_schema.server_actions_common_schema,
resp, body)
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 7fe335b..ba8b1e2 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class KeyPairsClientJSON(service_client.ServiceClient):
+class KeyPairsClient(service_client.ServiceClient):
def list_keypairs(self):
resp, body = self.get("os-keypairs")
@@ -32,8 +32,8 @@
self.validate_response(schema.list_keypairs, resp, body)
return service_client.ResponseBodyList(resp, body['keypairs'])
- def get_keypair(self, key_name):
- resp, body = self.get("os-keypairs/%s" % str(key_name))
+ def show_keypair(self, key_name):
+ resp, body = self.get("os-keypairs/%s" % key_name)
body = json.loads(body)
self.validate_response(schema.get_keypair, resp, body)
return service_client.ResponseBody(resp, body['keypair'])
@@ -49,6 +49,6 @@
return service_client.ResponseBody(resp, body['keypair'])
def delete_keypair(self, key_name):
- resp, body = self.delete("os-keypairs/%s" % str(key_name))
+ resp, body = self.delete("os-keypairs/%s" % key_name)
self.validate_response(schema.delete_keypair, resp, body)
return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/limits_client.py b/tempest/services/compute/json/limits_client.py
index 1454b73..bfa340c 100644
--- a/tempest/services/compute/json/limits_client.py
+++ b/tempest/services/compute/json/limits_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class LimitsClientJSON(service_client.ServiceClient):
+class LimitsClient(service_client.ServiceClient):
def show_limits(self):
resp, body = self.get("limits")
diff --git a/tempest/services/compute/json/migrations_client.py b/tempest/services/compute/json/migrations_client.py
index f708a07..cd04e45 100644
--- a/tempest/services/compute/json/migrations_client.py
+++ b/tempest/services/compute/json/migrations_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class MigrationsClientJSON(service_client.ServiceClient):
+class MigrationsClient(service_client.ServiceClient):
def list_migrations(self, params=None):
"""Lists all migrations."""
diff --git a/tempest/services/compute/json/networks_client.py b/tempest/services/compute/json/networks_client.py
index e641787..cf9f534 100644
--- a/tempest/services/compute/json/networks_client.py
+++ b/tempest/services/compute/json/networks_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class NetworksClientJSON(service_client.ServiceClient):
+class NetworksClient(service_client.ServiceClient):
def list_networks(self):
resp, body = self.get("os-networks")
@@ -27,7 +27,7 @@
return service_client.ResponseBodyList(resp, body['networks'])
def show_network(self, network_id):
- resp, body = self.get("os-networks/%s" % str(network_id))
+ resp, body = self.get("os-networks/%s" % network_id)
body = json.loads(body)
self.expected_success(200, resp.status)
return service_client.ResponseBody(resp, body['network'])
diff --git a/tempest/services/compute/json/quota_classes_client.py b/tempest/services/compute/json/quota_classes_client.py
index ad35e3f..a741be4 100644
--- a/tempest/services/compute/json/quota_classes_client.py
+++ b/tempest/services/compute/json/quota_classes_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class QuotaClassesClientJSON(service_client.ServiceClient):
+class QuotaClassesClient(service_client.ServiceClient):
def show_quota_class_set(self, quota_class_id):
"""List the quota class set for a quota class."""
diff --git a/tempest/services/compute/json/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index f488817..b038508 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class QuotasClientJSON(service_client.ServiceClient):
+class QuotasClient(service_client.ServiceClient):
def show_quota_set(self, tenant_id, user_id=None):
"""List the quota set for a tenant."""
diff --git a/tempest/services/compute/json/security_group_default_rules_client.py b/tempest/services/compute/json/security_group_default_rules_client.py
index 3bf3263..304e759 100644
--- a/tempest/services/compute/json/security_group_default_rules_client.py
+++ b/tempest/services/compute/json/security_group_default_rules_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class SecurityGroupDefaultRulesClientJSON(service_client.ServiceClient):
+class SecurityGroupDefaultRulesClient(service_client.ServiceClient):
def create_security_default_group_rule(self, ip_protocol, from_port,
to_port, **kwargs):
@@ -49,7 +49,7 @@
def delete_security_group_default_rule(self,
security_group_default_rule_id):
"""Deletes the provided Security Group default rule."""
- resp, body = self.delete('os-security-group-default-rules/%s' % str(
+ resp, body = self.delete('os-security-group-default-rules/%s' % (
security_group_default_rule_id))
self.validate_response(schema.delete_security_group_default_rule,
resp, body)
@@ -64,10 +64,10 @@
rules = body['security_group_default_rules']
return service_client.ResponseBodyList(resp, rules)
- def get_security_group_default_rule(self, security_group_default_rule_id):
+ def show_security_group_default_rule(self, security_group_default_rule_id):
"""Return the details of provided Security Group default rule."""
- resp, body = self.get('os-security-group-default-rules/%s' % str(
- security_group_default_rule_id))
+ resp, body = self.get('os-security-group-default-rules/%s' %
+ security_group_default_rule_id)
body = json.loads(body)
self.validate_response(schema.create_get_security_group_default_rule,
resp, body)
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 2855e13..ca4f9bc 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -22,7 +22,7 @@
from tempest.common import service_client
-class SecurityGroupsClientJSON(service_client.ServiceClient):
+class SecurityGroupsClient(service_client.ServiceClient):
def list_security_groups(self, params=None):
"""List all security groups for a user."""
@@ -36,9 +36,9 @@
self.validate_response(schema.list_security_groups, resp, body)
return service_client.ResponseBodyList(resp, body['security_groups'])
- def get_security_group(self, security_group_id):
+ def show_security_group(self, security_group_id):
"""Get the details of a Security Group."""
- url = "os-security-groups/%s" % str(security_group_id)
+ url = "os-security-groups/%s" % security_group_id
resp, body = self.get(url)
body = json.loads(body)
self.validate_response(schema.get_security_group, resp, body)
@@ -74,7 +74,7 @@
if description:
post_body['description'] = description
post_body = json.dumps({'security_group': post_body})
- resp, body = self.put('os-security-groups/%s' % str(security_group_id),
+ resp, body = self.put('os-security-groups/%s' % security_group_id,
post_body)
body = json.loads(body)
self.validate_response(schema.update_security_group, resp, body)
@@ -83,7 +83,7 @@
def delete_security_group(self, security_group_id):
"""Deletes the provided Security Group."""
resp, body = self.delete(
- 'os-security-groups/%s' % str(security_group_id))
+ 'os-security-groups/%s' % security_group_id)
self.validate_response(schema.delete_security_group, resp, body)
return service_client.ResponseBody(resp, body)
@@ -117,7 +117,7 @@
def delete_security_group_rule(self, group_rule_id):
"""Deletes the provided Security Group rule."""
resp, body = self.delete('os-security-group-rules/%s' %
- str(group_rule_id))
+ group_rule_id)
self.validate_response(schema.delete_security_group_rule, resp, body)
return service_client.ResponseBody(resp, body)
@@ -133,7 +133,7 @@
def is_resource_deleted(self, id):
try:
- self.get_security_group(id)
+ self.show_security_group(id)
except lib_exc.NotFound:
return True
return False
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 1af1b37..2ecb2d4 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -26,11 +26,11 @@
from tempest import exceptions
-class ServersClientJSON(service_client.ServiceClient):
+class ServersClient(service_client.ServiceClient):
def __init__(self, auth_provider, service, region,
enable_instance_password=True, **kwargs):
- super(ServersClientJSON, self).__init__(
+ super(ServersClient, self).__init__(
auth_provider, service, region, **kwargs)
self.enable_instance_password = enable_instance_password
@@ -131,21 +131,21 @@
post_body['OS-DCF:diskConfig'] = disk_config
post_body = json.dumps({'server': post_body})
- resp, body = self.put("servers/%s" % str(server_id), post_body)
+ resp, body = self.put("servers/%s" % server_id, post_body)
body = json.loads(body)
self.validate_response(schema.update_server, resp, body)
return service_client.ResponseBody(resp, body['server'])
- def get_server(self, server_id):
+ def show_server(self, server_id):
"""Returns the details of an existing server."""
- resp, body = self.get("servers/%s" % str(server_id))
+ resp, body = self.get("servers/%s" % server_id)
body = json.loads(body)
self.validate_response(schema.get_server, resp, body)
return service_client.ResponseBody(resp, body['server'])
def delete_server(self, server_id):
"""Deletes the given server."""
- resp, body = self.delete("servers/%s" % str(server_id))
+ resp, body = self.delete("servers/%s" % server_id)
self.validate_response(schema.delete_server, resp, body)
return service_client.ResponseBody(resp, body)
@@ -186,7 +186,7 @@
start_time = int(time.time())
while True:
try:
- body = self.get_server(server_id)
+ body = self.show_server(server_id)
except lib_exc.NotFound:
return
@@ -201,7 +201,7 @@
def list_addresses(self, server_id):
"""Lists all addresses for a server."""
- resp, body = self.get("servers/%s/ips" % str(server_id))
+ resp, body = self.get("servers/%s/ips" % server_id)
body = json.loads(body)
self.validate_response(schema.list_addresses, resp, body)
return service_client.ResponseBody(resp, body['addresses'])
@@ -209,7 +209,7 @@
def list_addresses_by_network(self, server_id, network_id):
"""Lists all addresses of a specific network type for a server."""
resp, body = self.get("servers/%s/ips/%s" %
- (str(server_id), network_id))
+ (server_id, network_id))
body = json.loads(body)
self.validate_response(schema.list_addresses_by_network, resp, body)
return service_client.ResponseBody(resp, body)
@@ -218,7 +218,7 @@
schema=schema.server_actions_common_schema,
response_class=service_client.ResponseBody, **kwargs):
post_body = json.dumps({action_name: kwargs})
- resp, body = self.post('servers/%s/action' % str(server_id),
+ resp, body = self.post('servers/%s/action' % server_id,
post_body)
if response_key is not None:
body = json.loads(body)
@@ -250,7 +250,7 @@
def get_password(self, server_id):
resp, body = self.get("servers/%s/os-server-password" %
- str(server_id))
+ server_id)
body = json.loads(body)
self.validate_response(schema.get_password, resp, body)
return service_client.ResponseBody(resp, body)
@@ -262,7 +262,7 @@
password.
"""
resp, body = self.delete("servers/%s/os-server-password" %
- str(server_id))
+ server_id)
self.validate_response(schema.server_actions_delete_password,
resp, body)
return service_client.ResponseBody(resp, body)
@@ -303,7 +303,7 @@
return self.action(server_id, 'revertResize', None, **kwargs)
def list_server_metadata(self, server_id):
- resp, body = self.get("servers/%s/metadata" % str(server_id))
+ resp, body = self.get("servers/%s/metadata" % server_id)
body = json.loads(body)
self.validate_response(schema.list_server_metadata, resp, body)
return service_client.ResponseBody(resp, body['metadata'])
@@ -313,7 +313,7 @@
post_body = ""
else:
post_body = json.dumps({'metadata': meta})
- resp, body = self.put('servers/%s/metadata' % str(server_id),
+ resp, body = self.put('servers/%s/metadata' % server_id,
post_body)
body = json.loads(body)
self.validate_response(schema.set_server_metadata, resp, body)
@@ -321,7 +321,7 @@
def update_server_metadata(self, server_id, meta):
post_body = json.dumps({'metadata': meta})
- resp, body = self.post('servers/%s/metadata' % str(server_id),
+ resp, body = self.post('servers/%s/metadata' % server_id,
post_body)
body = json.loads(body)
self.validate_response(schema.update_server_metadata,
@@ -329,7 +329,7 @@
return service_client.ResponseBody(resp, body['metadata'])
def get_server_metadata_item(self, server_id, key):
- resp, body = self.get("servers/%s/metadata/%s" % (str(server_id), key))
+ resp, body = self.get("servers/%s/metadata/%s" % (server_id, key))
body = json.loads(body)
self.validate_response(schema.set_get_server_metadata_item,
resp, body)
@@ -337,7 +337,7 @@
def set_server_metadata_item(self, server_id, key, meta):
post_body = json.dumps({'meta': meta})
- resp, body = self.put('servers/%s/metadata/%s' % (str(server_id), key),
+ resp, body = self.put('servers/%s/metadata/%s' % (server_id, key),
post_body)
body = json.loads(body)
self.validate_response(schema.set_get_server_metadata_item,
@@ -346,7 +346,7 @@
def delete_server_metadata_item(self, server_id, key):
resp, body = self.delete("servers/%s/metadata/%s" %
- (str(server_id), key))
+ (server_id, key))
self.validate_response(schema.delete_server_metadata_item,
resp, body)
return service_client.ResponseBody(resp, body)
@@ -381,7 +381,7 @@
def get_volume_attachment(self, server_id, attach_id):
"""Return details about the given volume attachment."""
resp, body = self.get('servers/%s/os-volume_attachments/%s' % (
- str(server_id), attach_id))
+ server_id, attach_id))
body = json.loads(body)
self.validate_response(schema.get_volume_attachment, resp, body)
return service_client.ResponseBody(resp, body['volumeAttachment'])
@@ -389,7 +389,7 @@
def list_volume_attachments(self, server_id):
"""Returns the list of volume attachments for a given instance."""
resp, body = self.get('servers/%s/os-volume_attachments' % (
- str(server_id)))
+ server_id))
body = json.loads(body)
self.validate_response(schema.list_volume_attachments, resp, body)
return service_client.ResponseBodyList(resp, body['volumeAttachments'])
@@ -413,7 +413,7 @@
req_body = json.dumps({'os-migrateLive': migrate_params})
- resp, body = self.post("servers/%s/action" % str(server_id), req_body)
+ resp, body = self.post("servers/%s/action" % server_id, req_body)
self.validate_response(schema.server_actions_common_schema,
resp, body)
return service_client.ResponseBody(resp, body)
@@ -492,13 +492,13 @@
def get_server_diagnostics(self, server_id):
"""Get the usage data for a server."""
- resp, body = self.get("servers/%s/diagnostics" % str(server_id))
+ resp, body = self.get("servers/%s/diagnostics" % server_id)
return service_client.ResponseBody(resp, json.loads(body))
def list_instance_actions(self, server_id):
"""List the provided server action."""
resp, body = self.get("servers/%s/os-instance-actions" %
- str(server_id))
+ server_id)
body = json.loads(body)
self.validate_response(schema.list_instance_actions, resp, body)
return service_client.ResponseBodyList(resp, body['instanceActions'])
@@ -506,7 +506,7 @@
def get_instance_action(self, server_id, request_id):
"""Returns the action details of the provided server."""
resp, body = self.get("servers/%s/os-instance-actions/%s" %
- (str(server_id), str(request_id)))
+ (server_id, request_id))
body = json.loads(body)
self.validate_response(schema.get_instance_action, resp, body)
return service_client.ResponseBody(resp, body['instanceAction'])
@@ -553,7 +553,7 @@
def delete_server_group(self, server_group_id):
"""Delete the given server-group."""
- resp, body = self.delete("os-server-groups/%s" % str(server_group_id))
+ resp, body = self.delete("os-server-groups/%s" % server_group_id)
self.validate_response(schema.delete_server_group, resp, body)
return service_client.ResponseBody(resp, body)
@@ -566,7 +566,7 @@
def get_server_group(self, server_group_id):
"""Get the details of given server_group."""
- resp, body = self.get("os-server-groups/%s" % str(server_group_id))
+ resp, body = self.get("os-server-groups/%s" % server_group_id)
body = json.loads(body)
self.validate_response(schema.create_get_server_group, resp, body)
return service_client.ResponseBody(resp, body['server_group'])
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index 156ad8d..01f96af 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -22,7 +22,7 @@
from tempest.common import service_client
-class ServicesClientJSON(service_client.ServiceClient):
+class ServicesClient(service_client.ServiceClient):
def list_services(self, params=None):
url = 'os-services'
diff --git a/tempest/services/compute/json/tenant_networks_client.py b/tempest/services/compute/json/tenant_networks_client.py
index 11251f6..b15ebe3 100644
--- a/tempest/services/compute/json/tenant_networks_client.py
+++ b/tempest/services/compute/json/tenant_networks_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class TenantNetworksClientJSON(service_client.ServiceClient):
+class TenantNetworksClient(service_client.ServiceClient):
def list_tenant_networks(self):
resp, body = self.get("os-tenant-networks")
@@ -26,8 +26,8 @@
self.validate_response(schema.list_tenant_networks, resp, body)
return service_client.ResponseBodyList(resp, body['networks'])
- def get_tenant_network(self, network_id):
- resp, body = self.get("os-tenant-networks/%s" % str(network_id))
+ def show_tenant_network(self, network_id):
+ resp, body = self.get("os-tenant-networks/%s" % network_id)
body = json.loads(body)
self.validate_response(schema.get_tenant_network, resp, body)
return service_client.ResponseBody(resp, body['network'])
diff --git a/tempest/services/compute/json/tenant_usages_client.py b/tempest/services/compute/json/tenant_usages_client.py
index 52f46e2..fac412e 100644
--- a/tempest/services/compute/json/tenant_usages_client.py
+++ b/tempest/services/compute/json/tenant_usages_client.py
@@ -21,7 +21,7 @@
from tempest.common import service_client
-class TenantUsagesClientJSON(service_client.ServiceClient):
+class TenantUsagesClient(service_client.ServiceClient):
def list_tenant_usages(self, params=None):
url = 'os-simple-tenant-usage'
@@ -33,7 +33,7 @@
self.validate_response(schema.list_tenant_usage, resp, body)
return service_client.ResponseBodyList(resp, body['tenant_usages'][0])
- def get_tenant_usage(self, tenant_id, params=None):
+ def show_tenant_usage(self, tenant_id, params=None):
url = 'os-simple-tenant-usage/%s' % tenant_id
if params:
url += '?%s' % urllib.urlencode(params)
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index 4d7a7aa..08bb4bc 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -24,17 +24,20 @@
from tempest import exceptions
-class VolumesExtensionsClientJSON(service_client.ServiceClient):
+class VolumesExtensionsClient(service_client.ServiceClient):
def __init__(self, auth_provider, service, region,
default_volume_size=1, **kwargs):
- super(VolumesExtensionsClientJSON, self).__init__(
+ super(VolumesExtensionsClient, self).__init__(
auth_provider, service, region, **kwargs)
self.default_volume_size = default_volume_size
- def list_volumes(self, params=None):
+ def list_volumes(self, detail=False, **params):
"""List all the volumes created."""
url = 'os-volumes'
+
+ if detail:
+ url += '/detail'
if params:
url += '?%s' % urllib.urlencode(params)
@@ -43,20 +46,9 @@
self.validate_response(schema.list_volumes, resp, body)
return service_client.ResponseBodyList(resp, body['volumes'])
- def list_volumes_with_detail(self, params=None):
- """List all the details of volumes."""
- url = 'os-volumes/detail'
- if params:
- url += '?%s' % urllib.urlencode(params)
-
- resp, body = self.get(url)
- body = json.loads(body)
- self.validate_response(schema.list_volumes, resp, body)
- return service_client.ResponseBodyList(resp, body['volumes'])
-
- def get_volume(self, volume_id):
+ def show_volume(self, volume_id):
"""Returns the details of a single volume."""
- url = "os-volumes/%s" % str(volume_id)
+ url = "os-volumes/%s" % volume_id
resp, body = self.get(url)
body = json.loads(body)
self.validate_response(schema.create_get_volume, resp, body)
@@ -85,19 +77,19 @@
def delete_volume(self, volume_id):
"""Deletes the Specified Volume."""
- resp, body = self.delete("os-volumes/%s" % str(volume_id))
+ resp, body = self.delete("os-volumes/%s" % volume_id)
self.validate_response(schema.delete_volume, resp, body)
return service_client.ResponseBody(resp, body)
def wait_for_volume_status(self, volume_id, status):
"""Waits for a Volume to reach a given status."""
- body = self.get_volume(volume_id)
+ body = self.show_volume(volume_id)
volume_status = body['status']
start = int(time.time())
while volume_status != status:
time.sleep(self.build_interval)
- body = self.get_volume(volume_id)
+ body = self.show_volume(volume_id)
volume_status = body['status']
if volume_status == 'error':
raise exceptions.VolumeBuildErrorException(volume_id=volume_id)
@@ -111,7 +103,7 @@
def is_resource_deleted(self, id):
try:
- self.get_volume(id)
+ self.show_volume(id)
except lib_exc.NotFound:
return True
return False
diff --git a/tempest/services/database/json/flavors_client.py b/tempest/services/database/json/flavors_client.py
index c956e27..4fe5a46 100644
--- a/tempest/services/database/json/flavors_client.py
+++ b/tempest/services/database/json/flavors_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class DatabaseFlavorsClientJSON(service_client.ServiceClient):
+class DatabaseFlavorsClient(service_client.ServiceClient):
def list_db_flavors(self, params=None):
url = 'flavors'
diff --git a/tempest/services/database/json/limits_client.py b/tempest/services/database/json/limits_client.py
index f99ceaa..830b67f 100644
--- a/tempest/services/database/json/limits_client.py
+++ b/tempest/services/database/json/limits_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class DatabaseLimitsClientJSON(service_client.ServiceClient):
+class DatabaseLimitsClient(service_client.ServiceClient):
def list_db_limits(self, params=None):
"""List all limits."""
diff --git a/tempest/services/database/json/versions_client.py b/tempest/services/database/json/versions_client.py
index 0db9c6a..ed1ba81 100644
--- a/tempest/services/database/json/versions_client.py
+++ b/tempest/services/database/json/versions_client.py
@@ -18,14 +18,14 @@
from tempest.common import service_client
-class DatabaseVersionsClientJSON(service_client.ServiceClient):
+class DatabaseVersionsClient(service_client.ServiceClient):
def __init__(self, auth_provider, service, region,
endpoint_type=None, build_interval=None, build_timeout=None,
disable_ssl_certificate_validation=None, ca_certs=None,
trace_requests=None):
dscv = disable_ssl_certificate_validation
- super(DatabaseVersionsClientJSON, self).__init__(
+ super(DatabaseVersionsClient, self).__init__(
auth_provider, service, region,
endpoint_type=endpoint_type,
build_interval=build_interval,
diff --git a/tempest/services/identity/v2/json/identity_client.py b/tempest/services/identity/v2/json/identity_client.py
index c5f7338..fd4160f 100644
--- a/tempest/services/identity/v2/json/identity_client.py
+++ b/tempest/services/identity/v2/json/identity_client.py
@@ -16,7 +16,8 @@
from tempest.common import service_client
-class IdentityClientJSON(service_client.ServiceClient):
+class IdentityClient(service_client.ServiceClient):
+ api_version = "v2.0"
def get_api_description(self):
"""Retrieves info about the v2.0 Identity API"""
diff --git a/tempest/services/identity/v3/json/credentials_client.py b/tempest/services/identity/v3/json/credentials_client.py
index 0a614cd..281f3cd 100644
--- a/tempest/services/identity/v3/json/credentials_client.py
+++ b/tempest/services/identity/v3/json/credentials_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class CredentialsClientJSON(service_client.ServiceClient):
+class CredentialsClient(service_client.ServiceClient):
api_version = "v3"
def create_credential(self, access_key, secret_key, user_id, project_id):
diff --git a/tempest/services/identity/v3/json/endpoints_client.py b/tempest/services/identity/v3/json/endpoints_client.py
index 5b7e812..44acb47 100644
--- a/tempest/services/identity/v3/json/endpoints_client.py
+++ b/tempest/services/identity/v3/json/endpoints_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class EndPointClientJSON(service_client.ServiceClient):
+class EndPointClient(service_client.ServiceClient):
api_version = "v3"
def list_endpoints(self):
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index 30fb3e1..d8afd2c 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class IdentityV3ClientJSON(service_client.ServiceClient):
+class IdentityV3Client(service_client.ServiceClient):
api_version = "v3"
def get_api_description(self):
diff --git a/tempest/services/identity/v3/json/policy_client.py b/tempest/services/identity/v3/json/policy_client.py
index 8c9c9ce..424fb1d 100644
--- a/tempest/services/identity/v3/json/policy_client.py
+++ b/tempest/services/identity/v3/json/policy_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class PolicyClientJSON(service_client.ServiceClient):
+class PolicyClient(service_client.ServiceClient):
api_version = "v3"
def create_policy(self, blob, type):
diff --git a/tempest/services/identity/v3/json/region_client.py b/tempest/services/identity/v3/json/region_client.py
index 02df354..9d7d496 100644
--- a/tempest/services/identity/v3/json/region_client.py
+++ b/tempest/services/identity/v3/json/region_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class RegionClientJSON(service_client.ServiceClient):
+class RegionClient(service_client.ServiceClient):
api_version = "v3"
def create_region(self, description, **kwargs):
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/service_client.py
index e039dc6..c678918 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/service_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class ServiceClientJSON(service_client.ServiceClient):
+class ServiceClient(service_client.ServiceClient):
api_version = "v3"
def update_service(self, service_id, **kwargs):
diff --git a/tempest/services/image/v1/json/image_client.py b/tempest/services/image/v1/json/image_client.py
index add26a9..eae5c64 100644
--- a/tempest/services/image/v1/json/image_client.py
+++ b/tempest/services/image/v1/json/image_client.py
@@ -32,13 +32,13 @@
LOG = logging.getLogger(__name__)
-class ImageClientJSON(service_client.ServiceClient):
+class ImageClient(service_client.ServiceClient):
def __init__(self, auth_provider, catalog_type, region, endpoint_type=None,
build_interval=None, build_timeout=None,
disable_ssl_certificate_validation=None,
ca_certs=None, trace_requests=None):
- super(ImageClientJSON, self).__init__(
+ super(ImageClient, self).__init__(
auth_provider,
catalog_type,
region,
diff --git a/tempest/services/image/v2/json/image_client.py b/tempest/services/image/v2/json/image_client.py
index 383c72b..95972ae 100644
--- a/tempest/services/image/v2/json/image_client.py
+++ b/tempest/services/image/v2/json/image_client.py
@@ -23,13 +23,13 @@
from tempest.common import service_client
-class ImageClientV2JSON(service_client.ServiceClient):
+class ImageClientV2(service_client.ServiceClient):
def __init__(self, auth_provider, catalog_type, region, endpoint_type=None,
build_interval=None, build_timeout=None,
disable_ssl_certificate_validation=None, ca_certs=None,
trace_requests=None):
- super(ImageClientV2JSON, self).__init__(
+ super(ImageClientV2, self).__init__(
auth_provider,
catalog_type,
region,
diff --git a/tempest/services/messaging/json/messaging_client.py b/tempest/services/messaging/json/messaging_client.py
index 5f6c32a..b99e0a7 100644
--- a/tempest/services/messaging/json/messaging_client.py
+++ b/tempest/services/messaging/json/messaging_client.py
@@ -22,14 +22,14 @@
from tempest.common import service_client
-class MessagingClientJSON(service_client.ServiceClient):
+class MessagingClient(service_client.ServiceClient):
def __init__(self, auth_provider, service, region,
endpoint_type=None, build_interval=None, build_timeout=None,
disable_ssl_certificate_validation=None, ca_certs=None,
trace_requests=None):
dscv = disable_ssl_certificate_validation
- super(MessagingClientJSON, self).__init__(
+ super(MessagingClient, self).__init__(
auth_provider, service, region,
endpoint_type=endpoint_type,
build_interval=build_interval,
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index f1e9824..a903457 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -21,7 +21,7 @@
from tempest import exceptions
-class NetworkClientJSON(service_client.ServiceClient):
+class NetworkClient(service_client.ServiceClient):
"""
Tempest REST client for Neutron. Uses v2 of the Neutron API, since the
diff --git a/tempest/services/telemetry/json/telemetry_client.py b/tempest/services/telemetry/json/telemetry_client.py
index 554f574..2b1cdc0 100644
--- a/tempest/services/telemetry/json/telemetry_client.py
+++ b/tempest/services/telemetry/json/telemetry_client.py
@@ -19,7 +19,7 @@
from tempest.common import service_client
-class TelemetryClientJSON(service_client.ServiceClient):
+class TelemetryClient(service_client.ServiceClient):
version = '2'
uri_prefix = "v2"
diff --git a/tempest/services/volume/json/admin/volume_hosts_client.py b/tempest/services/volume/json/admin/volume_hosts_client.py
index 1dfabaf..260679e 100644
--- a/tempest/services/volume/json/admin/volume_hosts_client.py
+++ b/tempest/services/volume/json/admin/volume_hosts_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class BaseVolumeHostsClientJSON(service_client.ServiceClient):
+class BaseVolumeHostsClient(service_client.ServiceClient):
"""
Client class to send CRUD Volume Hosts API requests to a Cinder endpoint
"""
@@ -38,7 +38,7 @@
return service_client.ResponseBodyList(resp, body['hosts'])
-class VolumeHostsClientJSON(BaseVolumeHostsClientJSON):
+class VolumeHostsClient(BaseVolumeHostsClient):
"""
Client class to send CRUD Volume Host API V1 requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/json/admin/volume_quotas_client.py b/tempest/services/volume/json/admin/volume_quotas_client.py
index cbab3f0..a979523 100644
--- a/tempest/services/volume/json/admin/volume_quotas_client.py
+++ b/tempest/services/volume/json/admin/volume_quotas_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class BaseVolumeQuotasClientJSON(service_client.ServiceClient):
+class BaseVolumeQuotasClient(service_client.ServiceClient):
"""
Client class to send CRUD Volume Quotas API requests to a Cinder endpoint
"""
@@ -75,7 +75,7 @@
return service_client.ResponseBody(resp, body)
-class VolumeQuotasClientJSON(BaseVolumeQuotasClientJSON):
+class VolumeQuotasClient(BaseVolumeQuotasClient):
"""
Client class to send CRUD Volume Type API V1 requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/json/admin/volume_services_client.py b/tempest/services/volume/json/admin/volume_services_client.py
index 94792e0..2b2a696 100644
--- a/tempest/services/volume/json/admin/volume_services_client.py
+++ b/tempest/services/volume/json/admin/volume_services_client.py
@@ -20,7 +20,7 @@
from tempest.common import service_client
-class BaseVolumesServicesClientJSON(service_client.ServiceClient):
+class BaseVolumesServicesClient(service_client.ServiceClient):
def list_services(self, params=None):
url = 'os-services'
@@ -33,5 +33,5 @@
return service_client.ResponseBodyList(resp, body['services'])
-class VolumesServicesClientJSON(BaseVolumesServicesClientJSON):
+class VolumesServicesClient(BaseVolumesServicesClient):
"""Volume V1 volume services client"""
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index 2436d88..9a75f6c 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -21,7 +21,7 @@
from tempest.common import service_client
-class BaseVolumeTypesClientJSON(service_client.ServiceClient):
+class BaseVolumeTypesClient(service_client.ServiceClient):
"""
Client class to send CRUD Volume Types API requests to a Cinder endpoint
"""
@@ -188,5 +188,5 @@
return service_client.ResponseBody(resp, body)
-class VolumeTypesClientJSON(BaseVolumeTypesClientJSON):
+class VolumeTypesClient(BaseVolumeTypesClient):
"""Volume V1 Volume Types client"""
diff --git a/tempest/services/volume/json/availability_zone_client.py b/tempest/services/volume/json/availability_zone_client.py
index dc0388f..e60d5c1 100644
--- a/tempest/services/volume/json/availability_zone_client.py
+++ b/tempest/services/volume/json/availability_zone_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class BaseVolumeAvailabilityZoneClientJSON(service_client.ServiceClient):
+class BaseVolumeAvailabilityZoneClient(service_client.ServiceClient):
def list_availability_zones(self):
resp, body = self.get('os-availability-zone')
@@ -27,7 +27,7 @@
return service_client.ResponseBody(resp, body['availabilityZoneInfo'])
-class VolumeAvailabilityZoneClientJSON(BaseVolumeAvailabilityZoneClientJSON):
+class VolumeAvailabilityZoneClient(BaseVolumeAvailabilityZoneClient):
"""
Volume V1 availability zone client.
"""
diff --git a/tempest/services/volume/json/backups_client.py b/tempest/services/volume/json/backups_client.py
index 83ec182..bf9af6e 100644
--- a/tempest/services/volume/json/backups_client.py
+++ b/tempest/services/volume/json/backups_client.py
@@ -20,7 +20,7 @@
from tempest import exceptions
-class BaseBackupsClientJSON(service_client.ServiceClient):
+class BaseBackupsClient(service_client.ServiceClient):
"""
Client class to send CRUD Volume backup API requests to a Cinder endpoint
"""
@@ -95,5 +95,5 @@
raise exceptions.TimeoutException(message)
-class BackupsClientJSON(BaseBackupsClientJSON):
+class BackupsClient(BaseBackupsClient):
"""Volume V1 Backups client"""
diff --git a/tempest/services/volume/json/extensions_client.py b/tempest/services/volume/json/extensions_client.py
index 8a7bce7..3bf468a 100644
--- a/tempest/services/volume/json/extensions_client.py
+++ b/tempest/services/volume/json/extensions_client.py
@@ -18,7 +18,7 @@
from tempest.common import service_client
-class BaseExtensionsClientJSON(service_client.ServiceClient):
+class BaseExtensionsClient(service_client.ServiceClient):
def list_extensions(self):
url = 'extensions'
@@ -28,7 +28,7 @@
return service_client.ResponseBodyList(resp, body['extensions'])
-class ExtensionsClientJSON(BaseExtensionsClientJSON):
+class ExtensionsClient(BaseExtensionsClient):
"""
Volume V1 extensions client.
"""
diff --git a/tempest/services/volume/json/qos_client.py b/tempest/services/volume/json/qos_client.py
index e9d3777..37ab9cd 100644
--- a/tempest/services/volume/json/qos_client.py
+++ b/tempest/services/volume/json/qos_client.py
@@ -21,7 +21,7 @@
from tempest import exceptions
-class BaseQosSpecsClientJSON(service_client.ServiceClient):
+class BaseQosSpecsClient(service_client.ServiceClient):
"""Client class to send CRUD QoS API requests"""
def is_resource_deleted(self, qos_id):
@@ -157,5 +157,5 @@
return service_client.ResponseBody(resp, body)
-class QosSpecsClientJSON(BaseQosSpecsClientJSON):
+class QosSpecsClient(BaseQosSpecsClient):
"""Volume V1 QoS client."""
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index cfa02bd..7f7cceb 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -24,7 +24,7 @@
LOG = logging.getLogger(__name__)
-class BaseSnapshotsClientJSON(service_client.ServiceClient):
+class BaseSnapshotsClient(service_client.ServiceClient):
"""Base Client class to send CRUD Volume API requests."""
create_resp = 200
@@ -198,5 +198,5 @@
return service_client.ResponseBody(resp, body)
-class SnapshotsClientJSON(BaseSnapshotsClientJSON):
+class SnapshotsClient(BaseSnapshotsClient):
"""Client class to send CRUD Volume V1 API requests."""
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index 65aa0f4..1f8548e 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -23,7 +23,7 @@
from tempest import exceptions
-class BaseVolumesClientJSON(service_client.ServiceClient):
+class BaseVolumesClient(service_client.ServiceClient):
"""
Base client class to send CRUD Volume API requests to a Cinder endpoint
"""
@@ -32,7 +32,7 @@
def __init__(self, auth_provider, service, region,
default_volume_size=1, **kwargs):
- super(BaseVolumesClientJSON, self).__init__(
+ super(BaseVolumesClient, self).__init__(
auth_provider, service, region, **kwargs)
self.default_volume_size = default_volume_size
@@ -345,7 +345,7 @@
self.expected_success(202, resp.status)
-class VolumesClientJSON(BaseVolumesClientJSON):
+class VolumesClient(BaseVolumesClient):
"""
Client class to send CRUD Volume V1 API requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/v2/json/admin/volume_hosts_client.py b/tempest/services/volume/v2/json/admin/volume_hosts_client.py
index b93d031..f0cc03f 100644
--- a/tempest/services/volume/v2/json/admin/volume_hosts_client.py
+++ b/tempest/services/volume/v2/json/admin/volume_hosts_client.py
@@ -17,7 +17,7 @@
from tempest.services.volume.json.admin import volume_hosts_client
-class VolumeHostsV2ClientJSON(volume_hosts_client.BaseVolumeHostsClientJSON):
+class VolumeHostsV2Client(volume_hosts_client.BaseVolumeHostsClient):
"""
Client class to send CRUD Volume V2 API requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/v2/json/admin/volume_quotas_client.py b/tempest/services/volume/v2/json/admin/volume_quotas_client.py
index 1dc48cd..635b6e1 100644
--- a/tempest/services/volume/v2/json/admin/volume_quotas_client.py
+++ b/tempest/services/volume/v2/json/admin/volume_quotas_client.py
@@ -16,7 +16,7 @@
from tempest.services.volume.json.admin import volume_quotas_client
-class VolumeQuotasV2Client(volume_quotas_client.BaseVolumeQuotasClientJSON):
+class VolumeQuotasV2Client(volume_quotas_client.BaseVolumeQuotasClient):
"""
Client class to send CRUD Volume V2 API requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/v2/json/admin/volume_services_client.py b/tempest/services/volume/v2/json/admin/volume_services_client.py
index 51224c5..d0efc38 100644
--- a/tempest/services/volume/v2/json/admin/volume_services_client.py
+++ b/tempest/services/volume/v2/json/admin/volume_services_client.py
@@ -16,7 +16,7 @@
from tempest.services.volume.json.admin import volume_services_client as vs_cli
-class VolumesServicesV2ClientJSON(vs_cli.BaseVolumesServicesClientJSON):
+class VolumesServicesV2Client(vs_cli.BaseVolumesServicesClient):
"""
Client class to send CRUD Volume V2 API requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/v2/json/admin/volume_types_client.py b/tempest/services/volume/v2/json/admin/volume_types_client.py
index 24099b2..1b9ff51 100644
--- a/tempest/services/volume/v2/json/admin/volume_types_client.py
+++ b/tempest/services/volume/v2/json/admin/volume_types_client.py
@@ -17,7 +17,7 @@
from tempest.services.volume.json.admin import volume_types_client
-class VolumeTypesV2ClientJSON(volume_types_client.BaseVolumeTypesClientJSON):
+class VolumeTypesV2Client(volume_types_client.BaseVolumeTypesClient):
"""
Client class to send CRUD Volume V2 API requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/v2/json/availability_zone_client.py b/tempest/services/volume/v2/json/availability_zone_client.py
index dc85634..2e1ab20 100644
--- a/tempest/services/volume/v2/json/availability_zone_client.py
+++ b/tempest/services/volume/v2/json/availability_zone_client.py
@@ -16,6 +16,6 @@
from tempest.services.volume.json import availability_zone_client
-class VolumeV2AvailabilityZoneClientJSON(
- availability_zone_client.BaseVolumeAvailabilityZoneClientJSON):
+class VolumeV2AvailabilityZoneClient(
+ availability_zone_client.BaseVolumeAvailabilityZoneClient):
api_version = "v2"
diff --git a/tempest/services/volume/v2/json/backups_client.py b/tempest/services/volume/v2/json/backups_client.py
index 30d9e8e..1ce11ce 100644
--- a/tempest/services/volume/v2/json/backups_client.py
+++ b/tempest/services/volume/v2/json/backups_client.py
@@ -16,7 +16,7 @@
from tempest.services.volume.json import backups_client
-class BackupsClientV2JSON(backups_client.BaseBackupsClientJSON):
+class BackupsClientV2(backups_client.BaseBackupsClient):
"""
Client class to send CRUD Volume V2 API requests to a Cinder endpoint
"""
diff --git a/tempest/services/volume/v2/json/extensions_client.py b/tempest/services/volume/v2/json/extensions_client.py
index 8dda833..3e32c0c 100644
--- a/tempest/services/volume/v2/json/extensions_client.py
+++ b/tempest/services/volume/v2/json/extensions_client.py
@@ -16,5 +16,5 @@
from tempest.services.volume.json import extensions_client
-class ExtensionsV2ClientJSON(extensions_client.BaseExtensionsClientJSON):
+class ExtensionsV2Client(extensions_client.BaseExtensionsClient):
api_version = "v2"
diff --git a/tempest/services/volume/v2/json/qos_client.py b/tempest/services/volume/v2/json/qos_client.py
index d17da6d..42bd1c9 100644
--- a/tempest/services/volume/v2/json/qos_client.py
+++ b/tempest/services/volume/v2/json/qos_client.py
@@ -15,5 +15,5 @@
from tempest.services.volume.json import qos_client
-class QosSpecsV2ClientJSON(qos_client.BaseQosSpecsClientJSON):
+class QosSpecsV2Client(qos_client.BaseQosSpecsClient):
api_version = "v2"
diff --git a/tempest/services/volume/v2/json/snapshots_client.py b/tempest/services/volume/v2/json/snapshots_client.py
index 90580f9..a94f9cd 100644
--- a/tempest/services/volume/v2/json/snapshots_client.py
+++ b/tempest/services/volume/v2/json/snapshots_client.py
@@ -13,7 +13,7 @@
from tempest.services.volume.json import snapshots_client
-class SnapshotsV2ClientJSON(snapshots_client.BaseSnapshotsClientJSON):
+class SnapshotsV2Client(snapshots_client.BaseSnapshotsClient):
"""Client class to send CRUD Volume V2 API requests."""
api_version = "v2"
create_resp = 202
diff --git a/tempest/services/volume/v2/json/volumes_client.py b/tempest/services/volume/v2/json/volumes_client.py
index 85ffb91..a6d081c 100644
--- a/tempest/services/volume/v2/json/volumes_client.py
+++ b/tempest/services/volume/v2/json/volumes_client.py
@@ -16,7 +16,7 @@
from tempest.services.volume.json import volumes_client
-class VolumesV2ClientJSON(volumes_client.BaseVolumesClientJSON):
+class VolumesV2Client(volumes_client.BaseVolumesClient):
"""
Client class to send CRUD Volume V2 API requests to a Cinder endpoint
"""
diff --git a/tempest/stress/actions/server_create_destroy.py b/tempest/stress/actions/server_create_destroy.py
index c0a3178..d0e4eea 100644
--- a/tempest/stress/actions/server_create_destroy.py
+++ b/tempest/stress/actions/server_create_destroy.py
@@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import config
import tempest.stress.stressaction as stressaction
diff --git a/tempest/stress/actions/ssh_floating.py b/tempest/stress/actions/ssh_floating.py
index b2a30e9..9e540fa 100644
--- a/tempest/stress/actions/ssh_floating.py
+++ b/tempest/stress/actions/ssh_floating.py
@@ -13,8 +13,7 @@
import socket
import subprocess
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import config
import tempest.stress.stressaction as stressaction
import tempest.test
diff --git a/tempest/stress/actions/volume_attach_delete.py b/tempest/stress/actions/volume_attach_delete.py
index 93400c4..a5e393f 100644
--- a/tempest/stress/actions/volume_attach_delete.py
+++ b/tempest/stress/actions/volume_attach_delete.py
@@ -11,8 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import config
import tempest.stress.stressaction as stressaction
diff --git a/tempest/stress/actions/volume_attach_verify.py b/tempest/stress/actions/volume_attach_verify.py
index ea53481..1cd96ed 100644
--- a/tempest/stress/actions/volume_attach_verify.py
+++ b/tempest/stress/actions/volume_attach_verify.py
@@ -12,8 +12,7 @@
import re
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest.common.utils.linux import remote_client
from tempest import config
import tempest.stress.stressaction as stressaction
diff --git a/tempest/stress/actions/volume_create_delete.py b/tempest/stress/actions/volume_create_delete.py
index b1899a0..4870055 100644
--- a/tempest/stress/actions/volume_create_delete.py
+++ b/tempest/stress/actions/volume_create_delete.py
@@ -10,8 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
import tempest.stress.stressaction as stressaction
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index 3f8e537..bdb39d8 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -22,10 +22,11 @@
import six
from six import moves
from tempest_lib.common import ssh
-from tempest_lib.common.utils import data_utils
+
from tempest import clients
from tempest.common import isolated_creds
+from tempest.common.utils import data_utils
from tempest import config
from tempest import exceptions
from tempest.stress import cleanup
diff --git a/tempest/test.py b/tempest/test.py
index 0d709f6c..80e61c7 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -43,7 +43,7 @@
CONF = config.CONF
-def attr(*args, **kwargs):
+def attr(**kwargs):
"""A decorator which applies the testtools attr decorator
This decorator applies the testtools.testcase.attr if it is in the list of
@@ -98,7 +98,7 @@
return service_list
-def services(*args, **kwargs):
+def services(*args):
"""A decorator used to set an attr for each service used in a test case
This decorator applies a testtools attr for each service that gets
@@ -128,7 +128,7 @@
return decorator
-def stresstest(*args, **kwargs):
+def stresstest(**kwargs):
"""Add stress test decorator
For all functions with this decorator a attr stress will be
@@ -154,7 +154,7 @@
return decorator
-def requires_ext(*args, **kwargs):
+def requires_ext(**kwargs):
"""A decorator to skip tests if an extension is not enabled
@param extension
diff --git a/tempest/test_discover/plugins.py b/tempest/test_discover/plugins.py
new file mode 100644
index 0000000..197bd0c
--- /dev/null
+++ b/tempest/test_discover/plugins.py
@@ -0,0 +1,56 @@
+# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import abc
+
+import six
+import stevedore
+from tempest_lib.common.utils import misc
+
+
+@six.add_metaclass(abc.ABCMeta)
+class TempestPlugin(object):
+ """A TempestPlugin class provides the basic hooks for an external
+ plugin to provide tempest the necessary information to run the plugin.
+ """
+
+ @abc.abstractmethod
+ def load_tests(self):
+ """Method to return the information necessary to load the tests in the
+ plugin.
+
+ :return: a tuple with the first value being the test_dir and the second
+ being the top_level
+ :rtype: tuple
+ """
+ return
+
+
+@misc.singleton
+class TempestTestPluginManager(object):
+ """Tempest test plugin manager class
+
+ This class is used to manage the lifecycle of external tempest test
+ plugins. It provides functions for getting set
+ """
+ def __init__(self):
+ self.ext_plugins = stevedore.ExtensionManager(
+ 'tempest.test.plugins', invoke_on_load=True,
+ propagate_map_exceptions=True)
+
+ def get_plugin_load_tests_tuple(self):
+ load_tests_dict = {}
+ for plug in self.ext_plugins:
+ load_tests_dict[plug.name] = plug.obj.load_tests()
+ return load_tests_dict
diff --git a/tempest/test_discover/test_discover.py b/tempest/test_discover/test_discover.py
index 4a4b43a..a871d10 100644
--- a/tempest/test_discover/test_discover.py
+++ b/tempest/test_discover/test_discover.py
@@ -15,6 +15,8 @@
import os
import sys
+from tempest.test_discover import plugins
+
if sys.version_info >= (2, 7):
import unittest
else:
@@ -22,9 +24,12 @@
def load_tests(loader, tests, pattern):
+ ext_plugins = plugins.TempestTestPluginManager()
+
suite = unittest.TestSuite()
base_path = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
base_path = os.path.split(base_path)[0]
+ # Load local tempest tests
for test_dir in ['./tempest/api', './tempest/scenario',
'./tempest/thirdparty']:
if not pattern:
@@ -32,4 +37,17 @@
else:
suite.addTests(loader.discover(test_dir, pattern=pattern,
top_level_dir=base_path))
+
+ plugin_load_tests = ext_plugins.get_plugin_load_tests_tuple()
+ if not plugin_load_tests:
+ return suite
+
+ # Load any installed plugin tests
+ for plugin in plugin_load_tests:
+ test_dir, top_path = plugin_load_tests[plugin]
+ if not pattern:
+ suite.addTests(loader.discover(test_dir, top_level=top_path))
+ else:
+ suite.addTests(loader.discover(test_dir, pattern=pattern,
+ top_level=top_path))
return suite
diff --git a/tempest/tests/common/test_accounts.py b/tempest/tests/common/test_accounts.py
index e713969..8fc3745 100644
--- a/tempest/tests/common/test_accounts.py
+++ b/tempest/tests/common/test_accounts.py
@@ -291,14 +291,12 @@
{'username': 'test_user14', 'tenant_name': 'test_tenant14',
'password': 'p', 'roles': ['role-7', 'role-11'],
'resources': {'network': 'network-2'}}]
- # Clear previous mock using self.test_accounts
- self.accounts_mock.cleanUp()
self.useFixture(mockpatch.Patch(
'tempest.common.accounts.read_accounts_yaml',
return_value=test_accounts))
test_accounts_class = accounts.Accounts('v2', 'test_name')
with mock.patch('tempest.services.compute.json.networks_client.'
- 'NetworksClientJSON.list_networks',
+ 'NetworksClient.list_networks',
return_value=[{'name': 'network-2', 'id': 'fake-id',
'label': 'network-2'}]):
creds = test_accounts_class.get_creds_by_roles(['role-7'])
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index c6c1053..3de7aba 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -104,71 +104,71 @@
@mock.patch('tempest_lib.common.rest_client.RestClient.__init__')
def test_service_client_creations_with_specified_args(self, mock_init):
test_clients = [
- baremetal_client.BaremetalClientJSON,
- agents_client.AgentsClientJSON,
- aggregates_client.AggregatesClientJSON,
- availability_zone_client.AvailabilityZoneClientJSON,
- certificates_client.CertificatesClientJSON,
- extensions_client.ExtensionsClientJSON,
- fixed_ips_client.FixedIPsClientJSON,
- flavors_client.FlavorsClientJSON,
- floating_ips_client.FloatingIPsClientJSON,
- hosts_client.HostsClientJSON,
- hypervisor_client.HypervisorClientJSON,
- images_client.ImagesClientJSON,
- instance_usage_audit_log_client.InstanceUsagesAuditLogClientJSON,
- interfaces_client.InterfacesClientJSON,
- keypairs_client.KeyPairsClientJSON,
- limits_client.LimitsClientJSON,
- migrations_client.MigrationsClientJSON,
- nova_net_client.NetworksClientJSON,
- quotas_client.QuotasClientJSON,
- quota_classes_client.QuotaClassesClientJSON,
- nova_secgrop_default_client.SecurityGroupDefaultRulesClientJSON,
- security_groups_client.SecurityGroupsClientJSON,
- servers_client.ServersClientJSON,
- services_client.ServicesClientJSON,
- tenant_usages_client.TenantUsagesClientJSON,
- compute_volumes_extensions_client.VolumesExtensionsClientJSON,
+ baremetal_client.BaremetalClient,
+ agents_client.AgentsClient,
+ aggregates_client.AggregatesClient,
+ availability_zone_client.AvailabilityZoneClient,
+ certificates_client.CertificatesClient,
+ extensions_client.ExtensionsClient,
+ fixed_ips_client.FixedIPsClient,
+ flavors_client.FlavorsClient,
+ floating_ips_client.FloatingIPsClient,
+ hosts_client.HostsClient,
+ hypervisor_client.HypervisorClient,
+ images_client.ImagesClient,
+ instance_usage_audit_log_client.InstanceUsagesAuditLogClient,
+ interfaces_client.InterfacesClient,
+ keypairs_client.KeyPairsClient,
+ limits_client.LimitsClient,
+ migrations_client.MigrationsClient,
+ nova_net_client.NetworksClient,
+ quotas_client.QuotasClient,
+ quota_classes_client.QuotaClassesClient,
+ nova_secgrop_default_client.SecurityGroupDefaultRulesClient,
+ security_groups_client.SecurityGroupsClient,
+ servers_client.ServersClient,
+ services_client.ServicesClient,
+ tenant_usages_client.TenantUsagesClient,
+ compute_volumes_extensions_client.VolumesExtensionsClient,
data_processing_client.DataProcessingClient,
- db_flavor_client.DatabaseFlavorsClientJSON,
- db_version_client.DatabaseVersionsClientJSON,
- messaging_client.MessagingClientJSON,
- network_client.NetworkClientJSON,
+ db_flavor_client.DatabaseFlavorsClient,
+ db_version_client.DatabaseVersionsClient,
+ messaging_client.MessagingClient,
+ network_client.NetworkClient,
account_client.AccountClient,
container_client.ContainerClient,
object_client.ObjectClient,
orchestration_client.OrchestrationClient,
- telemetry_client.TelemetryClientJSON,
- qos_client.QosSpecsClientJSON,
- volume_hosts_client.VolumeHostsClientJSON,
- volume_quotas_client.VolumeQuotasClientJSON,
- volume_services_client.VolumesServicesClientJSON,
- volume_types_client.VolumeTypesClientJSON,
- volume_az_client.VolumeAvailabilityZoneClientJSON,
- backups_client.BackupsClientJSON,
- volume_extensions_client.ExtensionsClientJSON,
- snapshots_client.SnapshotsClientJSON,
- volumes_client.VolumesClientJSON,
- volume_v2_hosts_client.VolumeHostsV2ClientJSON,
+ telemetry_client.TelemetryClient,
+ qos_client.QosSpecsClient,
+ volume_hosts_client.VolumeHostsClient,
+ volume_quotas_client.VolumeQuotasClient,
+ volume_services_client.VolumesServicesClient,
+ volume_types_client.VolumeTypesClient,
+ volume_az_client.VolumeAvailabilityZoneClient,
+ backups_client.BackupsClient,
+ volume_extensions_client.ExtensionsClient,
+ snapshots_client.SnapshotsClient,
+ volumes_client.VolumesClient,
+ volume_v2_hosts_client.VolumeHostsV2Client,
volume_v2_quotas_client.VolumeQuotasV2Client,
- volume_v2_services_client.VolumesServicesV2ClientJSON,
- volume_v2_types_client.VolumeTypesV2ClientJSON,
- volume_v2_az_client.VolumeV2AvailabilityZoneClientJSON,
- volume_v2_backups_client.BackupsClientV2JSON,
- volume_v2_extensions_client.ExtensionsV2ClientJSON,
- volume_v2_qos_client.QosSpecsV2ClientJSON,
- volume_v2_snapshots_client.SnapshotsV2ClientJSON,
- volume_v2_volumes_client.VolumesV2ClientJSON,
- identity_v2_identity_client.IdentityClientJSON,
- credentials_client.CredentialsClientJSON,
- endpoints_client.EndPointClientJSON,
- identity_v3_identity_client.IdentityV3ClientJSON,
- policy_client.PolicyClientJSON,
- region_client.RegionClientJSON,
- service_client.ServiceClientJSON,
- image_client.ImageClientJSON,
- image_v2_client.ImageClientV2JSON
+ volume_v2_services_client.VolumesServicesV2Client,
+ volume_v2_types_client.VolumeTypesV2Client,
+ volume_v2_az_client.VolumeV2AvailabilityZoneClient,
+ volume_v2_backups_client.BackupsClientV2,
+ volume_v2_extensions_client.ExtensionsV2Client,
+ volume_v2_qos_client.QosSpecsV2Client,
+ volume_v2_snapshots_client.SnapshotsV2Client,
+ volume_v2_volumes_client.VolumesV2Client,
+ identity_v2_identity_client.IdentityClient,
+ credentials_client.CredentialsClient,
+ endpoints_client.EndPointClient,
+ identity_v3_identity_client.IdentityV3Client,
+ policy_client.PolicyClient,
+ region_client.RegionClient,
+ service_client.ServiceClient,
+ image_client.ImageClient,
+ image_v2_client.ImageClientV2
]
for client in test_clients:
diff --git a/tempest/tests/common/utils/linux/test_remote_client.py b/tempest/tests/common/utils/linux/test_remote_client.py
index 3506856..3ff8e0d 100644
--- a/tempest/tests/common/utils/linux/test_remote_client.py
+++ b/tempest/tests/common/utils/linux/test_remote_client.py
@@ -28,9 +28,9 @@
super(TestRemoteClient, self).setUp()
self.useFixture(fake_config.ConfigFixture())
self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
- cfg.CONF.set_default('ip_version_for_ssh', 4, group='compute')
+ cfg.CONF.set_default('ip_version_for_ssh', 4, group='validation')
cfg.CONF.set_default('network_for_ssh', 'public', group='compute')
- cfg.CONF.set_default('ssh_channel_timeout', 1, group='compute')
+ cfg.CONF.set_default('connect_timeout', 1, group='validation')
self.conn = remote_client.RemoteClient('127.0.0.1', 'user', 'pass')
self.ssh_mock = self.useFixture(mockpatch.PatchObject(self.conn,
@@ -79,8 +79,7 @@
def test_get_number_of_vcpus(self):
self.ssh_mock.mock.exec_command.return_value = '16'
self.assertEqual(self.conn.get_number_of_vcpus(), 16)
- self._assert_exec_called_with(
- 'cat /proc/cpuinfo | grep processor | wc -l')
+ self._assert_exec_called_with('grep -c processor /proc/cpuinfo')
def test_get_partitions(self):
proc_partitions = """major minor #blocks name
diff --git a/tempest/tests/test_decorators.py b/tempest/tests/test_decorators.py
index e5f51f2..ce3eb7e 100644
--- a/tempest/tests/test_decorators.py
+++ b/tempest/tests/test_decorators.py
@@ -213,8 +213,8 @@
service='compute')
def test_requires_ext_decorator_with_all_ext_enabled(self):
- # disable fixture so the default (all) is used.
- self.config_fixture.cleanUp()
+ cfg.CONF.set_default('api_extensions', 'all',
+ group='compute-feature-enabled')
self._test_requires_ext_helper(expected_to_skip=False,
extension='random_ext',
service='compute')
diff --git a/tempest/tests/test_tenant_isolation.py b/tempest/tests/test_tenant_isolation.py
index 72a63c3..fa1b6f7 100644
--- a/tempest/tests/test_tenant_isolation.py
+++ b/tempest/tests/test_tenant_isolation.py
@@ -46,13 +46,13 @@
def test_tempest_client(self):
iso_creds = isolated_creds.IsolatedCreds(name='test class')
self.assertTrue(isinstance(iso_creds.identity_admin_client,
- json_iden_client.IdentityClientJSON))
+ json_iden_client.IdentityClient))
self.assertTrue(isinstance(iso_creds.network_admin_client,
- json_network_client.NetworkClientJSON))
+ json_network_client.NetworkClient))
def _mock_user_create(self, id, name):
user_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'create_user',
return_value=(service_client.ResponseBody
(200, {'id': id, 'name': name}))))
@@ -60,7 +60,7 @@
def _mock_tenant_create(self, id, name):
tenant_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'create_tenant',
return_value=(service_client.ResponseBody
(200, {'id': id, 'name': name}))))
@@ -68,7 +68,7 @@
def _mock_list_roles(self, id, name):
roles_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'list_roles',
return_value=(service_client.ResponseBodyList
(200,
@@ -78,7 +78,7 @@
def _mock_list_2_roles(self):
roles_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'list_roles',
return_value=(service_client.ResponseBodyList
(200,
@@ -89,7 +89,7 @@
def _mock_assign_user_role(self):
tenant_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'assign_user_role',
return_value=(service_client.ResponseBody
(200, {}))))
@@ -97,7 +97,7 @@
def _mock_list_role(self):
roles_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'list_roles',
return_value=(service_client.ResponseBodyList
(200, [{'id': '1', 'name': 'FakeRole'}]))))
@@ -105,7 +105,7 @@
def _mock_list_ec2_credentials(self, user_id, tenant_id):
ec2_creds_fix = self.useFixture(mockpatch.PatchObject(
- json_iden_client.IdentityClientJSON,
+ json_iden_client.IdentityClient,
'list_user_ec2_credentials',
return_value=(service_client.ResponseBodyList
(200, [{'access': 'fake_access',
@@ -131,7 +131,7 @@
def _mock_router_create(self, id, name):
router_fix = self.useFixture(mockpatch.PatchObject(
- json_network_client.NetworkClientJSON,
+ json_network_client.NetworkClient,
'create_router',
return_value={'router': {'id': id, 'name': name}}))
return router_fix
@@ -139,8 +139,7 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_primary_creds(self, MockRestClient):
cfg.CONF.set_default('neutron', False, 'service_available')
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
self._mock_list_role()
self._mock_tenant_create('1234', 'fake_prim_tenant')
@@ -155,17 +154,16 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_admin_creds(self, MockRestClient):
cfg.CONF.set_default('neutron', False, 'service_available')
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_list_roles('1234', 'admin')
self._mock_user_create('1234', 'fake_admin_user')
self._mock_tenant_create('1234', 'fake_admin_tenant')
- user_mock = mock.patch.object(json_iden_client.IdentityClientJSON,
+ user_mock = mock.patch.object(json_iden_client.IdentityClient,
'assign_user_role')
user_mock.start()
self.addCleanup(user_mock.stop)
- with mock.patch.object(json_iden_client.IdentityClientJSON,
+ with mock.patch.object(json_iden_client.IdentityClient,
'assign_user_role') as user_mock:
admin_creds = iso_creds.get_admin_creds()
user_mock.assert_has_calls([
@@ -179,17 +177,16 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_role_creds(self, MockRestClient):
cfg.CONF.set_default('neutron', False, 'service_available')
- iso_creds = isolated_creds.IsolatedCreds('v2', 'test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds('v2', 'test class')
self._mock_list_2_roles()
self._mock_user_create('1234', 'fake_role_user')
self._mock_tenant_create('1234', 'fake_role_tenant')
- user_mock = mock.patch.object(json_iden_client.IdentityClientJSON,
+ user_mock = mock.patch.object(json_iden_client.IdentityClient,
'assign_user_role')
user_mock.start()
self.addCleanup(user_mock.stop)
- with mock.patch.object(json_iden_client.IdentityClientJSON,
+ with mock.patch.object(json_iden_client.IdentityClient,
'assign_user_role') as user_mock:
role_creds = iso_creds.get_creds_by_roles(roles=['role1', 'role2'])
calls = user_mock.mock_calls
@@ -208,31 +205,25 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_all_cred_cleanup(self, MockRestClient):
cfg.CONF.set_default('neutron', False, 'service_available')
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
- roles_fix = self._mock_list_role()
- tenant_fix = self._mock_tenant_create('1234', 'fake_prim_tenant')
- user_fix = self._mock_user_create('1234', 'fake_prim_user')
+ self._mock_list_role()
+ self._mock_tenant_create('1234', 'fake_prim_tenant')
+ self._mock_user_create('1234', 'fake_prim_user')
iso_creds.get_primary_creds()
- tenant_fix.cleanUp()
- user_fix.cleanUp()
- tenant_fix = self._mock_tenant_create('12345', 'fake_alt_tenant')
- user_fix = self._mock_user_create('12345', 'fake_alt_user')
+ self._mock_tenant_create('12345', 'fake_alt_tenant')
+ self._mock_user_create('12345', 'fake_alt_user')
iso_creds.get_alt_creds()
- tenant_fix.cleanUp()
- user_fix.cleanUp()
- roles_fix.cleanUp()
- tenant_fix = self._mock_tenant_create('123456', 'fake_admin_tenant')
- user_fix = self._mock_user_create('123456', 'fake_admin_user')
+ self._mock_tenant_create('123456', 'fake_admin_tenant')
+ self._mock_user_create('123456', 'fake_admin_user')
self._mock_list_roles('123456', 'admin')
iso_creds.get_admin_creds()
user_mock = self.patch(
'tempest.services.identity.v2.json.identity_client.'
- 'IdentityClientJSON.delete_user')
+ 'IdentityClient.delete_user')
tenant_mock = self.patch(
'tempest.services.identity.v2.json.identity_client.'
- 'IdentityClientJSON.delete_tenant')
+ 'IdentityClient.delete_tenant')
iso_creds.clear_isolated_creds()
# Verify user delete calls
calls = user_mock.mock_calls
@@ -254,8 +245,7 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_alt_creds(self, MockRestClient):
cfg.CONF.set_default('neutron', False, 'service_available')
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
self._mock_list_role()
self._mock_user_create('1234', 'fake_alt_user')
@@ -270,8 +260,7 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_no_network_creation_with_config_set(self, MockRestClient):
cfg.CONF.set_default('create_isolated_networks', False, group='auth')
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
self._mock_list_role()
self._mock_user_create('1234', 'fake_prim_user')
@@ -299,8 +288,7 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_network_creation(self, MockRestClient):
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
self._mock_list_role()
self._mock_user_create('1234', 'fake_prim_user')
@@ -309,7 +297,7 @@
self._mock_subnet_create(iso_creds, '1234', 'fake_subnet')
self._mock_router_create('1234', 'fake_router')
router_interface_mock = self.patch(
- 'tempest.services.network.json.network_client.NetworkClientJSON.'
+ 'tempest.services.network.json.network_client.NetworkClient.'
'add_router_interface_with_subnet_id')
primary_creds = iso_creds.get_primary_creds()
router_interface_mock.called_once_with('1234', '1234')
@@ -331,57 +319,45 @@
"description": args['name'],
"security_group_rules": [],
"id": "sg-%s" % args['tenant_id']}]}
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
# Create primary tenant and network
self._mock_assign_user_role()
- roles_fix = self._mock_list_role()
- user_fix = self._mock_user_create('1234', 'fake_prim_user')
- tenant_fix = self._mock_tenant_create('1234', 'fake_prim_tenant')
- net_fix = self._mock_network_create(iso_creds, '1234', 'fake_net')
- subnet_fix = self._mock_subnet_create(iso_creds, '1234', 'fake_subnet')
- router_fix = self._mock_router_create('1234', 'fake_router')
+ self._mock_list_role()
+ self._mock_user_create('1234', 'fake_prim_user')
+ self._mock_tenant_create('1234', 'fake_prim_tenant')
+ self._mock_network_create(iso_creds, '1234', 'fake_net')
+ self._mock_subnet_create(iso_creds, '1234', 'fake_subnet')
+ self._mock_router_create('1234', 'fake_router')
router_interface_mock = self.patch(
- 'tempest.services.network.json.network_client.NetworkClientJSON.'
+ 'tempest.services.network.json.network_client.NetworkClient.'
'add_router_interface_with_subnet_id')
iso_creds.get_primary_creds()
router_interface_mock.called_once_with('1234', '1234')
router_interface_mock.reset_mock()
- tenant_fix.cleanUp()
- user_fix.cleanUp()
- net_fix.cleanUp()
- subnet_fix.cleanUp()
- router_fix.cleanUp()
# Create alternate tenant and network
- user_fix = self._mock_user_create('12345', 'fake_alt_user')
- tenant_fix = self._mock_tenant_create('12345', 'fake_alt_tenant')
- net_fix = self._mock_network_create(iso_creds, '12345', 'fake_alt_net')
- subnet_fix = self._mock_subnet_create(iso_creds, '12345',
- 'fake_alt_subnet')
- router_fix = self._mock_router_create('12345', 'fake_alt_router')
+ self._mock_user_create('12345', 'fake_alt_user')
+ self._mock_tenant_create('12345', 'fake_alt_tenant')
+ self._mock_network_create(iso_creds, '12345', 'fake_alt_net')
+ self._mock_subnet_create(iso_creds, '12345',
+ 'fake_alt_subnet')
+ self._mock_router_create('12345', 'fake_alt_router')
iso_creds.get_alt_creds()
router_interface_mock.called_once_with('12345', '12345')
router_interface_mock.reset_mock()
- tenant_fix.cleanUp()
- user_fix.cleanUp()
- net_fix.cleanUp()
- subnet_fix.cleanUp()
- router_fix.cleanUp()
- roles_fix.cleanUp()
# Create admin tenant and networks
- user_fix = self._mock_user_create('123456', 'fake_admin_user')
- tenant_fix = self._mock_tenant_create('123456', 'fake_admin_tenant')
- net_fix = self._mock_network_create(iso_creds, '123456',
- 'fake_admin_net')
- subnet_fix = self._mock_subnet_create(iso_creds, '123456',
- 'fake_admin_subnet')
- router_fix = self._mock_router_create('123456', 'fake_admin_router')
+ self._mock_user_create('123456', 'fake_admin_user')
+ self._mock_tenant_create('123456', 'fake_admin_tenant')
+ self._mock_network_create(iso_creds, '123456',
+ 'fake_admin_net')
+ self._mock_subnet_create(iso_creds, '123456',
+ 'fake_admin_subnet')
+ self._mock_router_create('123456', 'fake_admin_router')
self._mock_list_roles('123456', 'admin')
iso_creds.get_admin_creds()
self.patch('tempest.services.identity.v2.json.identity_client.'
- 'IdentityClientJSON.delete_user')
+ 'IdentityClient.delete_user')
self.patch('tempest.services.identity.v2.json.identity_client.'
- 'IdentityClientJSON.delete_tenant')
+ 'IdentityClient.delete_tenant')
net = mock.patch.object(iso_creds.network_admin_client,
'delete_network')
net_mock = net.start()
@@ -392,7 +368,7 @@
'delete_router')
router_mock = router.start()
remove_router_interface_mock = self.patch(
- 'tempest.services.network.json.network_client.NetworkClientJSON.'
+ 'tempest.services.network.json.network_client.NetworkClient.'
'remove_router_interface_with_subnet_id')
return_values = ({'status': 200}, {'ports': []})
port_list_mock = mock.patch.object(iso_creds.network_admin_client,
@@ -408,7 +384,7 @@
return_values = (fake_http.fake_httplib({}, status=204), {})
remove_secgroup_mock = self.patch(
'tempest.services.network.json.network_client.'
- 'NetworkClientJSON.delete', return_value=return_values)
+ 'NetworkClient.delete', return_value=return_values)
iso_creds.clear_isolated_creds()
# Verify default security group delete
calls = remove_secgroup_mock.mock_calls
@@ -453,8 +429,7 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_network_alt_creation(self, MockRestClient):
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
self._mock_list_role()
self._mock_user_create('1234', 'fake_alt_user')
@@ -463,7 +438,7 @@
self._mock_subnet_create(iso_creds, '1234', 'fake_alt_subnet')
self._mock_router_create('1234', 'fake_alt_router')
router_interface_mock = self.patch(
- 'tempest.services.network.json.network_client.NetworkClientJSON.'
+ 'tempest.services.network.json.network_client.NetworkClient.'
'add_router_interface_with_subnet_id')
alt_creds = iso_creds.get_alt_creds()
router_interface_mock.called_once_with('1234', '1234')
@@ -479,8 +454,7 @@
@mock.patch('tempest_lib.common.rest_client.RestClient')
def test_network_admin_creation(self, MockRestClient):
- iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password')
+ iso_creds = isolated_creds.IsolatedCreds(name='test class')
self._mock_assign_user_role()
self._mock_user_create('1234', 'fake_admin_user')
self._mock_tenant_create('1234', 'fake_admin_tenant')
@@ -488,7 +462,7 @@
self._mock_subnet_create(iso_creds, '1234', 'fake_admin_subnet')
self._mock_router_create('1234', 'fake_admin_router')
router_interface_mock = self.patch(
- 'tempest.services.network.json.network_client.NetworkClientJSON.'
+ 'tempest.services.network.json.network_client.NetworkClient.'
'add_router_interface_with_subnet_id')
self._mock_list_roles('123456', 'admin')
admin_creds = iso_creds.get_admin_creds()
@@ -512,7 +486,6 @@
'dhcp': False,
}
iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password',
network_resources=net_dict)
self._mock_assign_user_role()
self._mock_list_role()
@@ -548,7 +521,6 @@
'dhcp': False,
}
iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password',
network_resources=net_dict)
self._mock_assign_user_role()
self._mock_list_role()
@@ -566,7 +538,6 @@
'dhcp': False,
}
iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password',
network_resources=net_dict)
self._mock_assign_user_role()
self._mock_list_role()
@@ -584,7 +555,6 @@
'dhcp': True,
}
iso_creds = isolated_creds.IsolatedCreds(name='test class',
- password='fake_password',
network_resources=net_dict)
self._mock_assign_user_role()
self._mock_list_role()
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index b7f0e81..920f602 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -14,8 +14,8 @@
# under the License.
from oslo_log import log as logging
-from tempest_lib.common.utils import data_utils
+from tempest.common.utils import data_utils
from tempest.common.utils.linux import remote_client
from tempest import config
from tempest import exceptions
diff --git a/tempest/thirdparty/boto/test_ec2_keys.py b/tempest/thirdparty/boto/test_ec2_keys.py
index 58a5776..1b58cb4 100644
--- a/tempest/thirdparty/boto/test_ec2_keys.py
+++ b/tempest/thirdparty/boto/test_ec2_keys.py
@@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import test
from tempest.thirdparty.boto import test as boto_test
diff --git a/tempest/thirdparty/boto/test_ec2_security_groups.py b/tempest/thirdparty/boto/test_ec2_security_groups.py
index 94fab09..88ff154 100644
--- a/tempest/thirdparty/boto/test_ec2_security_groups.py
+++ b/tempest/thirdparty/boto/test_ec2_security_groups.py
@@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import test
from tempest.thirdparty.boto import test as boto_test
diff --git a/tempest/thirdparty/boto/test_s3_buckets.py b/tempest/thirdparty/boto/test_s3_buckets.py
index 45401fd..f008973 100644
--- a/tempest/thirdparty/boto/test_s3_buckets.py
+++ b/tempest/thirdparty/boto/test_s3_buckets.py
@@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import test
from tempest.thirdparty.boto import test as boto_test
diff --git a/tempest/thirdparty/boto/test_s3_ec2_images.py b/tempest/thirdparty/boto/test_s3_ec2_images.py
index 1521249..c41c7ac 100644
--- a/tempest/thirdparty/boto/test_s3_ec2_images.py
+++ b/tempest/thirdparty/boto/test_s3_ec2_images.py
@@ -15,8 +15,7 @@
import os
-from tempest_lib.common.utils import data_utils
-
+from tempest.common.utils import data_utils
from tempest import config
from tempest import test
from tempest.thirdparty.boto import test as boto_test
diff --git a/tempest/thirdparty/boto/test_s3_objects.py b/tempest/thirdparty/boto/test_s3_objects.py
index dba231c..c42d85c 100644
--- a/tempest/thirdparty/boto/test_s3_objects.py
+++ b/tempest/thirdparty/boto/test_s3_objects.py
@@ -16,8 +16,8 @@
import contextlib
import boto.s3.key
-from tempest_lib.common.utils import data_utils
+from tempest.common.utils import data_utils
from tempest import test
from tempest.thirdparty.boto import test as boto_test
diff --git a/test-requirements.txt b/test-requirements.txt
index 9bd3f46..2b3607d 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -10,4 +10,3 @@
mock>=1.0
coverage>=3.6
oslotest>=1.5.1 # Apache-2.0
-stevedore>=1.5.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index b495fd6..cf7013d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,13 +13,7 @@
[testenv]
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./tempest/tests
-passenv = OS_STDOUT_CAPTURE
- OS_STDERR_CAPTURE
- OS_TEST_TIMEOUT
- OS_TEST_LOCK_PATH
- OS_TEST_PATH
- TEMPEST_CONFIG
- TEMPEST_CONFIG_DIR
+passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH OS_TEST_PATH TEMPEST_CONFIG TEMPEST_CONFIG_DIR http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
usedevelop = True
install_command = pip install -U {opts} {packages}
whitelist_externals = *