List only admin_state_up auto-allocated resources
Change-Id: Ia9dfaa27fa5bad3786f0f9a5b35804bf2ceb1552
diff --git a/neutron/tests/tempest/api/test_auto_allocated_topology.py b/neutron/tests/tempest/api/test_auto_allocated_topology.py
index 2c2dfc6..afdfe8c 100644
--- a/neutron/tests/tempest/api/test_auto_allocated_topology.py
+++ b/neutron/tests/tempest/api/test_auto_allocated_topology.py
@@ -58,9 +58,10 @@
return len([resource['id'] for resource in resources
if resource['name'].startswith('auto_allocated_')])
- networks = _count(self.client.list_networks()['networks'])
- subnets = _count(self.client.list_subnets()['subnets'])
- routers = _count(self.client.list_routers()['routers'])
+ up = {'admin_state_up': True}
+ networks = _count(self.client.list_networks(**up)['networks'])
+ subnets = _count(self.client.list_subnets(**up)['subnets'])
+ routers = _count(self.client.list_routers(**up)['routers'])
return networks, subnets, routers
def _add_topology_cleanup(self, client):