Merge "l2pop: get_agent_ports: Don't yield (None, {})"

This commit is contained in:
Jenkins 2014-08-14 17:53:47 +00:00 committed by Gerrit Code Review
commit 0726bdd855
2 changed files with 3 additions and 2 deletions

View File

@ -166,7 +166,9 @@ class L2populationRpcCallBackTunnelMixin(L2populationRpcCallBackMixin):
def get_agent_ports(self, fdb_entries, local_vlan_map):
for network_id, values in fdb_entries.items():
lvm = local_vlan_map.get(network_id)
agent_ports = values.get('ports') if lvm else {}
if lvm is None:
continue
agent_ports = values.get('ports')
yield (lvm, agent_ports)
@log.log

View File

@ -40,7 +40,6 @@ class TestL2populationRpcCallBackTunnelMixin(
self.lvm1: {
self.ports[0].ip: [[self.lvms[0].mac, self.lvms[0].ip]],
self.local_ip: []},
None: {},
self.lvm3: {
self.ports[2].ip: [[self.lvms[2].mac, self.lvms[2].ip]],
self.local_ip: []},