Merge "Skip fip_qos test is there is no L3 agent with extension enabled"
diff --git a/neutron_tempest_plugin/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py
index 8c8d163..262f429 100644
--- a/neutron_tempest_plugin/scenario/test_floatingip.py
+++ b/neutron_tempest_plugin/scenario/test_floatingip.py
@@ -341,6 +341,15 @@
def resource_setup(cls):
super(FloatingIPQosTest, cls).resource_setup()
+ def skip_if_no_extension_enabled_in_l3_agents(self, extension):
+ l3_agents = self.os_admin.network_client.list_agents(
+ binary='neutron-l3-agent')['agents']
+ for agent in l3_agents:
+ if extension in agent['configurations'].get('extensions', []):
+ return
+ raise self.skipTest("No L3 agent with '%s' extension enabled found." %
+ extension)
+
@decorators.idempotent_id('5eb48aea-eaba-4c20-8a6f-7740070a0aa3')
def test_qos(self):
"""Test floating IP is binding to a QoS policy with
@@ -351,6 +360,8 @@
received / elapsed time.
"""
+ self.skip_if_no_extension_enabled_in_l3_agents("fip_qos")
+
self._test_basic_resources()
policy_id = self._create_qos_policy()
ssh_client = self._create_ssh_client()