Inconsistent keyword for automatic deletion of resources during unit tests
Bug #1336196 reported by
Assaf Muller
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Assaf Muller |
Bug Description
Ports, networks and subnets have a do_delete=True parameter. By default, these resources are deleted at the end of the context manager scope. All other resources use a different semantic: no_delete=False.
This causes confusing situations such as:
with self.subnet(
with self.security_
pass
I personally fell to the pitfall of using do_delete for the security group and was surprised when it wasn't deleted at the end of the scope.
Finally, the double negative of no_delete=False is confusing and should be avoided.
Changed in neutron: | |
assignee: | nobody → Assaf Muller (amuller) |
description: | updated |
Changed in neutron: | |
status: | New → In Progress |
Changed in neutron: | |
importance: | Undecided → Medium |
Changed in neutron: | |
milestone: | none → juno-2 |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | juno-2 → 2014.2 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/92013 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=69dfbd94682 82f9ce16cc5b0cb 1bcb121632a0d8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 69dfbd9468282f9 ce16cc5b0cb1bcb 121632a0d8
Author: Assaf Muller <email address hidden>
Date: Sun May 4 18:26:43 2014 +0300
Change all occurences of no_delete to do_delete
Previously, ports, networks and subnets had a do_delete=True
parameter. By default, these resources were deleted at the
end of the context manager scope. All other resources used
a different semantic: no_delete=False.
This caused confusing situations such as: network, do_delete=False) as subnet: group(no_ delete= True) as sg:
with self.subnet(
with self.security_
pass
Now all resources use the same do_delete semantic.
Closes-Bug: #1336196 819efe85831e2a5 5975ea71ed4
Change-Id: I4627481813f714