summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Morrison <sorrison@gmail.com>2019-06-07 10:10:09 +1000
committerStefan Nica <snica@suse.com>2019-11-29 13:43:34 +0000
commit489af71a6b976e5aabf7fcc8b1919f812dadf1c7 (patch)
tree896bf12f645ddd592adcd8ee2bea2188697367cb
parent894cac79709138ef13868e792cc3a510fad52242 (diff)
downloadhorizon-489af71a6b976e5aabf7fcc8b1919f812dadf1c7.tar.gz
Fix tenant floating_ip_allocation call in neutron rest api.
The call to allocate a new floating IP was incorrecting calling tenant_floating_ip_allocate, this is used by neutron-lbaas-dashboard. Change-Id: Ia4d1367ccd309a074a0ea84a555d7de6c07971a6 Closes-bug: #1831954 (cherry picked from commit 92d832028df65cb95030b2a585764a62dc1c0b75)
-rw-r--r--openstack_dashboard/api/rest/network.py2
-rw-r--r--openstack_dashboard/test/unit/api/rest/test_network.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/openstack_dashboard/api/rest/network.py b/openstack_dashboard/api/rest/network.py
index bf7872be4..8bdebb9c7 100644
--- a/openstack_dashboard/api/rest/network.py
+++ b/openstack_dashboard/api/rest/network.py
@@ -67,7 +67,7 @@ class FloatingIP(generic.View):
if 'dns_name' in request.DATA:
params['dns_name'] = request.DATA['dns_name']
result = api.neutron.tenant_floating_ip_allocate(request, pool,
- None, params)
+ None, **params)
return result.to_dict()
@rest_utils.ajax(data_required=True)
diff --git a/openstack_dashboard/test/unit/api/rest/test_network.py b/openstack_dashboard/test/unit/api/rest/test_network.py
index 05d30f0ff..4b2b9f6b6 100644
--- a/openstack_dashboard/test/unit/api/rest/test_network.py
+++ b/openstack_dashboard/test/unit/api/rest/test_network.py
@@ -77,7 +77,7 @@ class RestNetworkApiFloatingIpTests(test.TestCase):
self.mock_tenant_floating_ip_allocate.assert_called_once_with(request,
'pool',
None,
- {})
+ **{})
@test.create_mocks({api.neutron: ['floating_ip_associate']})
def test_associate_floating_ip(self):