Merge "Added new API test_create_sg_rules_when_quota_disabled"
diff --git a/.zuul.yaml b/.zuul.yaml
index 3a6b925..ff55295 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1213,7 +1213,6 @@
- openstack/tempest
vars:
tempest_test_regex: ^neutron_tempest_plugin\.sfc
- tox_envlist: all-plugin
devstack_plugins:
networking-sfc: https://opendev.org/openstack/networking-sfc
neutron-tempest-plugin: https://opendev.org/openstack/neutron-tempest-plugin
@@ -1276,7 +1275,6 @@
- openstack/tempest
vars:
tempest_test_regex: ^neutron_tempest_plugin\.fwaas
- tox_envlist: all-plugin
devstack_plugins:
neutron-fwaas: https://opendev.org/openstack/neutron-fwaas.git
neutron-tempest-plugin: https://opendev.org/openstack/neutron-tempest-plugin.git
@@ -1335,7 +1333,6 @@
- openstack/tempest
vars:
tempest_test_regex: ^neutron_tempest_plugin\.vpnaas
- tox_envlist: all-plugin
devstack_plugins:
neutron-vpnaas: https://opendev.org/openstack/neutron-vpnaas.git
neutron-tempest-plugin: https://opendev.org/openstack/neutron-tempest-plugin.git
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 25cfba6..7a46014 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -12,8 +12,10 @@
if [[ "$1" == "stack" ]]; then
case "$2" in
install)
- echo_summary "Installing neutron-tempest-plugin"
- install_neutron_tempest_plugin
+ if [[ "$INSTALL_TEMPEST" == "True" ]]; then
+ echo_summary "Installing neutron-tempest-plugin"
+ install_neutron_tempest_plugin
+ fi
;;
test-config)
echo_summary "Configuring neutron-tempest-plugin tempest options"
diff --git a/neutron_tempest_plugin/fwaas/common/fwaas_v2_client.py b/neutron_tempest_plugin/fwaas/common/fwaas_v2_client.py
index 44b0952..84d6432 100644
--- a/neutron_tempest_plugin/fwaas/common/fwaas_v2_client.py
+++ b/neutron_tempest_plugin/fwaas/common/fwaas_v2_client.py
@@ -121,6 +121,11 @@
firewall_rule_id=firewall_rule_id)
self._wait_firewall_group_ready(firewall_group_id)
+ def update_firewall_group_and_wait(self, firewall_group_id, **kwargs):
+ self.firewall_groups_client.update_firewall_group(
+ firewall_group_id, **kwargs)
+ self._wait_firewall_group_ready(firewall_group_id)
+
@staticmethod
def _call_and_ignore_exceptions(exc_list, func, *args, **kwargs):
"""Call the given function and pass if a given exception is raised."""
diff --git a/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py b/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py
index e9dad0b..4681b88 100644
--- a/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py
+++ b/neutron_tempest_plugin/fwaas/scenario/test_fwaas_v2.py
@@ -299,5 +299,4 @@
should_connect=False)
# Disassociate ports of this firewall group for cleanup resources
- self.firewall_groups_client.update_firewall_group(
- fw_group['id'], ports=[])
+ self.update_firewall_group_and_wait(fw_group['id'], ports=[])
diff --git a/neutron_tempest_plugin/scenario/test_multicast.py b/neutron_tempest_plugin/scenario/test_multicast.py
index 566ac95..b2ea8ae 100644
--- a/neutron_tempest_plugin/scenario/test_multicast.py
+++ b/neutron_tempest_plugin/scenario/test_multicast.py
@@ -224,7 +224,7 @@
message=self.multicast_message,
result_file=self.sender_output_file)
server['ssh_client'].execute_script(
- 'echo "%s" > ~/multicast_traffic_sender.py' % check_script)
+ 'echo "%s" > /tmp/multicast_traffic_sender.py' % check_script)
def _prepare_receiver(self, server, mcast_address):
check_script = get_receiver_script(
@@ -238,7 +238,7 @@
self._check_cmd_installed_on_server(ssh_client, server['id'],
PYTHON3_BIN)
server['ssh_client'].execute_script(
- 'echo "%s" > ~/multicast_traffic_receiver.py' % check_script)
+ 'echo "%s" > /tmp/multicast_traffic_receiver.py' % check_script)
def _prepare_unregistered(self, server, mcast_address):
check_script = get_unregistered_script(
@@ -250,7 +250,7 @@
self._check_cmd_installed_on_server(ssh_client, server['id'],
'tcpdump')
server['ssh_client'].execute_script(
- 'echo "%s" > ~/unregistered_traffic_receiver.sh' % check_script)
+ 'echo "%s" > /tmp/unregistered_traffic_receiver.sh' % check_script)
@test.unstable_test("bug 1850288")
@decorators.idempotent_id('113486fc-24c9-4be4-8361-03b1c9892867')
@@ -259,6 +259,8 @@
[Sender server] -> (Multicast network) -> [Receiver server]
"""
+ LOG.debug("IGMP snooping enabled: %s",
+ CONF.neutron_plugin_options.is_igmp_snooping_enabled)
sender = self._create_server()
receivers = [self._create_server() for _ in range(1)]
# Sender can be also receiver of multicast traffic
@@ -279,7 +281,7 @@
[0] https://tools.ietf.org/html/rfc4541 (See section 2.1.2)
"""
- return (mcast_address.startswith('224.0.0') or not
+ return (str(mcast_address).startswith('224.0.0') or not
CONF.neutron_plugin_options.is_igmp_snooping_enabled)
def _check_multicast_conectivity(self, sender, receivers, unregistered):
@@ -300,14 +302,14 @@
# Run the unregistered node script
unregistered['ssh_client'].execute_script(
- "bash ~/unregistered_traffic_receiver.sh", become_root=True)
+ "bash /tmp/unregistered_traffic_receiver.sh", become_root=True)
self._prepare_sender(sender, mcast_address)
receiver_ids = []
for receiver in receivers:
self._prepare_receiver(receiver, mcast_address)
receiver['ssh_client'].execute_script(
- "%s ~/multicast_traffic_receiver.py &" % PYTHON3_BIN,
+ "%s /tmp/multicast_traffic_receiver.py &" % PYTHON3_BIN,
shell="bash")
utils.wait_until_true(
lambda: _message_received(
@@ -321,7 +323,7 @@
# Now lets run scripts on sender
sender['ssh_client'].execute_script(
- "%s ~/multicast_traffic_sender.py" % PYTHON3_BIN)
+ "%s /tmp/multicast_traffic_sender.py" % PYTHON3_BIN)
# And check if message was received
for receiver in receivers:
@@ -348,9 +350,11 @@
unregistered_result = unregistered['ssh_client'].execute_script(
"cat {path} || echo '{path} not exists yet'".format(
path=self.unregistered_output_file))
- num_of_pckt = (1 if self._is_multicast_traffic_expected(mcast_address)
- else 0)
- self.assertIn('%d packets captured' % num_of_pckt, unregistered_result)
+ LOG.debug("Unregistered VM result: %s", unregistered_result)
+ expected_result = '0 packets captured'
+ if self._is_multicast_traffic_expected(mcast_address):
+ expected_result = '1 packet captured'
+ self.assertIn(expected_result, unregistered_result)
class MulticastTestIPv4(BaseMulticastTest, base.BaseTempestTestCase):