_delete_port_security_group_bindings not needed in ML2 delete_port

Bug #1373199 reported by Xurong Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Xurong Yang

Bug Description

_delete_port_security_group_bindings will delete SecurityGroupPortBinding associated with the port being deleted. But 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.

Xurong Yang (idopra)
Changed in neutron:
assignee: nobody → Xurong Yang (idopra)
Changed in neutron:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/124657

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/124657
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=87a3d9fc3a41e45d7c14517243b3f8bda9c0d367
Submitter: Jenkins
Branch: master

commit 87a3d9fc3a41e45d7c14517243b3f8bda9c0d367
Author: yangxurong <email address hidden>
Date: Mon Sep 29 11:37:19 2014 +0800

    Remove _delete_port_security_group_bindings from delete_port

    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

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.