Merge "Fix tenant floating_ip_allocation call in neutron rest api." into stable/rocky

This commit is contained in:
Zuul 2019-12-09 13:00:04 +00:00 committed by Gerrit Code Review
commit bbaa1d0903
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: if 'dns_name' in request.DATA:
params['dns_name'] = request.DATA['dns_name'] params['dns_name'] = request.DATA['dns_name']
result = api.neutron.tenant_floating_ip_allocate(request, pool, result = api.neutron.tenant_floating_ip_allocate(request, pool,
None, params) None, **params)
return result.to_dict() return result.to_dict()
@rest_utils.ajax(data_required=True) @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, self.mock_tenant_floating_ip_allocate.assert_called_once_with(request,
'pool', 'pool',
None, None,
{}) **{})
@test.create_mocks({api.neutron: ['floating_ip_associate']}) @test.create_mocks({api.neutron: ['floating_ip_associate']})
def test_associate_floating_ip(self): def test_associate_floating_ip(self):