Merge "Floating ip filter has no effect"

This commit is contained in:
Zuul
2018-08-25 21:39:11 +00:00
committed by Gerrit Code Review
3 changed files with 9 additions and 4 deletions

View File

@@ -1595,8 +1595,9 @@ def floating_ip_pools_list(request):
@memoized
def tenant_floating_ip_list(request, all_tenants=False):
return FloatingIpManager(request).list(all_tenants=all_tenants)
def tenant_floating_ip_list(request, all_tenants=False, **search_opts):
return FloatingIpManager(request).list(all_tenants=all_tenants,
**search_opts)
def tenant_floating_ip_get(request, floating_ip_id):

View File

@@ -64,10 +64,12 @@ class IndexView(tables.DataTableView):
@memoized.memoized_method
def get_data(self):
floating_ips = []
search_opts = self.get_filters()
try:
floating_ips = api.neutron.tenant_floating_ip_list(
self.request,
all_tenants=True)
all_tenants=True,
**search_opts)
except Exception:
exceptions.handle(self.request,
_('Unable to retrieve floating IP list.'))

View File

@@ -89,7 +89,9 @@ class IndexView(tables.DataTableView):
def get_data(self):
try:
floating_ips = api.neutron.tenant_floating_ip_list(self.request)
search_opts = self.get_filters()
floating_ips = api.neutron.tenant_floating_ip_list(self.request,
**search_opts)
except neutron_exc.ConnectionFailed:
floating_ips = []
exceptions.handle(self.request)