bug 923510: avoid querying all ports for non-detail GET Network call.

Change-Id: I9b4a20e5f6eb22dc234dfa675e7ca4f52893707d
This commit is contained in:
Dan Wendlandt 2012-01-29 14:11:03 -08:00
parent 9a1823d72b
commit 1eb3c693b5
1 changed files with 4 additions and 2 deletions

View File

@ -57,8 +57,10 @@ class Controller(common.QuantumController):
# Doing this in the API is inefficient
# TODO(salvatore-orlando): This should be fixed with Bug #834012
# Don't pass filter options
port_list = self._plugin.get_all_ports(tenant_id, network_id)
ports_data = [self._plugin.get_port_details(
ports_data = None
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'])
for port in port_list]
builder = networks_view.get_view_builder(request, self.version)