Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike and will be removed in version Queens: * manager > os_primary [1] * admin_manager > os_admin [2] * os_adm > os_admin [3] * os > os_primary [4] * alt_manager > os_alt [5] [1] https://review.openstack.org/#/c/468036/ [2] https://review.openstack.org/#/c/467852/ [3] https://review.openstack.org/#/c/467605/ [4] https://review.openstack.org/#/c/466991/ [5] https://review.openstack.org/#/c/457555/ Change-Id: Icd2ba2fd8e47cf0d515e6004c3793b499eef802e
This commit is contained in:
parent
9dce01eab9
commit
640c365a52
|
@ -37,8 +37,8 @@ class LXDServersTestJSON(base.BaseV2ComputeAdminTest):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
super(LXDServersTestJSON, cls).setup_clients()
|
super(LXDServersTestJSON, cls).setup_clients()
|
||||||
cls.client = cls.os_adm.servers_client
|
cls.client = cls.os_admin.servers_client
|
||||||
cls.flavors_client = cls.os_adm.flavors_client
|
cls.flavors_client = cls.os_admin.flavors_client
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
|
|
|
@ -36,8 +36,8 @@ class LXDServersWithSpecificFlavorTestJSON(base.BaseV2ComputeAdminTest):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
super(LXDServersWithSpecificFlavorTestJSON, cls).setup_clients()
|
super(LXDServersWithSpecificFlavorTestJSON, cls).setup_clients()
|
||||||
cls.flavor_client = cls.os_adm.flavors_client
|
cls.flavor_client = cls.os_admin.flavors_client
|
||||||
cls.client = cls.os_adm.servers_client
|
cls.client = cls.os_admin.servers_client
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
|
|
|
@ -41,8 +41,8 @@ class LXDVolumeTests(base.BaseV2ComputeAdminTest):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
super(LXDVolumeTests, cls).setup_clients()
|
super(LXDVolumeTests, cls).setup_clients()
|
||||||
cls.client = cls.os_adm.servers_client
|
cls.client = cls.os_admin.servers_client
|
||||||
cls.flavors_client = cls.os_adm.flavors_client
|
cls.flavors_client = cls.os_admin.flavors_client
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
|
|
|
@ -47,45 +47,45 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
super(ScenarioTest, cls).setup_clients()
|
super(ScenarioTest, cls).setup_clients()
|
||||||
# Clients (in alphabetical order)
|
# Clients (in alphabetical order)
|
||||||
cls.flavors_client = cls.manager.flavors_client
|
cls.flavors_client = cls.os_primary.flavors_client
|
||||||
cls.compute_floating_ips_client = (
|
cls.compute_floating_ips_client = (
|
||||||
cls.manager.compute_floating_ips_client)
|
cls.os_primary.compute_floating_ips_client)
|
||||||
if CONF.service_available.glance:
|
if CONF.service_available.glance:
|
||||||
# Check if glance v1 is available to determine which client to use.
|
# Check if glance v1 is available to determine which client to use.
|
||||||
if CONF.image_feature_enabled.api_v1:
|
if CONF.image_feature_enabled.api_v1:
|
||||||
cls.image_client = cls.manager.image_client
|
cls.image_client = cls.os_primary.image_client
|
||||||
elif CONF.image_feature_enabled.api_v2:
|
elif CONF.image_feature_enabled.api_v2:
|
||||||
cls.image_client = cls.manager.image_client_v2
|
cls.image_client = cls.os_primary.image_client_v2
|
||||||
else:
|
else:
|
||||||
raise lib_exc.InvalidConfiguration(
|
raise lib_exc.InvalidConfiguration(
|
||||||
'Either api_v1 or api_v2 must be True in '
|
'Either api_v1 or api_v2 must be True in '
|
||||||
'[image-feature-enabled].')
|
'[image-feature-enabled].')
|
||||||
# Compute image client
|
# Compute image client
|
||||||
cls.compute_images_client = cls.manager.compute_images_client
|
cls.compute_images_client = cls.os_primary.compute_images_client
|
||||||
cls.keypairs_client = cls.manager.keypairs_client
|
cls.keypairs_client = cls.os_primary.keypairs_client
|
||||||
# Nova security groups client
|
# Nova security groups client
|
||||||
cls.compute_security_groups_client = (
|
cls.compute_security_groups_client = (
|
||||||
cls.manager.compute_security_groups_client)
|
cls.os_primary.compute_security_groups_client)
|
||||||
cls.compute_security_group_rules_client = (
|
cls.compute_security_group_rules_client = (
|
||||||
cls.manager.compute_security_group_rules_client)
|
cls.os_primary.compute_security_group_rules_client)
|
||||||
cls.servers_client = cls.manager.servers_client
|
cls.servers_client = cls.os_primary.servers_client
|
||||||
cls.interface_client = cls.manager.interfaces_client
|
cls.interface_client = cls.os_primary.interfaces_client
|
||||||
# Neutron network client
|
# Neutron network client
|
||||||
cls.networks_client = cls.manager.networks_client
|
cls.networks_client = cls.os_primary.networks_client
|
||||||
cls.ports_client = cls.manager.ports_client
|
cls.ports_client = cls.os_primary.ports_client
|
||||||
cls.routers_client = cls.manager.routers_client
|
cls.routers_client = cls.os_primary.routers_client
|
||||||
cls.subnets_client = cls.manager.subnets_client
|
cls.subnets_client = cls.os_primary.subnets_client
|
||||||
cls.floating_ips_client = cls.manager.floating_ips_client
|
cls.floating_ips_client = cls.os_primary.floating_ips_client
|
||||||
cls.security_groups_client = cls.manager.security_groups_client
|
cls.security_groups_client = cls.os_primary.security_groups_client
|
||||||
cls.security_group_rules_client = (
|
cls.security_group_rules_client = (
|
||||||
cls.manager.security_group_rules_client)
|
cls.os_primary.security_group_rules_client)
|
||||||
|
|
||||||
if CONF.volume_feature_enabled.api_v2:
|
if CONF.volume_feature_enabled.api_v2:
|
||||||
cls.volumes_client = cls.manager.volumes_v2_client
|
cls.volumes_client = cls.os_primary.volumes_v2_client
|
||||||
cls.snapshots_client = cls.manager.snapshots_v2_client
|
cls.snapshots_client = cls.os_primary.snapshots_v2_client
|
||||||
else:
|
else:
|
||||||
cls.volumes_client = cls.manager.volumes_client
|
cls.volumes_client = cls.os_primary.volumes_client
|
||||||
cls.snapshots_client = cls.manager.snapshots_client
|
cls.snapshots_client = cls.os_primary.snapshots_client
|
||||||
|
|
||||||
# ## Test functions library
|
# ## Test functions library
|
||||||
#
|
#
|
||||||
|
@ -138,7 +138,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||||
|
|
||||||
# Needed for the cross_tenant_traffic test:
|
# Needed for the cross_tenant_traffic test:
|
||||||
if clients is None:
|
if clients is None:
|
||||||
clients = self.manager
|
clients = self.os_primary
|
||||||
|
|
||||||
if name is None:
|
if name is None:
|
||||||
name = data_utils.rand_name(self.__class__.__name__ + "-server")
|
name = data_utils.rand_name(self.__class__.__name__ + "-server")
|
||||||
|
|
Loading…
Reference in New Issue