summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/write_tests.rst10
-rw-r--r--tempest/api/compute/admin/test_agents.py2
-rw-r--r--tempest/api/compute/admin/test_aggregates.py6
-rw-r--r--tempest/api/compute/admin/test_aggregates_negative.py6
-rw-r--r--tempest/api/compute/admin/test_auto_allocate_network.py8
-rw-r--r--tempest/api/compute/admin/test_fixed_ips.py2
-rw-r--r--tempest/api/compute/admin/test_fixed_ips_negative.py2
-rw-r--r--tempest/api/compute/admin/test_flavors.py2
-rw-r--r--tempest/api/compute/admin/test_floating_ips_bulk.py2
-rw-r--r--tempest/api/compute/admin/test_hosts.py2
-rw-r--r--tempest/api/compute/admin/test_hosts_negative.py4
-rw-r--r--tempest/api/compute/admin/test_hypervisor.py2
-rw-r--r--tempest/api/compute/admin/test_hypervisor_negative.py2
-rw-r--r--tempest/api/compute/admin/test_instance_usage_audit_log.py2
-rw-r--r--tempest/api/compute/admin/test_instance_usage_audit_log_negative.py2
-rw-r--r--tempest/api/compute/admin/test_keypairs_v210.py4
-rw-r--r--tempest/api/compute/admin/test_live_migration.py4
-rw-r--r--tempest/api/compute/admin/test_migrations.py2
-rw-r--r--tempest/api/compute/admin/test_networks.py2
-rw-r--r--tempest/api/compute/admin/test_quotas.py4
-rw-r--r--tempest/api/compute/admin/test_quotas_negative.py4
-rw-r--r--tempest/api/compute/admin/test_security_group_default_rules.py2
-rw-r--r--tempest/api/compute/admin/test_security_groups.py2
-rw-r--r--tempest/api/compute/admin/test_servers.py2
-rw-r--r--tempest/api/compute/admin/test_servers_negative.py4
-rw-r--r--tempest/api/compute/admin/test_servers_on_multinodes.py2
-rw-r--r--tempest/api/compute/admin/test_services.py2
-rw-r--r--tempest/api/compute/admin/test_services_negative.py2
-rw-r--r--tempest/api/compute/admin/test_simple_tenant_usage.py4
-rw-r--r--tempest/api/compute/admin/test_simple_tenant_usage_negative.py4
-rw-r--r--tempest/api/compute/base.py65
-rw-r--r--tempest/api/compute/flavors/test_flavors_negative.py4
-rw-r--r--tempest/api/compute/images/test_image_metadata.py4
-rw-r--r--tempest/api/compute/images/test_list_image_filters.py4
-rw-r--r--tempest/api/compute/servers/test_attach_interfaces.py6
-rw-r--r--tempest/api/compute/servers/test_create_server.py4
-rw-r--r--tempest/api/compute/servers/test_device_tagging.py8
-rw-r--r--tempest/api/compute/servers/test_disk_config.py2
-rw-r--r--tempest/api/compute/servers/test_server_actions.py4
-rw-r--r--tempest/api/compute/test_networks.py2
-rw-r--r--tempest/api/compute/test_tenant_networks.py2
-rw-r--r--tempest/api/identity/admin/v3/test_tokens.py4
-rw-r--r--tempest/api/identity/admin/v3/test_trusts.py6
-rw-r--r--tempest/api/identity/admin/v3/test_users.py4
-rw-r--r--tempest/api/identity/base.py78
-rw-r--r--tempest/api/identity/v2/test_ec2_credentials.py2
-rw-r--r--tempest/api/identity/v2/test_tenants.py13
-rw-r--r--tempest/api/identity/v2/test_tokens.py2
-rw-r--r--tempest/api/identity/v2/test_users.py2
-rw-r--r--tempest/api/identity/v3/test_projects.py19
-rw-r--r--tempest/api/identity/v3/test_tokens.py2
-rw-r--r--tempest/api/identity/v3/test_users.py2
-rw-r--r--tempest/api/image/base.py31
-rw-r--r--tempest/api/image/v2/test_images.py2
-rw-r--r--tempest/api/network/admin/test_floating_ips_admin_actions.py2
-rw-r--r--tempest/api/network/base.py45
-rw-r--r--tempest/api/object_storage/base.py10
-rw-r--r--tempest/api/object_storage/test_account_quotas.py13
-rw-r--r--tempest/api/object_storage/test_account_quotas_negative.py8
-rw-r--r--tempest/api/orchestration/base.py12
-rw-r--r--tempest/api/orchestration/stacks/test_neutron_resources.py6
-rw-r--r--tempest/api/orchestration/stacks/test_swift_resources.py4
-rw-r--r--tempest/api/volume/admin/test_volume_quotas.py6
-rw-r--r--tempest/api/volume/admin/test_volume_quotas_negative.py2
-rw-r--r--tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py2
-rw-r--r--tempest/api/volume/base.py55
-rw-r--r--tempest/api/volume/test_volume_transfers.py4
-rw-r--r--tempest/scenario/manager.py4
-rw-r--r--tempest/scenario/test_network_advanced_server_ops.py2
-rw-r--r--tempest/scenario/test_server_multinode.py2
-rw-r--r--tempest/scenario/test_volume_migrate_attached.py2
-rw-r--r--tempest/test.py28
72 files changed, 301 insertions, 276 deletions
diff --git a/doc/source/write_tests.rst b/doc/source/write_tests.rst
index 8488fb1a0..2363fa66f 100644
--- a/doc/source/write_tests.rst
+++ b/doc/source/write_tests.rst
@@ -99,7 +99,7 @@ of these would be::
specific situations you should not need to use this.
"""
super(TestExampleCase, cls).setup_clients()
- cls.servers_client = cls.os.servers_client
+ cls.servers_client = cls.os_primary.servers_client
@classmethod
def resource_setup(cls):
@@ -143,10 +143,10 @@ to set a class variable ``credentials`` on the TestCase directly. For example::
In this example the ``TestExampleAdmin`` TestCase will allocate 2 sets of
credentials, one regular user and one admin user. The corresponding manager
-objects will be set as class variables cls.os and cls.os_adm respectively. You
-can also allocate a second user by putting **'alt'** in the list too. A set of
-alt credentials are the same as primary but can be used for tests cases that
-need a second user/project.
+objects will be set as class variables ``cls.os_primary`` and ``cls.os_admin``
+respectively. You can also allocate a second user by putting **'alt'** in the
+list too. A set of alt credentials are the same as primary but can be used
+for tests cases that need a second user/project.
You can also specify credentials with specific roles assigned. This is useful
for cases where there are specific RBAC requirements hard coded into an API.
diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py
index 4ae437287..31976ec7a 100644
--- a/tempest/api/compute/admin/test_agents.py
+++ b/tempest/api/compute/admin/test_agents.py
@@ -23,7 +23,7 @@ class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(AgentsAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.agents_client
+ cls.client = cls.os_admin.agents_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 2f5382e75..79d03f4a7 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -31,7 +31,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(AggregatesAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.aggregates_client
+ cls.client = cls.os_admin.aggregates_client
@classmethod
def resource_setup(cls):
@@ -40,7 +40,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
cls.az_name_prefix = 'test_az'
cls.host = None
- hypers = cls.os_adm.hypervisor_client.list_hypervisors(
+ hypers = cls.os_admin.hypervisor_client.list_hypervisors(
detail=True)['hypervisors']
if CONF.compute.hypervisor_type:
@@ -226,7 +226,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
self.client.add_host(aggregate['id'], host=self.host)
self.addCleanup(self.client.remove_host, aggregate['id'],
host=self.host)
- admin_servers_client = self.os_adm.servers_client
+ admin_servers_client = self.os_admin.servers_client
server = self.create_test_server(availability_zone=az_name,
wait_until='ACTIVE')
body = admin_servers_client.show_server(server['id'])['server']
diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py
index 69689a786..41be620d4 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -26,7 +26,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(AggregatesAdminNegativeTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.aggregates_client
+ cls.client = cls.os_admin.aggregates_client
cls.user_client = cls.aggregates_client
@classmethod
@@ -34,7 +34,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
super(AggregatesAdminNegativeTestJSON, cls).resource_setup()
cls.aggregate_name_prefix = 'test_aggregate'
- hosts_all = cls.os_adm.hosts_client.list_hosts()['hosts']
+ hosts_all = cls.os_admin.hosts_client.list_hosts()['hosts']
hosts = ([host['host_name']
for host in hosts_all if host['service'] == 'compute'])
cls.host = hosts[0]
@@ -124,7 +124,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@decorators.idempotent_id('0ef07828-12b4-45ba-87cc-41425faf5711')
def test_aggregate_add_non_exist_host(self):
# Adding a non-exist host to an aggregate should raise exceptions.
- hosts_all = self.os_adm.hosts_client.list_hosts()['hosts']
+ hosts_all = self.os_admin.hosts_client.list_hosts()['hosts']
hosts = map(lambda x: x['host_name'], hosts_all)
while True:
non_exist_host = data_utils.rand_name('nonexist_host')
diff --git a/tempest/api/compute/admin/test_auto_allocate_network.py b/tempest/api/compute/admin/test_auto_allocate_network.py
index 7fda7328d..c4db5e399 100644
--- a/tempest/api/compute/admin/test_auto_allocate_network.py
+++ b/tempest/api/compute/admin/test_auto_allocate_network.py
@@ -66,10 +66,10 @@ class AutoAllocateNetworkTest(base.BaseV2ComputeTest):
@classmethod
def setup_clients(cls):
super(AutoAllocateNetworkTest, cls).setup_clients()
- cls.networks_client = cls.os.networks_client
- cls.routers_client = cls.os.routers_client
- cls.subnets_client = cls.os.subnets_client
- cls.ports_client = cls.os.ports_client
+ cls.networks_client = cls.os_primary.networks_client
+ cls.routers_client = cls.os_primary.routers_client
+ cls.subnets_client = cls.os_primary.subnets_client
+ cls.ports_client = cls.os_primary.ports_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index 10ed519a8..1e09eeb44 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -33,7 +33,7 @@ class FixedIPsTestJson(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(FixedIPsTestJson, cls).setup_clients()
- cls.client = cls.os_adm.fixed_ips_client
+ cls.client = cls.os_admin.fixed_ips_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py
index 5134b8181..a77011e6a 100644
--- a/tempest/api/compute/admin/test_fixed_ips_negative.py
+++ b/tempest/api/compute/admin/test_fixed_ips_negative.py
@@ -33,7 +33,7 @@ class FixedIPsNegativeTestJson(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(FixedIPsNegativeTestJson, cls).setup_clients()
- cls.client = cls.os_adm.fixed_ips_client
+ cls.client = cls.os_admin.fixed_ips_client
cls.non_admin_client = cls.fixed_ips_client
@classmethod
diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index 382189510..36ebc252f 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -163,7 +163,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
# Verify flavor is not used by other user
self.assertRaises(lib_exc.BadRequest,
- self.os.servers_client.create_server,
+ self.os_primary.servers_client.create_server,
name='test', imageRef=self.image_ref,
flavorRef=flavor['id'])
diff --git a/tempest/api/compute/admin/test_floating_ips_bulk.py b/tempest/api/compute/admin/test_floating_ips_bulk.py
index f38af5652..056b4bdc0 100644
--- a/tempest/api/compute/admin/test_floating_ips_bulk.py
+++ b/tempest/api/compute/admin/test_floating_ips_bulk.py
@@ -35,7 +35,7 @@ class FloatingIPsBulkAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(FloatingIPsBulkAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.floating_ips_bulk_client
+ cls.client = cls.os_admin.floating_ips_bulk_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py
index b66495525..8e2f6edf5 100644
--- a/tempest/api/compute/admin/test_hosts.py
+++ b/tempest/api/compute/admin/test_hosts.py
@@ -23,7 +23,7 @@ class HostsAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(HostsAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.hosts_client
+ cls.client = cls.os_admin.hosts_client
@decorators.idempotent_id('9bfaf98d-e2cb-44b0-a07e-2558b2821e4f')
def test_list_hosts(self):
diff --git a/tempest/api/compute/admin/test_hosts_negative.py b/tempest/api/compute/admin/test_hosts_negative.py
index 684f6568a..5bd810419 100644
--- a/tempest/api/compute/admin/test_hosts_negative.py
+++ b/tempest/api/compute/admin/test_hosts_negative.py
@@ -23,8 +23,8 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(HostsAdminNegativeTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.hosts_client
- cls.non_admin_client = cls.os.hosts_client
+ cls.client = cls.os_admin.hosts_client
+ cls.non_admin_client = cls.os_primary.hosts_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/admin/test_hypervisor.py b/tempest/api/compute/admin/test_hypervisor.py
index e0e5a29e1..4544267d0 100644
--- a/tempest/api/compute/admin/test_hypervisor.py
+++ b/tempest/api/compute/admin/test_hypervisor.py
@@ -23,7 +23,7 @@ class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(HypervisorAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.hypervisor_client
+ cls.client = cls.os_admin.hypervisor_client
def _list_hypervisors(self):
# List of hypervisors
diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py
index 2addce924..af872871f 100644
--- a/tempest/api/compute/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/admin/test_hypervisor_negative.py
@@ -25,7 +25,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(HypervisorAdminNegativeTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.hypervisor_client
+ cls.client = cls.os_admin.hypervisor_client
cls.non_adm_client = cls.hypervisor_client
def _list_hypervisors(self):
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 b613a268a..e4a2ffdd2 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log.py
@@ -26,7 +26,7 @@ class InstanceUsageAuditLogTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(InstanceUsageAuditLogTestJSON, cls).setup_clients()
- cls.adm_client = cls.os_adm.instance_usages_audit_log_client
+ cls.adm_client = cls.os_admin.instance_usages_audit_log_client
@decorators.idempotent_id('25319919-33d9-424f-9f99-2c203ee48b9d')
def test_list_instance_usage_audit_logs(self):
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 92235cc7f..de8e221a5 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
@@ -27,7 +27,7 @@ class InstanceUsageAuditLogNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(InstanceUsageAuditLogNegativeTestJSON, cls).setup_clients()
- cls.adm_client = cls.os_adm.instance_usages_audit_log_client
+ cls.adm_client = cls.os_admin.instance_usages_audit_log_client
@decorators.attr(type=['negative'])
@decorators.idempotent_id('a9d33178-d2c9-4131-ad3b-f4ca8d0308a2')
diff --git a/tempest/api/compute/admin/test_keypairs_v210.py b/tempest/api/compute/admin/test_keypairs_v210.py
index b6c2c3d84..e24c7c100 100644
--- a/tempest/api/compute/admin/test_keypairs_v210.py
+++ b/tempest/api/compute/admin/test_keypairs_v210.py
@@ -25,8 +25,8 @@ class KeyPairsV210TestJSON(base.BaseKeypairTest):
@classmethod
def setup_clients(cls):
super(KeyPairsV210TestJSON, cls).setup_clients()
- cls.client = cls.os_adm.keypairs_client
- cls.non_admin_client = cls.os.keypairs_client
+ cls.client = cls.os_admin.keypairs_client
+ cls.non_admin_client = cls.os_primary.keypairs_client
def _create_and_check_keypairs(self, user_id):
key_list = list()
diff --git a/tempest/api/compute/admin/test_live_migration.py b/tempest/api/compute/admin/test_live_migration.py
index 834410357..3859e64b3 100644
--- a/tempest/api/compute/admin/test_live_migration.py
+++ b/tempest/api/compute/admin/test_live_migration.py
@@ -48,8 +48,8 @@ class LiveBlockMigrationTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(LiveBlockMigrationTestJSON, cls).setup_clients()
- cls.admin_hosts_client = cls.os_adm.hosts_client
- cls.admin_migration_client = cls.os_adm.migrations_client
+ cls.admin_hosts_client = cls.os_admin.hosts_client
+ cls.admin_migration_client = cls.os_admin.migrations_client
@classmethod
def _get_compute_hostnames(cls):
diff --git a/tempest/api/compute/admin/test_migrations.py b/tempest/api/compute/admin/test_migrations.py
index df8b17543..a626ebb71 100644
--- a/tempest/api/compute/admin/test_migrations.py
+++ b/tempest/api/compute/admin/test_migrations.py
@@ -29,7 +29,7 @@ class MigrationsAdminTest(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(MigrationsAdminTest, cls).setup_clients()
- cls.client = cls.os_adm.migrations_client
+ cls.client = cls.os_admin.migrations_client
@decorators.idempotent_id('75c0b83d-72a0-4cf8-a153-631e83e7d53f')
def test_list_migrations(self):
diff --git a/tempest/api/compute/admin/test_networks.py b/tempest/api/compute/admin/test_networks.py
index 12ae86463..0ea0a7897 100644
--- a/tempest/api/compute/admin/test_networks.py
+++ b/tempest/api/compute/admin/test_networks.py
@@ -30,7 +30,7 @@ class NetworksTest(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(NetworksTest, cls).setup_clients()
- cls.client = cls.os_adm.compute_networks_client
+ cls.client = cls.os_admin.compute_networks_client
@decorators.idempotent_id('d206d211-8912-486f-86e2-a9d090d1f416')
def test_get_network(self):
diff --git a/tempest/api/compute/admin/test_quotas.py b/tempest/api/compute/admin/test_quotas.py
index c9d772220..937540e2a 100644
--- a/tempest/api/compute/admin/test_quotas.py
+++ b/tempest/api/compute/admin/test_quotas.py
@@ -35,7 +35,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(QuotasAdminTestJSON, cls).setup_clients()
- cls.adm_client = cls.os_adm.quotas_client
+ cls.adm_client = cls.os_admin.quotas_client
@classmethod
def resource_setup(cls):
@@ -153,7 +153,7 @@ class QuotaClassesAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def resource_setup(cls):
super(QuotaClassesAdminTestJSON, cls).resource_setup()
- cls.adm_client = cls.os_adm.quota_classes_client
+ cls.adm_client = cls.os_admin.quota_classes_client
def _restore_default_quotas(self, original_defaults):
LOG.debug("restoring quota class defaults")
diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py
index cc4654d2a..747f32032 100644
--- a/tempest/api/compute/admin/test_quotas_negative.py
+++ b/tempest/api/compute/admin/test_quotas_negative.py
@@ -28,8 +28,8 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(QuotasAdminNegativeTestJSON, cls).setup_clients()
- cls.client = cls.os.quotas_client
- cls.adm_client = cls.os_adm.quotas_client
+ cls.client = cls.os_primary.quotas_client
+ cls.adm_client = cls.os_admin.quotas_client
cls.sg_client = cls.security_groups_client
cls.sgr_client = cls.security_group_rules_client
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 ab97bd41c..6c7cde270 100644
--- a/tempest/api/compute/admin/test_security_group_default_rules.py
+++ b/tempest/api/compute/admin/test_security_group_default_rules.py
@@ -38,7 +38,7 @@ class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(SecurityGroupDefaultRulesTest, cls).setup_clients()
- cls.adm_client = cls.os_adm.security_group_default_rules_client
+ cls.adm_client = cls.os_admin.security_group_default_rules_client
def _create_security_group_default_rules(self, ip_protocol='tcp',
from_port=22, to_port=22,
diff --git a/tempest/api/compute/admin/test_security_groups.py b/tempest/api/compute/admin/test_security_groups.py
index b4d0f2a40..8abe03aac 100644
--- a/tempest/api/compute/admin/test_security_groups.py
+++ b/tempest/api/compute/admin/test_security_groups.py
@@ -24,7 +24,7 @@ class SecurityGroupsTestAdminJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(SecurityGroupsTestAdminJSON, cls).setup_clients()
- cls.adm_client = cls.os_adm.compute_security_groups_client
+ cls.adm_client = cls.os_admin.compute_security_groups_client
cls.client = cls.security_groups_client
def _delete_security_group(self, securitygroup_id, admin=True):
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index aff61bf47..98bf4bf7d 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -26,7 +26,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(ServersAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.servers_client
+ cls.client = cls.os_admin.servers_client
cls.non_admin_client = cls.servers_client
@classmethod
diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py
index 677972ec3..b0f18d784 100644
--- a/tempest/api/compute/admin/test_servers_negative.py
+++ b/tempest/api/compute/admin/test_servers_negative.py
@@ -31,9 +31,9 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(ServersAdminNegativeTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.servers_client
+ cls.client = cls.os_admin.servers_client
cls.non_adm_client = cls.servers_client
- cls.quotas_client = cls.os_adm.quotas_client
+ cls.quotas_client = cls.os_admin.quotas_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/admin/test_servers_on_multinodes.py b/tempest/api/compute/admin/test_servers_on_multinodes.py
index 6b9227399..6a2e5e940 100644
--- a/tempest/api/compute/admin/test_servers_on_multinodes.py
+++ b/tempest/api/compute/admin/test_servers_on_multinodes.py
@@ -33,7 +33,7 @@ class ServersOnMultiNodesTest(base.BaseV2ComputeAdminTest):
"Less than 2 compute nodes, skipping multi-nodes test.")
def _get_host(self, server_id):
- return self.os_adm.servers_client.show_server(
+ return self.os_admin.servers_client.show_server(
server_id)['server']['OS-EXT-SRV-ATTR:host']
@decorators.idempotent_id('26a9d5df-6890-45f2-abc4-a659290cb130')
diff --git a/tempest/api/compute/admin/test_services.py b/tempest/api/compute/admin/test_services.py
index c1c1c825f..1dfc13e6a 100644
--- a/tempest/api/compute/admin/test_services.py
+++ b/tempest/api/compute/admin/test_services.py
@@ -24,7 +24,7 @@ class ServicesAdminTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(ServicesAdminTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.services_client
+ cls.client = cls.os_admin.services_client
@decorators.idempotent_id('5be41ef4-53d1-41cc-8839-5c2a48a1b283')
def test_list_services(self):
diff --git a/tempest/api/compute/admin/test_services_negative.py b/tempest/api/compute/admin/test_services_negative.py
index 1edfc8919..38bb5ec93 100644
--- a/tempest/api/compute/admin/test_services_negative.py
+++ b/tempest/api/compute/admin/test_services_negative.py
@@ -23,7 +23,7 @@ class ServicesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(ServicesAdminNegativeTestJSON, cls).setup_clients()
- cls.client = cls.os_adm.services_client
+ cls.client = cls.os_admin.services_client
cls.non_admin_client = cls.services_client
@decorators.attr(type=['negative'])
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index ef5558426..d4c60b349 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -30,8 +30,8 @@ class TenantUsagesTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(TenantUsagesTestJSON, cls).setup_clients()
- cls.adm_client = cls.os_adm.tenant_usages_client
- cls.client = cls.os.tenant_usages_client
+ cls.adm_client = cls.os_admin.tenant_usages_client
+ cls.client = cls.os_primary.tenant_usages_client
@classmethod
def resource_setup(cls):
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 222d28ce5..cb60b8d30 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
@@ -25,8 +25,8 @@ class TenantUsagesNegativeTestJSON(base.BaseV2ComputeAdminTest):
@classmethod
def setup_clients(cls):
super(TenantUsagesNegativeTestJSON, cls).setup_clients()
- cls.adm_client = cls.os_adm.tenant_usages_client
- cls.client = cls.os.tenant_usages_client
+ cls.adm_client = cls.os_admin.tenant_usages_client
+ cls.client = cls.os_primary.tenant_usages_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 173646331..a5ee71622 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -63,38 +63,41 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest,
@classmethod
def setup_clients(cls):
super(BaseV2ComputeTest, cls).setup_clients()
- cls.servers_client = cls.os.servers_client
- cls.server_groups_client = cls.os.server_groups_client
- cls.flavors_client = cls.os.flavors_client
- cls.compute_images_client = cls.os.compute_images_client
- cls.extensions_client = cls.os.extensions_client
- cls.floating_ip_pools_client = cls.os.floating_ip_pools_client
- cls.floating_ips_client = cls.os.compute_floating_ips_client
- cls.keypairs_client = cls.os.keypairs_client
+ cls.servers_client = cls.os_primary.servers_client
+ cls.server_groups_client = cls.os_primary.server_groups_client
+ cls.flavors_client = cls.os_primary.flavors_client
+ cls.compute_images_client = cls.os_primary.compute_images_client
+ cls.extensions_client = cls.os_primary.extensions_client
+ cls.floating_ip_pools_client = cls.os_primary.floating_ip_pools_client
+ cls.floating_ips_client = cls.os_primary.compute_floating_ips_client
+ cls.keypairs_client = cls.os_primary.keypairs_client
cls.security_group_rules_client = (
- cls.os.compute_security_group_rules_client)
- cls.security_groups_client = cls.os.compute_security_groups_client
- cls.quotas_client = cls.os.quotas_client
- cls.compute_networks_client = cls.os.compute_networks_client
- cls.limits_client = cls.os.limits_client
- cls.volumes_extensions_client = cls.os.volumes_extensions_client
- cls.snapshots_extensions_client = cls.os.snapshots_extensions_client
- cls.interfaces_client = cls.os.interfaces_client
- cls.fixed_ips_client = cls.os.fixed_ips_client
- cls.availability_zone_client = cls.os.availability_zone_client
- cls.agents_client = cls.os.agents_client
- cls.aggregates_client = cls.os.aggregates_client
- cls.services_client = cls.os.services_client
+ cls.os_primary.compute_security_group_rules_client)
+ cls.security_groups_client =\
+ cls.os_primary.compute_security_groups_client
+ cls.quotas_client = cls.os_primary.quotas_client
+ cls.compute_networks_client = cls.os_primary.compute_networks_client
+ cls.limits_client = cls.os_primary.limits_client
+ cls.volumes_extensions_client =\
+ cls.os_primary.volumes_extensions_client
+ cls.snapshots_extensions_client =\
+ cls.os_primary.snapshots_extensions_client
+ cls.interfaces_client = cls.os_primary.interfaces_client
+ cls.fixed_ips_client = cls.os_primary.fixed_ips_client
+ cls.availability_zone_client = cls.os_primary.availability_zone_client
+ cls.agents_client = cls.os_primary.agents_client
+ cls.aggregates_client = cls.os_primary.aggregates_client
+ cls.services_client = cls.os_primary.services_client
cls.instance_usages_audit_log_client = (
- cls.os.instance_usages_audit_log_client)
- cls.hypervisor_client = cls.os.hypervisor_client
- cls.certificates_client = cls.os.certificates_client
- cls.migrations_client = cls.os.migrations_client
+ cls.os_primary.instance_usages_audit_log_client)
+ cls.hypervisor_client = cls.os_primary.hypervisor_client
+ cls.certificates_client = cls.os_primary.certificates_client
+ cls.migrations_client = cls.os_primary.migrations_client
cls.security_group_default_rules_client = (
- cls.os.security_group_default_rules_client)
- cls.versions_client = cls.os.compute_versions_client
+ cls.os_primary.security_group_default_rules_client)
+ cls.versions_client = cls.os_primary.compute_versions_client
- cls.volumes_client = cls.os.volumes_v2_client
+ cls.volumes_client = cls.os_primary.volumes_v2_client
@classmethod
def resource_setup(cls):
@@ -470,9 +473,9 @@ class BaseV2ComputeAdminTest(BaseV2ComputeTest):
def setup_clients(cls):
super(BaseV2ComputeAdminTest, cls).setup_clients()
cls.availability_zone_admin_client = (
- cls.os_adm.availability_zone_client)
- cls.admin_flavors_client = cls.os_adm.flavors_client
- cls.admin_servers_client = cls.os_adm.servers_client
+ cls.os_admin.availability_zone_client)
+ cls.admin_flavors_client = cls.os_admin.flavors_client
+ cls.admin_servers_client = cls.os_admin.servers_client
def create_flavor(self, ram, vcpus, disk, name=None,
is_public='True', **kwargs):
diff --git a/tempest/api/compute/flavors/test_flavors_negative.py b/tempest/api/compute/flavors/test_flavors_negative.py
index 91e968465..ebb9d2ec5 100644
--- a/tempest/api/compute/flavors/test_flavors_negative.py
+++ b/tempest/api/compute/flavors/test_flavors_negative.py
@@ -34,9 +34,9 @@ class FlavorsV2NegativeTest(base.BaseV2ComputeTest):
def setup_clients(cls):
super(FlavorsV2NegativeTest, cls).setup_clients()
if CONF.image_feature_enabled.api_v1:
- cls.images_client = cls.os.image_client
+ cls.images_client = cls.os_primary.image_client
elif CONF.image_feature_enabled.api_v2:
- cls.images_client = cls.os.image_client_v2
+ cls.images_client = cls.os_primary.image_client_v2
else:
raise lib_exc.InvalidConfiguration(
'Either api_v1 or api_v2 must be True in '
diff --git a/tempest/api/compute/images/test_image_metadata.py b/tempest/api/compute/images/test_image_metadata.py
index dcc44d8f0..8d503dcb3 100644
--- a/tempest/api/compute/images/test_image_metadata.py
+++ b/tempest/api/compute/images/test_image_metadata.py
@@ -42,9 +42,9 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
# prefer glance v1 for the compute API tests since the compute image
# API proxy was written for glance v1.
if CONF.image_feature_enabled.api_v1:
- cls.glance_client = cls.os.image_client
+ cls.glance_client = cls.os_primary.image_client
elif CONF.image_feature_enabled.api_v2:
- cls.glance_client = cls.os.image_client_v2
+ cls.glance_client = cls.os_primary.image_client_v2
else:
raise exceptions.InvalidConfiguration(
'Either api_v1 or api_v2 must be True in '
diff --git a/tempest/api/compute/images/test_list_image_filters.py b/tempest/api/compute/images/test_list_image_filters.py
index 7168a8c12..6677aa246 100644
--- a/tempest/api/compute/images/test_list_image_filters.py
+++ b/tempest/api/compute/images/test_list_image_filters.py
@@ -46,9 +46,9 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
# prefer glance v1 for the compute API tests since the compute image
# API proxy was written for glance v1.
if CONF.image_feature_enabled.api_v1:
- cls.glance_client = cls.os.image_client
+ cls.glance_client = cls.os_primary.image_client
elif CONF.image_feature_enabled.api_v2:
- cls.glance_client = cls.os.image_client_v2
+ cls.glance_client = cls.os_primary.image_client_v2
else:
raise exceptions.InvalidConfiguration(
'Either api_v1 or api_v2 must be True in '
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 06a47d16d..e50b29a3d 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -46,8 +46,8 @@ class AttachInterfacesTestJSON(base.BaseV2ComputeTest):
@classmethod
def setup_clients(cls):
super(AttachInterfacesTestJSON, cls).setup_clients()
- cls.subnets_client = cls.os.subnets_client
- cls.ports_client = cls.os.ports_client
+ cls.subnets_client = cls.os_primary.subnets_client
+ cls.ports_client = cls.os_primary.ports_client
# TODO(mriedem): move this into a common waiters utility module
def wait_for_port_detach(self, port_id):
@@ -231,7 +231,7 @@ class AttachInterfacesTestJSON(base.BaseV2ComputeTest):
network_id = ifs[0]['net_id']
self.servers_client.add_fixed_ip(server['id'], networkId=network_id)
# Remove the fixed IP from server.
- server_detail = self.os.servers_client.show_server(
+ server_detail = self.os_primary.servers_client.show_server(
server['id'])['server']
# 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 d44967e6a..db42c6c84 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -38,8 +38,8 @@ class ServersTestJSON(base.BaseV2ComputeTest):
def setup_clients(cls):
super(ServersTestJSON, cls).setup_clients()
cls.client = cls.servers_client
- cls.networks_client = cls.os.networks_client
- cls.subnets_client = cls.os.subnets_client
+ cls.networks_client = cls.os_primary.networks_client
+ cls.subnets_client = cls.os_primary.subnets_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/compute/servers/test_device_tagging.py b/tempest/api/compute/servers/test_device_tagging.py
index 6e5d42fff..9ab508d83 100644
--- a/tempest/api/compute/servers/test_device_tagging.py
+++ b/tempest/api/compute/servers/test_device_tagging.py
@@ -55,10 +55,10 @@ class DeviceTaggingTest(base.BaseV2ComputeTest):
@classmethod
def setup_clients(cls):
super(DeviceTaggingTest, cls).setup_clients()
- cls.networks_client = cls.os.networks_client
- cls.ports_client = cls.os.ports_client
- cls.subnets_client = cls.os.subnets_client
- cls.interfaces_client = cls.os.interfaces_client
+ cls.networks_client = cls.os_primary.networks_client
+ cls.ports_client = cls.os_primary.ports_client
+ cls.subnets_client = cls.os_primary.subnets_client
+ cls.interfaces_client = cls.os_primary.interfaces_client
@classmethod
def setup_credentials(cls):
diff --git a/tempest/api/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
index 470918070..bc4806995 100644
--- a/tempest/api/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -35,7 +35,7 @@ class ServerDiskConfigTestJSON(base.BaseV2ComputeTest):
@classmethod
def setup_clients(cls):
super(ServerDiskConfigTestJSON, cls).setup_clients()
- cls.client = cls.os.servers_client
+ cls.client = cls.os_primary.servers_client
def _update_server_with_disk_config(self, server_id, disk_config):
server = self.client.show_server(server_id)['server']
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 751d33ac0..8808510be 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -337,9 +337,9 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
# prefer glance v1 for the compute API tests since the compute image
# API proxy was written for glance v1.
if CONF.image_feature_enabled.api_v1:
- glance_client = self.os.image_client
+ glance_client = self.os_primary.image_client
elif CONF.image_feature_enabled.api_v2:
- glance_client = self.os.image_client_v2
+ glance_client = self.os_primary.image_client_v2
else:
raise lib_exc.InvalidConfiguration(
'Either api_v1 or api_v2 must be True in '
diff --git a/tempest/api/compute/test_networks.py b/tempest/api/compute/test_networks.py
index 4d21fedc7..b8c79d7ef 100644
--- a/tempest/api/compute/test_networks.py
+++ b/tempest/api/compute/test_networks.py
@@ -29,7 +29,7 @@ class ComputeNetworksTest(base.BaseV2ComputeTest):
@classmethod
def setup_clients(cls):
super(ComputeNetworksTest, cls).setup_clients()
- cls.client = cls.os.compute_networks_client
+ cls.client = cls.os_primary.compute_networks_client
@decorators.idempotent_id('3fe07175-312e-49a5-a623-5f52eeada4c2')
def test_list_networks(self):
diff --git a/tempest/api/compute/test_tenant_networks.py b/tempest/api/compute/test_tenant_networks.py
index b203c7e64..18c5d385d 100644
--- a/tempest/api/compute/test_tenant_networks.py
+++ b/tempest/api/compute/test_tenant_networks.py
@@ -22,7 +22,7 @@ class ComputeTenantNetworksTest(base.BaseV2ComputeTest):
@classmethod
def resource_setup(cls):
super(ComputeTenantNetworksTest, cls).resource_setup()
- cls.client = cls.os.tenant_networks_client
+ cls.client = cls.os_primary.tenant_networks_client
cls.network = cls.get_tenant_network()
@classmethod
diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py
index a40c3cd83..8c5e63ba2 100644
--- a/tempest/api/identity/admin/v3/test_tokens.py
+++ b/tempest/api/identity/admin/v3/test_tokens.py
@@ -146,7 +146,7 @@ class TokensV3TestJSON(base.BaseIdentityV3AdminTest):
@decorators.idempotent_id('08ed85ce-2ba8-4864-b442-bcc61f16ae89')
def test_get_available_project_scopes(self):
manager_project_id = self.manager.credentials.project_id
- admin_user_id = self.os_adm.credentials.user_id
+ admin_user_id = self.os_admin.credentials.user_id
admin_role_id = self.get_role_by_name(CONF.identity.admin_role)['id']
# Grant the user the role on both projects.
@@ -156,7 +156,7 @@ class TokensV3TestJSON(base.BaseIdentityV3AdminTest):
self.roles_client.delete_role_from_user_on_project,
manager_project_id, admin_user_id, admin_role_id)
- assigned_project_ids = [self.os_adm.credentials.project_id,
+ assigned_project_ids = [self.os_admin.credentials.project_id,
manager_project_id]
# Get available project scopes
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index 34b281a65..3e6a2de7a 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -279,9 +279,9 @@ class TrustsV3TestJSON(BaseTrustsV3Test):
# Listing trusts can be done by trustor, by trustee, or without
# any filter if scoped to a project, so we must ensure token scope is
# project for this test.
- original_scope = self.os_adm.auth_provider.scope
- set_scope(self.os_adm.auth_provider, 'project')
- self.addCleanup(set_scope, self.os_adm.auth_provider, original_scope)
+ original_scope = self.os_admin.auth_provider.scope
+ set_scope(self.os_admin.auth_provider, 'project')
+ self.addCleanup(set_scope, self.os_admin.auth_provider, original_scope)
trusts_get = self.trusts_client.list_trusts()['trusts']
trusts = [t for t in trusts_get
if t['id'] == self.trust_id]
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 4f271cb83..751962fc4 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -147,8 +147,8 @@ class UsersV3TestJSON(base.BaseIdentityV3AdminTest):
'Security compliance not available.')
@decorators.idempotent_id('568cd46c-ee6c-4ab4-a33a-d3791931979e')
def test_password_history_not_enforced_in_admin_reset(self):
- old_password = self.os.credentials.password
- user_id = self.os.credentials.user_id
+ old_password = self.os_primary.credentials.password
+ user_id = self.os_primary.credentials.user_id
new_password = data_utils.rand_password()
self.users_client.update_user(user_id, password=new_password)
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 10121d981..785485b16 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -107,10 +107,10 @@ class BaseIdentityV2Test(BaseIdentityTest):
@classmethod
def setup_clients(cls):
super(BaseIdentityV2Test, cls).setup_clients()
- cls.non_admin_client = cls.os.identity_public_client
- cls.non_admin_token_client = cls.os.token_client
- cls.non_admin_tenants_client = cls.os.tenants_public_client
- cls.non_admin_users_client = cls.os.users_public_client
+ cls.non_admin_client = cls.os_primary.identity_public_client
+ cls.non_admin_token_client = cls.os_primary.token_client
+ cls.non_admin_tenants_client = cls.os_primary.tenants_public_client
+ cls.non_admin_users_client = cls.os_primary.users_public_client
class BaseIdentityV2AdminTest(BaseIdentityV2Test):
@@ -135,17 +135,17 @@ class BaseIdentityV2AdminTest(BaseIdentityV2Test):
@classmethod
def setup_clients(cls):
super(BaseIdentityV2AdminTest, cls).setup_clients()
- cls.client = cls.os_adm.identity_client
- cls.non_admin_client = cls.os.identity_client
- cls.token_client = cls.os_adm.token_client
- cls.tenants_client = cls.os_adm.tenants_client
- cls.non_admin_tenants_client = cls.os.tenants_client
- cls.roles_client = cls.os_adm.roles_client
- cls.non_admin_roles_client = cls.os.roles_client
- cls.users_client = cls.os_adm.users_client
- cls.non_admin_users_client = cls.os.users_client
- cls.services_client = cls.os_adm.identity_services_client
- cls.endpoints_client = cls.os_adm.endpoints_client
+ cls.client = cls.os_admin.identity_client
+ cls.non_admin_client = cls.os_primary.identity_client
+ cls.token_client = cls.os_admin.token_client
+ cls.tenants_client = cls.os_admin.tenants_client
+ cls.non_admin_tenants_client = cls.os_primary.tenants_client
+ cls.roles_client = cls.os_admin.roles_client
+ cls.non_admin_roles_client = cls.os_primary.roles_client
+ cls.users_client = cls.os_admin.users_client
+ cls.non_admin_users_client = cls.os_primary.users_client
+ cls.services_client = cls.os_admin.identity_services_client
+ cls.endpoints_client = cls.os_admin.endpoints_client
@classmethod
def resource_setup(cls):
@@ -183,11 +183,12 @@ class BaseIdentityV3Test(BaseIdentityTest):
@classmethod
def setup_clients(cls):
super(BaseIdentityV3Test, cls).setup_clients()
- cls.non_admin_client = cls.os.identity_v3_client
- cls.non_admin_users_client = cls.os.users_v3_client
- cls.non_admin_token = cls.os.token_v3_client
- cls.non_admin_projects_client = cls.os.projects_client
- cls.non_admin_versions_client = cls.os.identity_versions_v3_client
+ cls.non_admin_client = cls.os_primary.identity_v3_client
+ cls.non_admin_users_client = cls.os_primary.users_v3_client
+ cls.non_admin_token = cls.os_primary.token_v3_client
+ cls.non_admin_projects_client = cls.os_primary.projects_client
+ cls.non_admin_versions_client =\
+ cls.os_primary.identity_versions_v3_client
class BaseIdentityV3AdminTest(BaseIdentityV3Test):
@@ -206,30 +207,31 @@ class BaseIdentityV3AdminTest(BaseIdentityV3Test):
@classmethod
def setup_clients(cls):
super(BaseIdentityV3AdminTest, cls).setup_clients()
- cls.client = cls.os_adm.identity_v3_client
- cls.domains_client = cls.os_adm.domains_client
- cls.users_client = cls.os_adm.users_v3_client
- cls.trusts_client = cls.os_adm.trusts_client
- cls.roles_client = cls.os_adm.roles_v3_client
- cls.inherited_roles_client = cls.os_adm.inherited_roles_client
- cls.token = cls.os_adm.token_v3_client
- cls.endpoints_client = cls.os_adm.endpoints_v3_client
- cls.regions_client = cls.os_adm.regions_client
- cls.services_client = cls.os_adm.identity_services_v3_client
- cls.policies_client = cls.os_adm.policies_client
- cls.creds_client = cls.os_adm.credentials_client
- cls.groups_client = cls.os_adm.groups_client
- cls.projects_client = cls.os_adm.projects_client
+ cls.client = cls.os_admin.identity_v3_client
+ cls.domains_client = cls.os_admin.domains_client
+ cls.users_client = cls.os_admin.users_v3_client
+ cls.trusts_client = cls.os_admin.trusts_client
+ cls.roles_client = cls.os_admin.roles_v3_client
+ cls.inherited_roles_client = cls.os_admin.inherited_roles_client
+ cls.token = cls.os_admin.token_v3_client
+ cls.endpoints_client = cls.os_admin.endpoints_v3_client
+ cls.regions_client = cls.os_admin.regions_client
+ cls.services_client = cls.os_admin.identity_services_v3_client
+ cls.policies_client = cls.os_admin.policies_client
+ cls.creds_client = cls.os_admin.credentials_client
+ cls.groups_client = cls.os_admin.groups_client
+ cls.projects_client = cls.os_admin.projects_client
cls.role_assignments = cls.os_admin.role_assignments_client
- cls.oauth_consumers_client = cls.os_adm.oauth_consumers_client
- cls.domain_config_client = cls.os_adm.domain_config_client
- cls.endpoint_filter_client = cls.os_adm.endpoint_filter_client
+ cls.oauth_consumers_client = cls.os_admin.oauth_consumers_client
+ cls.domain_config_client = cls.os_admin.domain_config_client
+ cls.endpoint_filter_client = cls.os_admin.endpoint_filter_client
+
if CONF.identity.admin_domain_scope:
# NOTE(andreaf) When keystone policy requires it, the identity
# admin clients for these tests shall use 'domain' scoped tokens.
# As the client manager is already created by the base class,
# we set the scope for the inner auth provider.
- cls.os_adm.auth_provider.scope = 'domain'
+ cls.os_admin.auth_provider.scope = 'domain'
@classmethod
def disable_user(cls, user_name, domain_id=None):
diff --git a/tempest/api/identity/v2/test_ec2_credentials.py b/tempest/api/identity/v2/test_ec2_credentials.py
index 7a0f3d709..599b784d6 100644
--- a/tempest/api/identity/v2/test_ec2_credentials.py
+++ b/tempest/api/identity/v2/test_ec2_credentials.py
@@ -31,7 +31,7 @@ class EC2CredentialsTest(base.BaseIdentityV2Test):
@classmethod
def resource_setup(cls):
super(EC2CredentialsTest, cls).resource_setup()
- cls.creds = cls.os.credentials
+ cls.creds = cls.os_primary.credentials
@decorators.idempotent_id('b580fab9-7ae9-46e8-8138-417260cb6f9f')
def test_create_ec2_credential(self):
diff --git a/tempest/api/identity/v2/test_tenants.py b/tempest/api/identity/v2/test_tenants.py
index 2689998dd..b2a6d13c3 100644
--- a/tempest/api/identity/v2/test_tenants.py
+++ b/tempest/api/identity/v2/test_tenants.py
@@ -24,7 +24,7 @@ class IdentityTenantsTest(base.BaseIdentityV2Test):
@decorators.idempotent_id('ecae2459-243d-4ba1-ad02-65f15dc82b78')
def test_list_tenants_returns_only_authorized_tenants(self):
- alt_tenant_name = self.alt_manager.credentials.tenant_name
+ alt_tenant_name = self.os_alt.credentials.tenant_name
resp = self.non_admin_tenants_client.list_tenants()
# check that user can see only that tenants that he presents in so user
@@ -32,18 +32,19 @@ class IdentityTenantsTest(base.BaseIdentityV2Test):
# from received tenants list
for tenant in resp['tenants']:
body = self.non_admin_token_client.auth(
- self.os.credentials.username,
- self.os.credentials.password,
+ self.os_primary.credentials.username,
+ self.os_primary.credentials.password,
tenant['name'])
self.assertNotEmpty(body['token']['id'])
self.assertEqual(body['token']['tenant']['id'], tenant['id'])
self.assertEqual(body['token']['tenant']['name'], tenant['name'])
- self.assertEqual(body['user']['id'], self.os.credentials.user_id)
+ self.assertEqual(
+ body['user']['id'], self.os_primary.credentials.user_id)
# check that user cannot log in to alt user's tenant
self.assertRaises(
lib_exc.Unauthorized,
self.non_admin_token_client.auth,
- self.os.credentials.username,
- self.os.credentials.password,
+ self.os_primary.credentials.username,
+ self.os_primary.credentials.password,
alt_tenant_name)
diff --git a/tempest/api/identity/v2/test_tokens.py b/tempest/api/identity/v2/test_tokens.py
index 79a176515..64b81c229 100644
--- a/tempest/api/identity/v2/test_tokens.py
+++ b/tempest/api/identity/v2/test_tokens.py
@@ -27,7 +27,7 @@ class TokensTest(base.BaseIdentityV2Test):
token_client = self.non_admin_token_client
# get a token for the user
- creds = self.os.credentials
+ creds = self.os_primary.credentials
username = creds.username
password = creds.password
tenant_name = creds.tenant_name
diff --git a/tempest/api/identity/v2/test_users.py b/tempest/api/identity/v2/test_users.py
index 2b42981aa..9c77fff51 100644
--- a/tempest/api/identity/v2/test_users.py
+++ b/tempest/api/identity/v2/test_users.py
@@ -30,7 +30,7 @@ class IdentityUsersTest(base.BaseIdentityV2Test):
@classmethod
def resource_setup(cls):
super(IdentityUsersTest, cls).resource_setup()
- cls.creds = cls.os.credentials
+ cls.creds = cls.os_primary.credentials
cls.username = cls.creds.username
cls.password = cls.creds.password
cls.tenant_name = cls.creds.tenant_name
diff --git a/tempest/api/identity/v3/test_projects.py b/tempest/api/identity/v3/test_projects.py
index 570be991a..0ae35eada 100644
--- a/tempest/api/identity/v3/test_projects.py
+++ b/tempest/api/identity/v3/test_projects.py
@@ -25,9 +25,9 @@ class IdentityV3ProjectsTest(base.BaseIdentityV3Test):
@decorators.idempotent_id('86128d46-e170-4644-866a-cc487f699e1d')
def test_list_projects_returns_only_authorized_projects(self):
alt_project_name =\
- self.alt_manager.credentials.project_name
+ self.os_alt.credentials.project_name
resp = self.non_admin_users_client.list_user_projects(
- self.os.credentials.user_id)
+ self.os_primary.credentials.user_id)
# check that user can see only that projects that he presents in so
# user can successfully authenticate using his credentials and
@@ -36,23 +36,24 @@ class IdentityV3ProjectsTest(base.BaseIdentityV3Test):
# 'user_domain_id' needs to be specified otherwise tempest.lib
# assumes it to be 'default'
token_id, body = self.non_admin_token.get_token(
- username=self.os.credentials.username,
- user_domain_id=self.os.credentials.user_domain_id,
- password=self.os.credentials.password,
+ username=self.os_primary.credentials.username,
+ user_domain_id=self.os_primary.credentials.user_domain_id,
+ password=self.os_primary.credentials.password,
project_name=project['name'],
project_domain_id=project['domain_id'],
auth_data=True)
self.assertNotEmpty(token_id)
self.assertEqual(body['project']['id'], project['id'])
self.assertEqual(body['project']['name'], project['name'])
- self.assertEqual(body['user']['id'], self.os.credentials.user_id)
+ self.assertEqual(
+ body['user']['id'], self.os_primary.credentials.user_id)
# check that user cannot log in to alt user's project
self.assertRaises(
lib_exc.Unauthorized,
self.non_admin_token.get_token,
- username=self.os.credentials.username,
- user_domain_id=self.os.credentials.user_domain_id,
- password=self.os.credentials.password,
+ username=self.os_primary.credentials.username,
+ user_domain_id=self.os_primary.credentials.user_domain_id,
+ password=self.os_primary.credentials.password,
project_name=alt_project_name,
project_domain_id=project['domain_id'])
diff --git a/tempest/api/identity/v3/test_tokens.py b/tempest/api/identity/v3/test_tokens.py
index 1dc1df6f7..c9d7a4d1a 100644
--- a/tempest/api/identity/v3/test_tokens.py
+++ b/tempest/api/identity/v3/test_tokens.py
@@ -24,7 +24,7 @@ class TokensV3Test(base.BaseIdentityV3Test):
@decorators.idempotent_id('6f8e4436-fc96-4282-8122-e41df57197a9')
def test_create_token(self):
- creds = self.os.credentials
+ creds = self.os_primary.credentials
user_id = creds.user_id
username = creds.username
password = creds.password
diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py
index e7998ee0a..1f099df49 100644
--- a/tempest/api/identity/v3/test_users.py
+++ b/tempest/api/identity/v3/test_users.py
@@ -32,7 +32,7 @@ class IdentityV3UsersTest(base.BaseIdentityV3Test):
@classmethod
def resource_setup(cls):
super(IdentityV3UsersTest, cls).resource_setup()
- cls.creds = cls.os.credentials
+ cls.creds = cls.os_primary.credentials
cls.user_id = cls.creds.user_id
def _update_password(self, original_password, password):
diff --git a/tempest/api/image/base.py b/tempest/api/image/base.py
index c586960e2..70ba2feca 100644
--- a/tempest/api/image/base.py
+++ b/tempest/api/image/base.py
@@ -94,7 +94,7 @@ class BaseV1ImageTest(BaseImageTest):
@classmethod
def setup_clients(cls):
super(BaseV1ImageTest, cls).setup_clients()
- cls.client = cls.os.image_client
+ cls.client = cls.os_primary.image_client
@classmethod
def _get_create_params(cls, **kwargs):
@@ -108,7 +108,7 @@ class BaseV1ImageMembersTest(BaseV1ImageTest):
@classmethod
def setup_clients(cls):
super(BaseV1ImageMembersTest, cls).setup_clients()
- cls.image_member_client = cls.os.image_member_client
+ cls.image_member_client = cls.os_primary.image_member_client
cls.alt_image_member_client = cls.os_alt.image_member_client
cls.alt_img_cli = cls.os_alt.image_client
@@ -138,14 +138,15 @@ class BaseV2ImageTest(BaseImageTest):
@classmethod
def setup_clients(cls):
super(BaseV2ImageTest, cls).setup_clients()
- cls.client = cls.os.image_client_v2
- cls.namespaces_client = cls.os.namespaces_client
- cls.resource_types_client = cls.os.resource_types_client
- cls.namespace_properties_client = cls.os.namespace_properties_client
- cls.namespace_objects_client = cls.os.namespace_objects_client
- cls.namespace_tags_client = cls.os.namespace_tags_client
- cls.schemas_client = cls.os.schemas_client
- cls.versions_client = cls.os.image_versions_client
+ cls.client = cls.os_primary.image_client_v2
+ cls.namespaces_client = cls.os_primary.namespaces_client
+ cls.resource_types_client = cls.os_primary.resource_types_client
+ cls.namespace_properties_client =\
+ cls.os_primary.namespace_properties_client
+ cls.namespace_objects_client = cls.os_primary.namespace_objects_client
+ cls.namespace_tags_client = cls.os_primary.namespace_tags_client
+ cls.schemas_client = cls.os_primary.schemas_client
+ cls.versions_client = cls.os_primary.image_versions_client
def create_namespace(cls, namespace_name=None, visibility='public',
description='Tempest', protected=False,
@@ -167,7 +168,7 @@ class BaseV2MemberImageTest(BaseV2ImageTest):
@classmethod
def setup_clients(cls):
super(BaseV2MemberImageTest, cls).setup_clients()
- cls.image_member_client = cls.os.image_member_client_v2
+ cls.image_member_client = cls.os_primary.image_member_client_v2
cls.alt_image_member_client = cls.os_alt.image_member_client_v2
cls.alt_img_client = cls.os_alt.image_client_v2
@@ -196,8 +197,8 @@ class BaseV1ImageAdminTest(BaseImageTest):
@classmethod
def setup_clients(cls):
super(BaseV1ImageAdminTest, cls).setup_clients()
- cls.client = cls.os.image_client
- cls.admin_client = cls.os_adm.image_client
+ cls.client = cls.os_primary.image_client
+ cls.admin_client = cls.os_admin.image_client
class BaseV2ImageAdminTest(BaseImageTest):
@@ -206,5 +207,5 @@ class BaseV2ImageAdminTest(BaseImageTest):
@classmethod
def setup_clients(cls):
super(BaseV2ImageAdminTest, cls).setup_clients()
- cls.client = cls.os.image_client_v2
- cls.admin_client = cls.os_adm.image_client_v2
+ cls.client = cls.os_primary.image_client_v2
+ cls.admin_client = cls.os_admin.image_client_v2
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index a5d97737c..2e68efd67 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -364,7 +364,7 @@ class ListSharedImagesTest(base.BaseV2ImageTest):
@classmethod
def setup_clients(cls):
super(ListSharedImagesTest, cls).setup_clients()
- cls.image_member_client = cls.os.image_member_client_v2
+ cls.image_member_client = cls.os_primary.image_member_client_v2
cls.alt_img_client = cls.os_alt.image_client_v2
@decorators.idempotent_id('3fa50be4-8e38-4c02-a8db-7811bb780122')
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 9a17817bc..11f520a3c 100644
--- a/tempest/api/network/admin/test_floating_ips_admin_actions.py
+++ b/tempest/api/network/admin/test_floating_ips_admin_actions.py
@@ -38,7 +38,7 @@ class FloatingIPAdminTestJSON(base.BaseAdminNetworkTest):
@classmethod
def setup_clients(cls):
super(FloatingIPAdminTestJSON, cls).setup_clients()
- cls.alt_floating_ips_client = cls.alt_manager.floating_ips_client
+ cls.alt_floating_ips_client = cls.os_alt.floating_ips_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 7ceeb50f7..359a44486 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -68,20 +68,21 @@ class BaseNetworkTest(tempest.test.BaseTestCase):
@classmethod
def setup_clients(cls):
super(BaseNetworkTest, cls).setup_clients()
- cls.agents_client = cls.os.network_agents_client
- cls.network_extensions_client = cls.os.network_extensions_client
- cls.networks_client = cls.os.networks_client
- cls.routers_client = cls.os.routers_client
- cls.subnetpools_client = cls.os.subnetpools_client
- cls.subnets_client = cls.os.subnets_client
- cls.ports_client = cls.os.ports_client
- cls.quotas_client = cls.os.network_quotas_client
- cls.floating_ips_client = cls.os.floating_ips_client
- cls.security_groups_client = cls.os.security_groups_client
+ cls.agents_client = cls.os_primary.network_agents_client
+ cls.network_extensions_client =\
+ cls.os_primary.network_extensions_client
+ cls.networks_client = cls.os_primary.networks_client
+ cls.routers_client = cls.os_primary.routers_client
+ cls.subnetpools_client = cls.os_primary.subnetpools_client
+ cls.subnets_client = cls.os_primary.subnets_client
+ cls.ports_client = cls.os_primary.ports_client
+ cls.quotas_client = cls.os_primary.network_quotas_client
+ cls.floating_ips_client = cls.os_primary.floating_ips_client
+ cls.security_groups_client = cls.os_primary.security_groups_client
cls.security_group_rules_client = (
- cls.os.security_group_rules_client)
- cls.network_versions_client = cls.os.network_versions_client
- cls.service_providers_client = cls.os.service_providers_client
+ cls.os_primary.security_group_rules_client)
+ cls.network_versions_client = cls.os_primary.network_versions_client
+ cls.service_providers_client = cls.os_primary.service_providers_client
@classmethod
def resource_setup(cls):
@@ -258,16 +259,16 @@ class BaseAdminNetworkTest(BaseNetworkTest):
@classmethod
def setup_clients(cls):
super(BaseAdminNetworkTest, cls).setup_clients()
- cls.admin_agents_client = cls.os_adm.network_agents_client
- cls.admin_networks_client = cls.os_adm.networks_client
- cls.admin_routers_client = cls.os_adm.routers_client
- cls.admin_subnets_client = cls.os_adm.subnets_client
- cls.admin_ports_client = cls.os_adm.ports_client
- cls.admin_quotas_client = cls.os_adm.network_quotas_client
- cls.admin_floating_ips_client = cls.os_adm.floating_ips_client
- cls.admin_metering_labels_client = cls.os_adm.metering_labels_client
+ cls.admin_agents_client = cls.os_admin.network_agents_client
+ cls.admin_networks_client = cls.os_admin.networks_client
+ cls.admin_routers_client = cls.os_admin.routers_client
+ cls.admin_subnets_client = cls.os_admin.subnets_client
+ cls.admin_ports_client = cls.os_admin.ports_client
+ cls.admin_quotas_client = cls.os_admin.network_quotas_client
+ cls.admin_floating_ips_client = cls.os_admin.floating_ips_client
+ cls.admin_metering_labels_client = cls.os_admin.metering_labels_client
cls.admin_metering_label_rules_client = (
- cls.os_adm.metering_label_rules_client)
+ cls.os_admin.metering_label_rules_client)
@classmethod
def create_metering_label(cls, name, description):
diff --git a/tempest/api/object_storage/base.py b/tempest/api/object_storage/base.py
index c075b928a..2bac8d3ad 100644
--- a/tempest/api/object_storage/base.py
+++ b/tempest/api/object_storage/base.py
@@ -79,11 +79,11 @@ class BaseObjectTest(tempest.test.BaseTestCase):
@classmethod
def setup_clients(cls):
super(BaseObjectTest, cls).setup_clients()
- cls.object_client = cls.os.object_client
- cls.bulk_client = cls.os.bulk_client
- cls.container_client = cls.os.container_client
- cls.account_client = cls.os.account_client
- cls.capabilities_client = cls.os.capabilities_client
+ cls.object_client = cls.os_roles_operator.object_client
+ cls.bulk_client = cls.os_roles_operator.bulk_client
+ cls.container_client = cls.os_roles_operator.container_client
+ cls.account_client = cls.os_roles_operator.account_client
+ cls.capabilities_client = cls.os_roles_operator.capabilities_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/object_storage/test_account_quotas.py b/tempest/api/object_storage/test_account_quotas.py
index 9077f8803..092d36969 100644
--- a/tempest/api/object_storage/test_account_quotas.py
+++ b/tempest/api/object_storage/test_account_quotas.py
@@ -54,8 +54,8 @@ class AccountQuotasTest(base.BaseObjectTest):
# Set a quota of 20 bytes on the user's account before each test
headers = {"X-Account-Meta-Quota-Bytes": "20"}
- self.os.account_client.request("POST", url="", headers=headers,
- body="")
+ self.os_roles_operator.account_client.request(
+ "POST", url="", headers=headers, body="")
def tearDown(self):
# Set the reselleradmin auth in headers for next account_client
@@ -67,8 +67,8 @@ class AccountQuotasTest(base.BaseObjectTest):
# remove the quota from the container
headers = {"X-Remove-Account-Meta-Quota-Bytes": "x"}
- self.os.account_client.request("POST", url="", headers=headers,
- body="")
+ self.os_roles_operator.account_client.request(
+ "POST", url="", headers=headers, body="")
super(AccountQuotasTest, self).tearDown()
@classmethod
@@ -108,9 +108,8 @@ class AccountQuotasTest(base.BaseObjectTest):
)
headers = {"X-Account-Meta-Quota-Bytes": quota}
- resp, _ = self.os.account_client.request("POST", url="",
- headers=headers,
- body="")
+ resp, _ = self.os_roles_operator.account_client.request(
+ "POST", url="", headers=headers, body="")
self.assertEqual(resp["status"], "204")
self.assertHeaders(resp, 'Account', 'POST')
diff --git a/tempest/api/object_storage/test_account_quotas_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py
index f955d3425..55a6c7ad4 100644
--- a/tempest/api/object_storage/test_account_quotas_negative.py
+++ b/tempest/api/object_storage/test_account_quotas_negative.py
@@ -53,8 +53,8 @@ class AccountQuotasNegativeTest(base.BaseObjectTest):
# Set a quota of 20 bytes on the user's account before each test
headers = {"X-Account-Meta-Quota-Bytes": "20"}
- self.os.account_client.request("POST", url="", headers=headers,
- body="")
+ self.os_roles_operator.account_client.request(
+ "POST", url="", headers=headers, body="")
def tearDown(self):
# Set the reselleradmin auth in headers for next account_client
@@ -66,8 +66,8 @@ class AccountQuotasNegativeTest(base.BaseObjectTest):
# remove the quota from the container
headers = {"X-Remove-Account-Meta-Quota-Bytes": "x"}
- self.os.account_client.request("POST", url="", headers=headers,
- body="")
+ self.os_roles_operator.account_client.request(
+ "POST", url="", headers=headers, body="")
super(AccountQuotasNegativeTest, self).tearDown()
@classmethod
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 8d3d3445d..d9d801787 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -42,13 +42,13 @@ class BaseOrchestrationTest(tempest.test.BaseTestCase):
@classmethod
def setup_clients(cls):
super(BaseOrchestrationTest, cls).setup_clients()
- cls.orchestration_client = cls.os.orchestration_client
+ cls.orchestration_client = cls.os_primary.orchestration_client
cls.client = cls.orchestration_client
- cls.servers_client = cls.os.servers_client
- cls.keypairs_client = cls.os.keypairs_client
- cls.networks_client = cls.os.networks_client
- cls.images_v2_client = cls.os.image_client_v2
- cls.volumes_client = cls.os.volumes_v2_client
+ cls.servers_client = cls.os_primary.servers_client
+ cls.keypairs_client = cls.os_primary.keypairs_client
+ cls.networks_client = cls.os_primary.networks_client
+ cls.images_v2_client = cls.os_primary.image_client_v2
+ cls.volumes_client = cls.os_primary.volumes_v2_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 6faca710b..36881bfbd 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -41,9 +41,9 @@ class NeutronResourcesTestJSON(base.BaseOrchestrationTest):
@classmethod
def setup_clients(cls):
super(NeutronResourcesTestJSON, cls).setup_clients()
- cls.subnets_client = cls.os.subnets_client
- cls.ports_client = cls.os.ports_client
- cls.routers_client = cls.os.routers_client
+ cls.subnets_client = cls.os_primary.subnets_client
+ cls.ports_client = cls.os_primary.ports_client
+ cls.routers_client = cls.os_primary.routers_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/orchestration/stacks/test_swift_resources.py b/tempest/api/orchestration/stacks/test_swift_resources.py
index 97fdac4fe..d63cde8e1 100644
--- a/tempest/api/orchestration/stacks/test_swift_resources.py
+++ b/tempest/api/orchestration/stacks/test_swift_resources.py
@@ -40,8 +40,8 @@ class SwiftResourcesTestJSON(base.BaseOrchestrationTest):
@classmethod
def setup_clients(cls):
super(SwiftResourcesTestJSON, cls).setup_clients()
- cls.account_client = cls.os.account_client
- cls.container_client = cls.os.container_client
+ cls.account_client = cls.os_primary.account_client
+ cls.container_client = cls.os_primary.container_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index 48941c686..ae4b579cd 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -35,13 +35,13 @@ class BaseVolumeQuotasAdminTestJSON(base.BaseVolumeAdminTest):
@classmethod
def setup_credentials(cls):
super(BaseVolumeQuotasAdminTestJSON, cls).setup_credentials()
- cls.demo_tenant_id = cls.os.credentials.tenant_id
+ cls.demo_tenant_id = cls.os_primary.credentials.tenant_id
cls.alt_client = cls.os_alt.volumes_client
@classmethod
def setup_clients(cls):
super(BaseVolumeQuotasAdminTestJSON, cls).setup_clients()
- cls.transfer_client = cls.os.volume_transfers_v2_client
+ cls.transfer_client = cls.os_primary.volume_transfers_v2_client
cls.alt_transfer_client = cls.os_alt.volume_transfers_v2_client
@decorators.idempotent_id('59eada70-403c-4cef-a2a3-a8ce2f1b07a0')
@@ -86,7 +86,7 @@ class BaseVolumeQuotasAdminTestJSON(base.BaseVolumeAdminTest):
@decorators.idempotent_id('18c51ae9-cb03-48fc-b234-14a19374dbed')
def test_show_quota_usage(self):
quota_usage = self.admin_quotas_client.show_quota_set(
- self.os_adm.credentials.tenant_id,
+ self.os_admin.credentials.tenant_id,
params={'usage': True})['quota_set']
for key in QUOTA_KEYS:
self.assertIn(key, quota_usage)
diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py
index 63f61e426..d127b5f39 100644
--- a/tempest/api/volume/admin/test_volume_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_quotas_negative.py
@@ -27,7 +27,7 @@ class BaseVolumeQuotasNegativeTestJSON(base.BaseVolumeAdminTest):
@classmethod
def setup_credentials(cls):
super(BaseVolumeQuotasNegativeTestJSON, cls).setup_credentials()
- cls.demo_tenant_id = cls.os.credentials.tenant_id
+ cls.demo_tenant_id = cls.os_primary.credentials.tenant_id
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
index fa8c7ab95..0f4e90fd3 100644
--- a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
@@ -33,7 +33,7 @@ class VolumeSnapshotQuotasNegativeTestJSON(base.BaseVolumeAdminTest):
@classmethod
def setup_credentials(cls):
super(VolumeSnapshotQuotasNegativeTestJSON, cls).setup_credentials()
- cls.demo_tenant_id = cls.os.credentials.tenant_id
+ cls.demo_tenant_id = cls.os_primary.credentials.tenant_id
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index ead9d4f2c..8feaca9b1 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -64,20 +64,21 @@ class BaseVolumeTest(api_version_utils.BaseMicroversionTest,
@classmethod
def setup_clients(cls):
super(BaseVolumeTest, cls).setup_clients()
- cls.servers_client = cls.os.servers_client
+ cls.servers_client = cls.os_primary.servers_client
if CONF.service_available.glance:
- cls.images_client = cls.os.image_client_v2
+ cls.images_client = cls.os_primary.image_client_v2
- cls.snapshots_client = cls.os.snapshots_v2_client
- cls.volumes_client = cls.os.volumes_v2_client
- cls.backups_client = cls.os.backups_v2_client
- cls.volumes_extension_client = cls.os.volumes_v2_extension_client
+ cls.snapshots_client = cls.os_primary.snapshots_v2_client
+ cls.volumes_client = cls.os_primary.volumes_v2_client
+ cls.backups_client = cls.os_primary.backups_v2_client
+ cls.volumes_extension_client =\
+ cls.os_primary.volumes_v2_extension_client
cls.availability_zone_client = (
- cls.os.volume_v2_availability_zone_client)
- cls.volume_limits_client = cls.os.volume_v2_limits_client
- cls.messages_client = cls.os.volume_v3_messages_client
- cls.versions_client = cls.os.volume_v3_versions_client
+ cls.os_primary.volume_v2_availability_zone_client)
+ cls.volume_limits_client = cls.os_primary.volume_v2_limits_client
+ cls.messages_client = cls.os_primary.volume_v3_messages_client
+ cls.versions_client = cls.os_primary.volume_v3_versions_client
def setUp(self):
super(BaseVolumeTest, self).setUp()
@@ -246,29 +247,29 @@ class BaseVolumeAdminTest(BaseVolumeTest):
def setup_clients(cls):
super(BaseVolumeAdminTest, cls).setup_clients()
- cls.admin_volume_qos_client = cls.os_adm.volume_qos_v2_client
+ cls.admin_volume_qos_client = cls.os_admin.volume_qos_v2_client
cls.admin_volume_services_client = \
- cls.os_adm.volume_services_v2_client
- cls.admin_volume_types_client = cls.os_adm.volume_types_v2_client
- cls.admin_volume_manage_client = cls.os_adm.volume_manage_v2_client
- cls.admin_volume_client = cls.os_adm.volumes_v2_client
- cls.admin_hosts_client = cls.os_adm.volume_hosts_v2_client
+ cls.os_admin.volume_services_v2_client
+ cls.admin_volume_types_client = cls.os_admin.volume_types_v2_client
+ cls.admin_volume_manage_client = cls.os_admin.volume_manage_v2_client
+ cls.admin_volume_client = cls.os_admin.volumes_v2_client
+ cls.admin_hosts_client = cls.os_admin.volume_hosts_v2_client
cls.admin_snapshot_manage_client = \
- cls.os_adm.snapshot_manage_v2_client
- cls.admin_snapshots_client = cls.os_adm.snapshots_v2_client
- cls.admin_backups_client = cls.os_adm.backups_v2_client
+ cls.os_admin.snapshot_manage_v2_client
+ cls.admin_snapshots_client = cls.os_admin.snapshots_v2_client
+ cls.admin_backups_client = cls.os_admin.backups_v2_client
cls.admin_encryption_types_client = \
- cls.os_adm.encryption_types_v2_client
+ cls.os_admin.encryption_types_v2_client
cls.admin_quota_classes_client = \
- cls.os_adm.volume_quota_classes_v2_client
- cls.admin_quotas_client = cls.os_adm.volume_quotas_v2_client
- cls.admin_volume_limits_client = cls.os_adm.volume_v2_limits_client
+ cls.os_admin.volume_quota_classes_v2_client
+ cls.admin_quotas_client = cls.os_admin.volume_quotas_v2_client
+ cls.admin_volume_limits_client = cls.os_admin.volume_v2_limits_client
cls.admin_capabilities_client = \
- cls.os_adm.volume_capabilities_v2_client
+ cls.os_admin.volume_capabilities_v2_client
cls.admin_scheduler_stats_client = \
- cls.os_adm.volume_scheduler_stats_v2_client
- cls.admin_messages_client = cls.os_adm.volume_v3_messages_client
- cls.admin_volume_types_client = cls.os_adm.volume_types_v2_client
+ cls.os_admin.volume_scheduler_stats_v2_client
+ cls.admin_messages_client = cls.os_admin.volume_v3_messages_client
+ cls.admin_volume_types_client = cls.os_admin.volume_types_v2_client
@classmethod
def resource_setup(cls):
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index 75f2a738f..5fd19045f 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -28,10 +28,10 @@ class VolumesTransfersTest(base.BaseVolumeTest):
def setup_clients(cls):
super(VolumesTransfersTest, cls).setup_clients()
- cls.client = cls.os.volume_transfers_v2_client
+ cls.client = cls.os_primary.volume_transfers_v2_client
cls.alt_client = cls.os_alt.volume_transfers_v2_client
cls.alt_volumes_client = cls.os_alt.volumes_v2_client
- cls.adm_volumes_client = cls.os_adm.volumes_v2_client
+ cls.adm_volumes_client = cls.os_admin.volumes_v2_client
@decorators.idempotent_id('4d75b645-a478-48b1-97c8-503f64242f1a')
def test_create_get_list_accept_volume_transfer(self):
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 3418a2f81..ef4506c65 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -1242,9 +1242,9 @@ class EncryptionScenarioTest(ScenarioTest):
@classmethod
def setup_clients(cls):
super(EncryptionScenarioTest, cls).setup_clients()
- cls.admin_volume_types_client = cls.os_adm.volume_types_v2_client
+ cls.admin_volume_types_client = cls.os_admin.volume_types_v2_client
cls.admin_encryption_types_client =\
- cls.os_adm.encryption_types_v2_client
+ cls.os_admin.encryption_types_v2_client
def create_encryption_type(self, client=None, type_id=None, provider=None,
key_size=None, cipher=None,
diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
index bde577fb1..c2fc1a77a 100644
--- a/tempest/scenario/test_network_advanced_server_ops.py
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -38,7 +38,7 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
@classmethod
def setup_clients(cls):
super(TestNetworkAdvancedServerOps, cls).setup_clients()
- cls.admin_servers_client = cls.os_adm.servers_client
+ cls.admin_servers_client = cls.os_admin.servers_client
@classmethod
def skip_checks(cls):
diff --git a/tempest/scenario/test_server_multinode.py b/tempest/scenario/test_server_multinode.py
index bf2858bce..d9bff0908 100644
--- a/tempest/scenario/test_server_multinode.py
+++ b/tempest/scenario/test_server_multinode.py
@@ -49,7 +49,7 @@ class TestServerMultinode(manager.ScenarioTest):
@test.services('compute', 'network')
def test_schedule_to_all_nodes(self):
available_zone = \
- self.os_adm.availability_zone_client.list_availability_zones(
+ self.os_admin.availability_zone_client.list_availability_zones(
detail=True)['availabilityZoneInfo']
hosts = []
for zone in available_zone:
diff --git a/tempest/scenario/test_volume_migrate_attached.py b/tempest/scenario/test_volume_migrate_attached.py
index a3cb3eb9e..63dc23d86 100644
--- a/tempest/scenario/test_volume_migrate_attached.py
+++ b/tempest/scenario/test_volume_migrate_attached.py
@@ -40,7 +40,7 @@ class TestVolumeMigrateRetypeAttached(manager.ScenarioTest):
@classmethod
def setup_clients(cls):
super(TestVolumeMigrateRetypeAttached, cls).setup_clients()
- cls.admin_volume_types_client = cls.os_adm.volume_types_v2_client
+ cls.admin_volume_types_client = cls.os_admin.volume_types_v2_client
@classmethod
def skip_checks(cls):
diff --git a/tempest/test.py b/tempest/test.py
index e63e08ff8..f6b17ad88 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -331,16 +331,32 @@ class BaseTestCase(testtools.testcase.WithAttributes,
manager = cls.get_client_manager(
credential_type=credentials_type)
setattr(cls, 'os_%s' % credentials_type, manager)
+ # NOTE(jordanP): Tempest should use os_primary, os_admin
+ # and os_alt throughout its code base but we keep the aliases
+ # around for a while for Tempest plugins. Aliases should be
+ # removed eventually.
# Setup some common aliases
- # TODO(andreaf) The aliases below are a temporary hack
- # to avoid changing too much code in one patch. They should
- # be removed eventually
if credentials_type == 'primary':
- cls.os = cls.manager = cls.os_primary
+ cls.os = debtcollector.moves.moved_read_only_property(
+ 'os', 'os_primary', version='Pike',
+ removal_version='Ocata')
+ cls.manager =\
+ debtcollector.moves.moved_read_only_property(
+ 'manager', 'os_primary', version='Pike',
+ removal_version='Ocata')
if credentials_type == 'admin':
- cls.os_adm = cls.admin_manager = cls.os_admin
+ cls.os_adm = debtcollector.moves.moved_read_only_property(
+ 'os_adm', 'os_admin', version='Pike',
+ removal_version='Ocata')
+ cls.admin_manager =\
+ debtcollector.moves.moved_read_only_property(
+ 'admin_manager', 'os_admin', version='Pike',
+ removal_version='Ocata')
if credentials_type == 'alt':
- cls.alt_manager = cls.os_alt
+ cls.alt_manager =\
+ debtcollector.moves.moved_read_only_property(
+ 'alt_manager', 'os_alt', version='Pike',
+ removal_version='Ocata')
elif isinstance(credentials_type, list):
manager = cls.get_client_manager(roles=credentials_type[1:],
force_new=True)