Browse Source

NSX|V3+P: Fix SG creation in port create

Change-Id: Ib8a8214a7704c72ef4182c70eaa2b278ebf3b42f
changes/44/781944/1
asarfaty 1 month ago
committed by Adit Sarfaty
parent
commit
04a2bc867b
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      vmware_nsx/plugins/nsx_p/plugin.py
  2. +3
    -2
      vmware_nsx/plugins/nsx_v3/plugin.py

+ 3
- 2
vmware_nsx/plugins/nsx_p/plugin.py View File

@ -2095,8 +2095,9 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
# Do this outside of the context writer scope so it can overcome
# failures
if port.get('tenant_id'):
self._ensure_default_security_group(context, port['tenant_id'])
if port_data.get('tenant_id'):
self._ensure_default_security_group(context,
port_data['tenant_id'])
with db_api.CONTEXT_WRITER.using(context):
neutron_db = self.base_create_port(context, port)


+ 3
- 2
vmware_nsx/plugins/nsx_v3/plugin.py View File

@ -1466,8 +1466,9 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
# Do this outside of the context writer scope so it can overcome
# failures
if port.get('tenant_id'):
self._ensure_default_security_group(context, port['tenant_id'])
if port_data.get('tenant_id'):
self._ensure_default_security_group(context,
port_data['tenant_id'])
with db_api.CONTEXT_WRITER.using(context):
neutron_db = self.base_create_port(context, port)


Loading…
Cancel
Save