Merge "[OVN] Optimization in the router port options generation"
This commit is contained in:
commit
edad202e0e
@ -1717,9 +1717,10 @@ class OVNClient:
|
||||
LOG.debug("Router %s not found", port['device_id'])
|
||||
else:
|
||||
network_ids = {port['network_id'] for port in router_ports}
|
||||
networks = self._plugin.get_networks(
|
||||
admin_context, filters={'id': network_ids})
|
||||
networks = None
|
||||
if ovn_conf.is_ovn_emit_need_to_frag_enabled():
|
||||
networks = self._plugin.get_networks(
|
||||
admin_context, filters={'id': network_ids})
|
||||
for net in networks:
|
||||
if net['mtu'] > network_mtu:
|
||||
options[
|
||||
@ -1734,6 +1735,8 @@ class OVNClient:
|
||||
# If there are no VLAN type networks attached we need to
|
||||
# still make it centralized.
|
||||
enable_redirect = False
|
||||
networks = networks or self._plugin.get_networks(
|
||||
admin_context, filters={'id': network_ids})
|
||||
if networks:
|
||||
enable_redirect = all(
|
||||
net.get(pnet.NETWORK_TYPE) in [const.TYPE_VLAN,
|
||||
|
Loading…
x
Reference in New Issue
Block a user