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
This commit is contained in:
Sam Morrison 2019-06-07 10:10:09 +10:00
parent 4c203b10c8
commit 92d832028d
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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):