Get rid of useless tenant_id attribiute
The corresponding tenant_id will be retrieved
automatically for all neutron scenario tests
helper functions. There is no need to cache
it before.
Change-Id: I28f3f1084b91c809335494eb16219b3d9261b8bf
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index dd1adc7..6ce4cfe 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -676,11 +676,6 @@
if not CONF.service_available.neutron:
raise cls.skipException('Neutron not available')
- @classmethod
- def resource_setup(cls):
- super(NetworkScenarioTest, cls).resource_setup()
- cls.tenant_id = cls.manager.identity_client.tenant_id
-
def _create_network(self, networks_client=None,
routers_client=None, tenant_id=None,
namestart='network-smoke-',
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index 125d61a..e177cb0 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -105,8 +105,7 @@
def _setup_network_and_servers(self, **kwargs):
boot_with_port = kwargs.pop('boot_with_port', False)
- self.security_group = \
- self._create_security_group(tenant_id=self.tenant_id)
+ self.security_group = self._create_security_group()
self.network, self.subnet, self.router = self.create_networks(**kwargs)
self.check_networks()
@@ -229,7 +228,7 @@
floating_ip, server)
def _create_new_network(self, create_gateway=False):
- self.new_net = self._create_network(tenant_id=self.tenant_id)
+ self.new_net = self._create_network()
if create_gateway:
self.new_subnet = self._create_subnet(
network=self.new_net)
diff --git a/tempest/scenario/test_network_v6.py b/tempest/scenario/test_network_v6.py
index 496f07e..6700236 100644
--- a/tempest/scenario/test_network_v6.py
+++ b/tempest/scenario/test_network_v6.py
@@ -63,7 +63,7 @@
def setUp(self):
super(TestGettingAddress, self).setUp()
self.keypair = self.create_keypair()
- self.sec_grp = self._create_security_group(tenant_id=self.tenant_id)
+ self.sec_grp = self._create_security_group()
def prepare_network(self, address6_mode, n_subnets6=1, dualnet=False):
"""Prepare network
@@ -74,15 +74,15 @@
if dualnet - create IPv6 subnets on a different network
:return: list of created networks
"""
- self.network = self._create_network(tenant_id=self.tenant_id)
+ self.network = self._create_network()
if dualnet:
- self.network_v6 = self._create_network(tenant_id=self.tenant_id)
+ self.network_v6 = self._create_network()
sub4 = self._create_subnet(network=self.network,
namestart='sub4',
ip_version=4)
- router = self._get_router(tenant_id=self.tenant_id)
+ router = self._get_router()
self.routers_client.add_router_interface(router['id'],
subnet_id=sub4['id'])