Comment 2 for bug 1976345

Revision history for this message
Brian Haley (brian-haley) wrote :

I'm not sure the proposal is valid, as the routers used in the first call to _routers_to_sync() are used inside the 'if' clause:

        routers = self._routers_to_sync(context, router_ids, host)
        if extensions.is_extension_supported(
                self.plugin, constants.PORT_BINDING_EXT_ALIAS):
            self._ensure_host_set_on_ports(context, host, routers)
            # refresh the data structure after ports are bound
            routers = self._routers_to_sync(context, router_ids, host)

Perhaps, and this is just a thought, _ensure_host_set_on_port() can return a status indicating it did some work and we can skip the second sync call if it didn't?