Set SG quota for specific project.
project_id was initialized too early.
It was None.
That's why unlimited SQ quota was set for
"some default project".
But the project in test had default quota(10).
If test class created more 10 SG then arised exception
"OverQuota".
Also SG quota for default project was reset to default value in cleanup.
It could harm another tests which were launched in parallel.
Related-PROD: https://mirantis.jira.com/browse/PRODX-19125
Change-Id: If7f3789b2791be08088588619f3a1629aeecbda4
(cherry picked from commit 6701abbc453c63edcc01becc083d29899e236ee3)
diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py
index 8b7098e..7922887 100644
--- a/neutron_tempest_plugin/scenario/test_security_groups.py
+++ b/neutron_tempest_plugin/scenario/test_security_groups.py
@@ -70,10 +70,14 @@
@classmethod
def setup_credentials(cls):
super(NetworkSecGroupTest, cls).setup_credentials()
- cls.project_id = cls.os_primary.credentials.tenant_id
cls.network_client = cls.os_admin.network_client
@classmethod
+ def setup_clients(cls):
+ super(NetworkSecGroupTest, cls).setup_clients()
+ cls.project_id = cls.os_primary.credentials.tenant_id
+
+ @classmethod
def resource_setup(cls):
super(NetworkSecGroupTest, cls).resource_setup()
# setup basic topology for servers we can log into it