]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Send only one agent notification on port update
authorSalvatore Orlando <salv.orlando@gmail.com>
Tue, 26 Nov 2013 00:25:43 +0000 (16:25 -0800)
committerSalvatore Orlando <salv.orlando@gmail.com>
Tue, 26 Nov 2013 09:23:46 +0000 (01:23 -0800)
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
neutron/tests/unit/test_security_groups_rpc.py

index cf17430e9428da282eeb1a64ff146d8da306f194..7b846c3450e596ead0bc0a2485151382fd8114bc 100644 (file)
@@ -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
 
index d0256ebf689971a58a71119182bee07ae8ace9d7..ecbeb6d9fd41ef841111cf0e4955856a76cc276e 100644 (file)
@@ -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(