Skip to content

Commit

Permalink
Merge pull request #4357 from gildub/no-allocated-IPs
Browse files Browse the repository at this point in the history
VM: associate only unused floating IPs
(cherry picked from commit d777b49)

https://bugzilla.redhat.com/show_bug.cgi?id=1623562
  • Loading branch information
mzazrivec authored and simaishi committed Sep 13, 2018
1 parent 910a335 commit 76a3e1d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -44,7 +44,7 @@ def associate_floating_ip
def associate_floating_ip_form_fields
assert_privileges("instance_associate_floating_ip")
@record = find_record_with_rbac(VmCloud, params[:id])
floating_ips = @record.cloud_tenant.nil? ? [] : @record.cloud_tenant.floating_ips
floating_ips = @record.cloud_tenant.nil? ? [] : @record.cloud_tenant.floating_ips.find_by(:vm_id => nil)

render :json => {
:floating_ips => floating_ips
Expand Down

0 comments on commit 76a3e1d

Please sign in to comment.