From 09c3051fb2819b647f4d8196e6e0fbc66f0ccc04 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Mon, 25 Nov 2013 16:25:43 -0800 Subject: [PATCH] Send only one agent notification on port update This patch removes the other redundant notification sent in the same routine to notify whether a security group changed. Closes-Bug: #1254924 Partial Blueprint neutron-tempest-parallel Change-Id: I5bad015decdc197c3fa9b58c680564380d513bc4 --- neutron/db/securitygroups_rpc_base.py | 2 -- neutron/tests/unit/test_security_groups_rpc.py | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/neutron/db/securitygroups_rpc_base.py b/neutron/db/securitygroups_rpc_base.py index cf17430e9..7b846c345 100644 --- a/neutron/db/securitygroups_rpc_base.py +++ b/neutron/db/securitygroups_rpc_base.py @@ -98,8 +98,6 @@ class SecurityGroupServerRpcMixin(sg_db.SecurityGroupDbMixin): not utils.compare_elements( original_port.get(ext_sg.SECURITYGROUPS), updated_port.get(ext_sg.SECURITYGROUPS))): - self.notify_security_groups_member_updated( - context, updated_port) need_notify = True return need_notify diff --git a/neutron/tests/unit/test_security_groups_rpc.py b/neutron/tests/unit/test_security_groups_rpc.py index d0256ebf6..ecbeb6d9f 100644 --- a/neutron/tests/unit/test_security_groups_rpc.py +++ b/neutron/tests/unit/test_security_groups_rpc.py @@ -1442,9 +1442,7 @@ class SGNotificationTestMixin(): self._delete('ports', port['port']['id']) self.notifier.assert_has_calls( [call.security_groups_member_updated( - mock.ANY, [mock.ANY]), - call.security_groups_member_updated( - mock.ANY, [security_group_id])]) + mock.ANY, [mock.ANY])]) class TestSecurityGroupAgentWithOVSIptables( -- 2.45.2