Merge "Use hypervisor_hostname as name of node in scheduling" into mcp/caracal
diff --git a/neutron_tempest_plugin/api/base.py b/neutron_tempest_plugin/api/base.py
index b659637..db84a7c 100644
--- a/neutron_tempest_plugin/api/base.py
+++ b/neutron_tempest_plugin/api/base.py
@@ -121,6 +121,11 @@
         super(BaseNetworkTest, cls).setup_clients()
         cls.client = cls.os_primary.network_client
 
+        # NOTE(vsaienko): when using static accounts we need
+        # to fill *_id information like project_id, user_id
+        # by authenticating in keystone
+        cls.client.auth_provider.get_token()
+
     @classmethod
     def resource_setup(cls):
         super(BaseNetworkTest, cls).resource_setup()
diff --git a/neutron_tempest_plugin/api/test_security_groups.py b/neutron_tempest_plugin/api/test_security_groups.py
index 5e8b18e..4f39cc6 100644
--- a/neutron_tempest_plugin/api/test_security_groups.py
+++ b/neutron_tempest_plugin/api/test_security_groups.py
@@ -256,6 +256,9 @@
     def _create_max_allowed_sg_amount(self):
         sg_amount = self._get_sg_amount()
         sg_quota = self._get_sg_quota()
+        if sg_quota == -1:
+            self._set_sg_quota(sg_amount + 1)
+            sg_quota = self._get_sg_quota()
         sg_to_create = sg_quota - sg_amount
         self._create_security_groups(sg_to_create)