Skip to content

Commit

Permalink
Allow floating IP pools to be deleted
Browse files Browse the repository at this point in the history
Fixes bug #1022237

If you delete all the floating IPs associated with a floating IP, the
pool still shows up in os-floating-ip-pools extension.

Fix this by using model_query() in the DB layer so that we ignore
deleted floating IPs.

Change-Id: I30d2e716e931400ca4b798b51bb26a73a7747808
  • Loading branch information
markmc committed Jul 25, 2012
1 parent 9468508 commit 6b69e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nova/db/sqlalchemy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def floating_ip_get(context, id):
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

Expand Down

0 comments on commit 6b69e63

Please sign in to comment.