Adds test for deleting external network with floatingIPs
The attached neutron bug causes server to hang when deleting external network
that still has a floating IP in it.
This test should recreate the bug, and verify it is fixed
Closes-Bug: #1374573
Change-Id: Ib7d8dcbb4485e87a49cb008ace37c81f6b06a32c
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 7ba68f7..7cd18cd 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -156,8 +156,13 @@
@classmethod
def create_subnet(cls, network, gateway='', cidr=None, mask_bits=None,
- ip_version=None, **kwargs):
+ ip_version=None, client=None, **kwargs):
"""Wrapper utility that returns a test subnet."""
+
+ # allow tests to use admin client
+ if not client:
+ client = cls.client
+
# The cidr and mask_bits depend on the ip version.
ip_version = ip_version if ip_version is not None else cls._ip_version
gateway_not_set = gateway == ''
@@ -175,7 +180,7 @@
else:
gateway_ip = gateway
try:
- resp, body = cls.client.create_subnet(
+ resp, body = client.create_subnet(
network_id=network['id'],
cidr=str(subnet_cidr),
ip_version=ip_version,