Since SecurityGroupPortBinding has a foreign key constraint with Port
and cascade deleting is defined, SecurityGroupPortBinding can be
deleted when port is deleted, thus _delete_port_security_group_bindings
call in ML2 delete_port is not needed and can be removed. Redundant
calls in other core plugins are also removed in this patch.
_delete_port_security_group_bindings is needed when updating ports so
this method cannot be removed directly.
Change-Id: I33c787fbed46d6049d3b24ccd246a8484d8aa306
Closes-Bug: #
1373199
if self.l3_plugin:
router_ids = self.l3_plugin.disassociate_floatingips(
context, port_id, do_notify=False)
- self._delete_port_security_group_bindings(context, port_id)
port = super(NeutronRestProxyV2, self).get_port(context, port_id)
# Tenant ID must come from network in case the network is shared
tenid = self._get_port_net_tenantid(context, port)
context, id)
self.mechanism_manager.delete_port_precommit(mech_context)
bound_mech_contexts.append(mech_context)
- self._delete_port_security_group_bindings(context, id)
if l3plugin:
router_ids = l3plugin.disassociate_floatingips(
context, id, do_notify=False)
with context.session.begin(subtransactions=True):
router_ids = self.disassociate_floatingips(
context, id, do_notify=False)
- self._delete_port_security_group_bindings(context, id)
super(NECPluginV2, self).delete_port(context, id)
# now that we've left db transaction, we are safe to notify
# Need to call this explicitly to delete vport to vporttag binding
if ext_sg.SECURITYGROUPS in port:
- self._delete_port_security_group_bindings(context, id)
+ self.nuageclient.delete_port_security_group_bindings(id)
netpart_id = subnet_mapping['net_partition_id']
net_partition = nuagedb.get_net_partition_by_id(context.session,
neutron_port = super(OneConvergencePluginV2,
self).get_port(context, port_id)
- self._delete_port_security_group_bindings(context, port_id)
-
router_ids = self.disassociate_floatingips(
context, port_id, do_notify=False)