]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Avoid double-hopping deletes for security group rules
authorarmando-migliaccio <armamig@gmail.com>
Fri, 17 Apr 2015 00:37:51 +0000 (17:37 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Fri, 17 Apr 2015 02:17:02 +0000 (19:17 -0700)
commit05a9f16257c2953bf40d11ca2a2f9651ba4e86b2
treebfd5fc91db2fa841da53e5cf38c262eed015c7fc
parentaf0197456477939f738cf24527ff4edda6e5e9e2
Avoid double-hopping deletes for security group rules

There is no need to get and delete; we can delete with one bullet.
This will most likely have quite a decent performance benefit overall.

The patch preserves the existing logic of raising and error on the missing
element; a test was added to spur up the coverage.

Related-bug: #1444112

Change-Id: Iaef77bd3f7775ed91d374838fb5488d925b4062c
neutron/db/securitygroups_db.py
neutron/tests/unit/db/test_securitygroups_db.py [new file with mode: 0644]