Yep, the problem here seems to be that we include a pool in the listing even if all floating IPs in it have been deleted
This simple change fixes it for me:
def floating_ip_get_pools(context):
session = get_session()
pools = []
- for result in session.query(models.FloatingIp.pool).distinct():
+ for result in model_query(context, models.FloatingIp.pool).distinct(): pools.append({'name': result[0]})
return pools
Yep, the problem here seems to be that we include a pool in the listing even if all floating IPs in it have been deleted
This simple change fixes it for me:
def floating_ ip_get_ pools(context) : query(models. FloatingIp. pool).distinct( ): context, models. FloatingIp. pool).distinct( ):
pools. append( {'name' : result[0]})
session = get_session()
pools = []
- for result in session.
+ for result in model_query(
return pools