bug 923510: avoid querying all ports for non-detail GET Network call.
Change-Id: I9b4a20e5f6eb22dc234dfa675e7ca4f52893707d
This commit is contained in:
parent
9a1823d72b
commit
1eb3c693b5
@ -57,8 +57,10 @@ class Controller(common.QuantumController):
|
|||||||
# Doing this in the API is inefficient
|
# Doing this in the API is inefficient
|
||||||
# TODO(salvatore-orlando): This should be fixed with Bug #834012
|
# TODO(salvatore-orlando): This should be fixed with Bug #834012
|
||||||
# Don't pass filter options
|
# Don't pass filter options
|
||||||
port_list = self._plugin.get_all_ports(tenant_id, network_id)
|
ports_data = None
|
||||||
ports_data = [self._plugin.get_port_details(
|
if port_details:
|
||||||
|
port_list = self._plugin.get_all_ports(tenant_id, network_id)
|
||||||
|
ports_data = [self._plugin.get_port_details(
|
||||||
tenant_id, network_id, port['port-id'])
|
tenant_id, network_id, port['port-id'])
|
||||||
for port in port_list]
|
for port in port_list]
|
||||||
builder = networks_view.get_view_builder(request, self.version)
|
builder = networks_view.get_view_builder(request, self.version)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user