Disable security group quotas in NetworkSecGroupTest
This will prevent from receiving an unexpected QuotaLimit exception.
Change-Id: Idb6375c87c1aac704896bef47d3d50b8c2d55a54
Closes-Bug: #1864471
diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py
index 83bb55c..67d9306 100644
--- a/neutron_tempest_plugin/scenario/test_security_groups.py
+++ b/neutron_tempest_plugin/scenario/test_security_groups.py
@@ -16,6 +16,7 @@
from tempest.common import waiters
from tempest.lib.common.utils import data_utils
+from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from neutron_tempest_plugin.common import ssh
@@ -59,6 +60,12 @@
raise e
@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 resource_setup(cls):
super(NetworkSecGroupTest, cls).resource_setup()
# setup basic topology for servers we can log into it
@@ -68,6 +75,12 @@
cls.create_router_interface(router['id'], cls.subnet['id'])
cls.keypair = cls.create_keypair()
+ def setUp(self):
+ super(NetworkSecGroupTest, self).setUp()
+ self.addCleanup(test_utils.call_and_ignore_notfound_exc,
+ self.network_client.reset_quotas, self.project_id)
+ self.network_client.update_quotas(self.project_id, security_group=-1)
+
def create_vm_testing_sec_grp(self, num_servers=2, security_groups=None,
ports=None):
"""Create instance for security group testing