Remove redundant _ensure_default_security_group

_ensure_default_security_group() is done in
_ensure_default_security_group_handler [1] on each port BEFORE_CREATE
event. No need to ensure once again right after sending this event.

[1] 084fa99874/neutron/db/securitygroups_db.py (L894)

TrivialFix

Change-Id: I1bfe2a50b52502b5ab3631c016a617f7a9756cc6
(cherry picked from commit bdf1416958)
This commit is contained in:
Oleg Bondarev 2021-02-24 16:31:48 +04:00 committed by Mamatisa Nurmatov
parent af0335f7fa
commit ff946b9d51
1 changed files with 0 additions and 3 deletions

View File

@ -1385,9 +1385,6 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
registry.notify(resources.PORT, events.BEFORE_CREATE, self,
context=context, port=attrs)
# NOTE(kevinbenton): triggered outside of transaction since it
# emits 'AFTER' events if it creates.
self._ensure_default_security_group(context, attrs['tenant_id'])
def _create_port_db(self, context, port):
attrs = port[port_def.RESOURCE_NAME]