'Deletes any auto_allocated_network and it\'s associated resources.'

@classmethod
def resource_cleanup(cls):

    routers = cls.routers_client.list_routers().get('routers', [])
    if (len(routers) > 1):
        LOG.info('(%s)    Found    more    than    one    router    for    tenant.', test_utils.find_test_caller())
    search_opts = {'tenant_id': cls.networks_client.tenant_id}
    networks = cls.networks_client.list_networks(**search_opts).get('networks', [])
    for router in routers:
        for network in networks:
            for subnet_id in network['subnets']:
                test_utils.call_and_ignore_notfound_exc(cls.routers_client.remove_router_interface, router['id'], subnet_id=subnet_id)
        cls.routers_client.delete_router(router['id'])
    for network in networks:
        ports = cls.ports_client.list_ports(network_id=network['id']).get('ports', [])
        for port in ports:
            test_utils.call_and_ignore_notfound_exc(cls.ports_client.delete_port, port['id'])
        for subnet_id in network['subnets']:
            test_utils.call_and_ignore_notfound_exc(cls.subnets_client.delete_subnet, subnet_id)
        test_utils.call_and_ignore_notfound_exc(cls.networks_client.delete_network, network['id'])
