Replace the usage of 'admin_manager' with 'os_admin'
In tempest, alias 'admin_manager' has been moved to 'os_admin'
'alt_manager' to 'os_alt' and 'manager' to 'os_primary' in
version Pike, and it will be removed in version Queens[1].
[1]I5f7164f7a7ec5d4380ca22885000caa0183a0bf7
Closes-bug: 1697588
Change-Id: Ib41a1bcff70cc7323b90a222c9f64d66e0203e53
diff --git a/neutron/tests/tempest/api/admin/test_external_network_extension.py b/neutron/tests/tempest/api/admin/test_external_network_extension.py
index bcdb0bd..6f6c94d 100644
--- a/neutron/tests/tempest/api/admin/test_external_network_extension.py
+++ b/neutron/tests/tempest/api/admin/test_external_network_extension.py
@@ -27,7 +27,7 @@
@classmethod
def resource_setup(cls):
super(ExternalNetworksRBACTestJSON, cls).resource_setup()
- cls.client2 = cls.alt_manager.network_client
+ cls.client2 = cls.os_alt.network_client
def _create_network(self, external=True):
post_body = {'name': data_utils.rand_name('network-')}
diff --git a/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py b/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py
index 764da2c..e997380 100644
--- a/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py
+++ b/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py
@@ -34,7 +34,7 @@
super(FloatingIPAdminTestJSON, cls).resource_setup()
cls.ext_net_id = CONF.network.public_network_id
cls.floating_ip = cls.create_floatingip(cls.ext_net_id)
- cls.alt_client = cls.alt_manager.network_client
+ cls.alt_client = cls.os_alt.network_client
cls.network = cls.create_network()
cls.subnet = cls.create_subnet(cls.network)
cls.router = cls.create_router(data_utils.rand_name('router-'),
diff --git a/neutron/tests/tempest/api/admin/test_shared_network_extension.py b/neutron/tests/tempest/api/admin/test_shared_network_extension.py
index 341ba28..458a6f1 100644
--- a/neutron/tests/tempest/api/admin/test_shared_network_extension.py
+++ b/neutron/tests/tempest/api/admin/test_shared_network_extension.py
@@ -179,7 +179,7 @@
@classmethod
def resource_setup(cls):
super(RBACSharedNetworksTest, cls).resource_setup()
- cls.client2 = cls.alt_manager.network_client
+ cls.client2 = cls.os_alt.network_client
def _make_admin_net_and_subnet_shared_to_tenant_id(self, tenant_id):
net = self.admin_client.create_network(
diff --git a/neutron/tests/tempest/api/base.py b/neutron/tests/tempest/api/base.py
index 46b2849..d0b8382 100644
--- a/neutron/tests/tempest/api/base.py
+++ b/neutron/tests/tempest/api/base.py
@@ -343,7 +343,7 @@
@classmethod
def create_admin_router(cls, *args, **kwargs):
- return cls._create_router_with_client(cls.admin_manager.network_client,
+ return cls._create_router_with_client(cls.os_admin.network_client,
*args, **kwargs)
@classmethod
diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron/tests/tempest/api/test_qos.py
index 0a9bcda..f35abd8 100644
--- a/neutron/tests/tempest/api/test_qos.py
+++ b/neutron/tests/tempest/api/test_qos.py
@@ -561,7 +561,7 @@
@classmethod
def resource_setup(cls):
super(RbacSharedQosPoliciesTest, cls).resource_setup()
- cls.client2 = cls.alt_manager.network_client
+ cls.client2 = cls.os_alt.network_client
def _create_qos_policy(self, tenant_id=None):
args = {'name': data_utils.rand_name('test-policy'),
diff --git a/neutron/tests/tempest/api/test_tag.py b/neutron/tests/tempest/api/test_tag.py
index dc78e60..f819671 100644
--- a/neutron/tests/tempest/api/test_tag.py
+++ b/neutron/tests/tempest/api/test_tag.py
@@ -177,7 +177,7 @@
@classmethod
def setup_clients(cls):
super(TagFilterTestJSON, cls).setup_clients()
- cls.client = cls.alt_manager.network_client
+ cls.client = cls.os_alt.network_client
def _assertEqualResources(self, expected, res):
actual = [n['name'] for n in res if n['name'].startswith('tag-res')]
diff --git a/neutron/tests/tempest/scenario/base.py b/neutron/tests/tempest/scenario/base.py
index 15a722a..5ccbd1c 100644
--- a/neutron/tests/tempest/scenario/base.py
+++ b/neutron/tests/tempest/scenario/base.py
@@ -41,7 +41,7 @@
@classmethod
def resource_cleanup(cls):
for keypair in cls.keypairs:
- cls.manager.keypairs_client.delete_keypair(
+ cls.os_primary.keypairs_client.delete_keypair(
keypair_name=keypair['name'])
super(BaseTempestTestCase, cls).resource_cleanup()
@@ -89,7 +89,7 @@
@classmethod
def create_keypair(cls, client=None):
- client = client or cls.manager.keypairs_client
+ client = client or cls.os_primary.keypairs_client
name = data_utils.rand_name('keypair-test')
body = client.create_keypair(name=name)
cls.keypairs.append(body['keypair'])
@@ -97,7 +97,7 @@
@classmethod
def create_secgroup_rules(cls, rule_list, secgroup_id=None):
- client = cls.manager.network_client
+ client = cls.os_primary.network_client
if not secgroup_id:
sgs = client.list_security_groups()['security_groups']
for sg in sgs:
diff --git a/neutron/tests/tempest/scenario/test_dvr.py b/neutron/tests/tempest/scenario/test_dvr.py
index 049aa8f..0b03276 100644
--- a/neutron/tests/tempest/scenario/test_dvr.py
+++ b/neutron/tests/tempest/scenario/test_dvr.py
@@ -40,7 +40,7 @@
port_id = self.client.list_ports(
network_id=network_id,
device_owner=constants.DEVICE_OWNER_ROUTER_SNAT)['ports'][0]['id']
- self.admin_manager.network_client.update_port(
+ self.os_admin.network_client.update_port(
port_id, admin_state_up=False)
diff --git a/neutron/tests/tempest/scenario/test_floatingip.py b/neutron/tests/tempest/scenario/test_floatingip.py
index 1ccb6ac..7998690 100644
--- a/neutron/tests/tempest/scenario/test_floatingip.py
+++ b/neutron/tests/tempest/scenario/test_floatingip.py
@@ -45,7 +45,7 @@
cls.create_router_interface(cls.router['id'], cls.subnet['id'])
cls.keypair = cls.create_keypair()
- cls.secgroup = cls.manager.network_client.create_security_group(
+ cls.secgroup = cls.os_primary.network_client.create_security_group(
name=data_utils.rand_name('secgroup-'))['security_group']
cls.security_groups.append(cls.secgroup)
cls.create_loginable_secgroup_rule(secgroup_id=cls.secgroup['id'])
@@ -77,7 +77,7 @@
image_ref=CONF.compute.image_ref,
key_name=self.keypair['name'],
networks=[{'port': port['id']}])['server']
- waiters.wait_for_server_status(self.manager.servers_client,
+ waiters.wait_for_server_status(self.os_primary.servers_client,
server['id'],
constants.SERVER_STATUS_ACTIVE)
return {'port': port, 'fip': fip, 'server': server}
diff --git a/neutron/tests/tempest/scenario/test_migration.py b/neutron/tests/tempest/scenario/test_migration.py
index db89716..4951c61 100644
--- a/neutron/tests/tempest/scenario/test_migration.py
+++ b/neutron/tests/tempest/scenario/test_migration.py
@@ -32,7 +32,7 @@
super(NetworkMigrationTestBase, cls).skip_checks()
def _check_update(self, router, is_dvr, is_ha):
- router = self.admin_manager.network_client.show_router(router['id'])
+ router = self.os_admin.network_client.show_router(router['id'])
self.assertEqual(is_dvr, router['router']['distributed'])
self.assertEqual(is_ha, router['router']['ha'])
@@ -44,13 +44,13 @@
self.setup_network_and_server(router=router)
self._check_connectivity()
- self.admin_manager.network_client.update_router(
+ self.os_admin.network_client.update_router(
router_id=router['id'], admin_state_up=False)
- self.admin_manager.network_client.update_router(
+ self.os_admin.network_client.update_router(
router_id=router['id'], distributed=after_dvr, ha=after_ha)
self._check_update(router, after_dvr, after_ha)
- self.admin_manager.network_client.update_router(
+ self.os_admin.network_client.update_router(
router_id=router['id'], admin_state_up=True)
self._check_connectivity()
diff --git a/neutron/tests/tempest/scenario/test_trunk.py b/neutron/tests/tempest/scenario/test_trunk.py
index 8ad9078..5d775ef 100644
--- a/neutron/tests/tempest/scenario/test_trunk.py
+++ b/neutron/tests/tempest/scenario/test_trunk.py
@@ -55,7 +55,7 @@
router = cls.create_router_by_client()
cls.create_router_interface(router['id'], cls.subnet['id'])
cls.keypair = cls.create_keypair()
- cls.secgroup = cls.manager.network_client.create_security_group(
+ cls.secgroup = cls.os_primary.network_client.create_security_group(
name=data_utils.rand_name('secgroup-'))
cls.security_groups.append(cls.secgroup['security_group'])
cls.create_loginable_secgroup_rule(