config-perf: build up nets/ips/vms in _port_list with exact fetch
The different callers of _port_list() were building up virtual-networks,
instance-ips and virtual-machines (sometimes getting more than needed
from api-server) as a memo to be used within the request context.
Simplify this by having _port_list() do it and free callers up to
only pass needed ports to _port_list(). Use
a. list by obj_uuids for nets from port refs
b. list by back_ref_ids of ports for instance-ips
c. list by obj_uuids for VMs from port-refs (or port parent for
<1.06 based port creation)
Closes-Bug: #1432767
Change-Id: I77379b8919c96abf540b91ccc7fb43f5cc4e8e6c
(cherry picked from commit 551fcb96a6e42640996a73f70954407caf74343a)
Reviewed: https:/ /review. opencontrail. org/8529 github. org/Juniper/ contrail- controller/ commit/ 071ead8e5276909 d5ad40998e149fc 5d62426977
Committed: http://
Submitter: Zuul
Branch: R2.0
commit 071ead8e5276909 d5ad40998e149fc 5d62426977
Author: Hampapur Ajay <email address hidden>
Date: Thu Mar 12 11:19:28 2015 -0700
config-perf: build up nets/ips/vms in _port_list with exact fetch
The different callers of _port_list() were building up virtual-networks,
instance-ips and virtual-machines (sometimes getting more than needed
from api-server) as a memo to be used within the request context.
Simplify this by having _port_list() do it and free callers up to
only pass needed ports to _port_list(). Use
a. list by obj_uuids for nets from port refs
b. list by back_ref_ids of ports for instance-ips
c. list by obj_uuids for VMs from port-refs (or port parent for
<1.06 based port creation)
Closes-Bug: #1432767
Change-Id: I77379b8919c96a bf540b91ccc7fb4 3f5cc4e8e6c 0996a73f7095440 7caf74343a)
(cherry picked from commit 551fcb96a6e4264