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
diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py
index 23a5224..af1a8a4 100644
--- a/neutron_tempest_plugin/scenario/test_security_groups.py
+++ b/neutron_tempest_plugin/scenario/test_security_groups.py
@@ -62,10 +62,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