Handling network resources in tenant isolation
Functionality is added to create and delete isolated network, subnet and router
when isolated credentials are created and deleted for a primary, admin or alt
tenant.
When a set of isolated credentials are created, the tenant gets also a private
network, subnet and router. The router connects the tenat's network to the
public network designated by public_network_id in etc/tempest.conf
Change-Id: I7587c85017cca09f7a67eae0670f67b2bceacb60
Fixes: bug #1216076
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index f71ea46..b72b99f 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -476,10 +476,13 @@
@classmethod
def setUpClass(cls):
super(NetworkScenarioTest, cls).setUpClass()
- cls.tenant_id = cls.manager._get_identity_client(
- cls.config.identity.username,
- cls.config.identity.password,
- cls.config.identity.tenant_name).tenant_id
+ if cls.config.compute.allow_tenant_isolation:
+ cls.tenant_id = cls.isolated_creds.get_primary_tenant().id
+ else:
+ cls.tenant_id = cls.manager._get_identity_client(
+ cls.config.identity.username,
+ cls.config.identity.password,
+ cls.config.identity.tenant_name).tenant_id
def _create_security_group(self, client, namestart='secgroup-smoke-'):
# Create security group