yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #17738
[Bug 1336196] Re: Inconsistent keyword for automatic deletion of resources during unit tests
** Changed in: neutron
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1336196
Title:
Inconsistent keyword for automatic deletion of resources during unit
tests
Status in OpenStack Neutron (virtual network service):
Fix Released
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(network, do_delete=False) as subnet:
with self.security_group(no_delete=True) as sg:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1336196/+subscriptions
References