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.
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: network, do_delete=False) as subnet: group(no_ delete= True) as sg:
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.