Introduced a check in security_groups.py which calls delete_vif
(which in turn hits redis) only if security_groups is present
in the kwargs passed to the delete_port function.
Introduced changes in test_unmanaged_driver.py which change
test_delete_port by explicitly passing a security_group kwarg &
test_delete_port_redis_is_dead by asserting that delete_vif
isn't called as there is no security_group kwarg. Added a new
test case test_delete_port_no_security_group that verifies that
delete_vif isn't called if no security_group kwarg (or an empty
list) is passed.
Reviewed: https:/ /review. openstack. org/540894 /git.openstack. org/cgit/ openstack/ quark/commit/ ?id=6e9ae2fc1b2 26298ef22b34132 2908698609d214
Committed: https:/
Submitter: Zuul
Branch: master
commit 6e9ae2fc1b22629 8ef22b341322908 698609d214
Author: Sourav Banerjee <email address hidden>
Date: Thu Nov 2 19:52:13 2017 +0530
Deleting a port without sg does not hit redis
Introduced a check in security_groups.py which calls delete_vif
(which in turn hits redis) only if security_groups is present
in the kwargs passed to the delete_port function.
Introduced changes in test_unmanaged_ driver. py which change delete_ port by explicitly passing a security_group kwarg & delete_ port_redis_ is_dead by asserting that delete_vif port_no_ security_ group that verifies that
test_
test_
isn't called as there is no security_group kwarg. Added a new
test case test_delete_
delete_vif isn't called if no security_group kwarg (or an empty
list) is passed.
Change-Id: I00648f6d490e88 3175d6592ae64e8 c742d35a035
Closes-Bug: #1747417